Path Class Reference

The Path class. More...

#include <RobotAPI/libraries/aron/core/Path.h>

Public Member Functions

std::string getDelimeter () const
 
std::string getFirstElement () const
 
std::string getLastElement () const
 
std::vector< std::string > getPath () const
 
std::string getRootIdentifier () const
 
Path getWithoutPrefix (const Path &) const
 
bool hasDirectPrefix (const Path &) const
 
bool hasElement () const
 
bool hasPrefix (const Path &) const
 
Pathoperator= (const armarx::aron::Path &)=default
 copy operator More...
 
 Path ()
 default constructor More...
 
 Path (const Path &)
 copy constructor More...
 
 Path (const Path &, const std::vector< std::string > &)
 append constructor More...
 
 Path (const std::vector< std::string > &)
 default constructor, taking a list of strings (a path) More...
 
void setDelimeter (const std::string &)
 
void setRootIdentifier (const std::string &)
 
size_t size () const
 
std::string toString () const
 
Path withAcceptedType (bool escape=false) const
 
Path withAcceptedTypeIndex (int, bool escape=false) const
 
Path withDetachedFirstElement () const
 
Path withDetachedLastElement () const
 
Path withElement (const std::string &, bool escape=false) const
 
Path withIndex (int, bool escape=false) const
 

Static Public Member Functions

static Path FromString (const std::string &, const std::string &rootIdentifier=DEFAULT_ROOT_IDENTIFIER, const std::string &delimeter=DEFAULT_DELIMETER)
 

Static Public Attributes

static const constexpr char * DEFAULT_DELIMETER = "->"
 
static const constexpr char * DEFAULT_ROOT_IDENTIFIER = "_ARON"
 

Detailed Description

The Path class.

It is used to keep track of the internal tree-like structure of a variant and can be converted into a string for debugging purposes and exception message generation. Further, it can be used to navigate through a type or data object

Definition at line 36 of file Path.h.

Constructor & Destructor Documentation

◆ Path() [1/4]

Path ( )

default constructor

Definition at line 32 of file Path.cpp.

+ Here is the caller graph for this function:

◆ Path() [2/4]

Path ( const std::vector< std::string > &  p)

default constructor, taking a list of strings (a path)

Definition at line 36 of file Path.cpp.

◆ Path() [3/4]

Path ( const Path p)

copy constructor

Definition at line 41 of file Path.cpp.

◆ Path() [4/4]

Path ( const Path pa,
const std::vector< std::string > &  p 
)

append constructor

Definition at line 46 of file Path.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ FromString()

Path FromString ( const std::string &  s,
const std::string &  rootIdentifier = DEFAULT_ROOT_IDENTIFIER,
const std::string &  delimeter = DEFAULT_DELIMETER 
)
static

Definition at line 137 of file Path.cpp.

+ Here is the call graph for this function:

◆ getDelimeter()

std::string getDelimeter ( ) const

Definition at line 73 of file Path.cpp.

+ Here is the caller graph for this function:

◆ getFirstElement()

std::string getFirstElement ( ) const

Definition at line 102 of file Path.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLastElement()

std::string getLastElement ( ) const

Definition at line 91 of file Path.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPath()

std::vector< std::string > getPath ( ) const

Definition at line 85 of file Path.cpp.

+ Here is the caller graph for this function:

◆ getRootIdentifier()

std::string getRootIdentifier ( ) const

Definition at line 61 of file Path.cpp.

+ Here is the caller graph for this function:

◆ getWithoutPrefix()

Path getWithoutPrefix ( const Path pref) const

Definition at line 216 of file Path.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasDirectPrefix()

bool hasDirectPrefix ( const Path e) const

Definition at line 263 of file Path.cpp.

+ Here is the call graph for this function:

◆ hasElement()

bool hasElement ( ) const

Definition at line 113 of file Path.cpp.

+ Here is the caller graph for this function:

◆ hasPrefix()

bool hasPrefix ( const Path e) const

Definition at line 240 of file Path.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

Path& operator= ( const armarx::aron::Path )
default

copy operator

◆ setDelimeter()

void setDelimeter ( const std::string &  d)

Definition at line 67 of file Path.cpp.

+ Here is the caller graph for this function:

◆ setRootIdentifier()

void setRootIdentifier ( const std::string &  s)

Definition at line 55 of file Path.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ size()

size_t size ( ) const

Definition at line 119 of file Path.cpp.

+ Here is the caller graph for this function:

◆ toString()

std::string toString ( ) const

Definition at line 125 of file Path.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withAcceptedType()

Path withAcceptedType ( bool  escape = false) const

Definition at line 172 of file Path.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withAcceptedTypeIndex()

Path withAcceptedTypeIndex ( int  i,
bool  escape = false 
) const

Definition at line 183 of file Path.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withDetachedFirstElement()

Path withDetachedFirstElement ( ) const

Definition at line 205 of file Path.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withDetachedLastElement()

Path withDetachedLastElement ( ) const

Definition at line 194 of file Path.cpp.

+ Here is the call graph for this function:

◆ withElement()

Path withElement ( const std::string &  s,
bool  escape = false 
) const

Definition at line 161 of file Path.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withIndex()

Path withIndex ( int  i,
bool  escape = false 
) const

Definition at line 150 of file Path.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ DEFAULT_DELIMETER

const constexpr char* DEFAULT_DELIMETER = "->"
staticconstexpr

Definition at line 40 of file Path.h.

◆ DEFAULT_ROOT_IDENTIFIER

const constexpr char* DEFAULT_ROOT_IDENTIFIER = "_ARON"
staticconstexpr

Definition at line 39 of file Path.h.


The documentation for this class was generated from the following files: