AGX Dynamics 2.38.0.0
Loading...
Searching...
No Matches
agx::Path Class Reference

Representation of a path, a list of name components. More...

#include <Path.h>

Classes

class  iterator
 

Public Member Functions

 Path ()
 
 Path (const agx::Path &other)
 
 Path (const agx::String &path)
 
 Path (const char *path)
 
 Path (const Name &name)
 
 Path (const std::string &path)
 
 ~Path ()
 
agx::String back () const
 
agx::Path base () const
 
iterator begin () const
 
const char * c_str () const
 
bool contains (const Name &component)
 
bool contains (const Path &subpath)
 
bool empty () const
 
iterator end () const
 
UInt32 hash () const
 
bool hasTail () const
 
bool operator!= (const agx::Path &other) const
 
agx::Path operator+ (const agx::Name &extension) const
 
agx::Path operator+ (const agx::Path &extension) const
 
agx::Pathoperator+= (const agx::Name &extension)
 
agx::Pathoperator+= (const agx::Path &extension)
 
Pathoperator= (const Path &other)
 
bool operator== (const agx::Path &other) const
 
agx::String root () const
 
const agx::Stringstr () const
 
agx::Path tail () const
 

Detailed Description

Representation of a path, a list of name components.

Definition at line 32 of file Path.h.

Constructor & Destructor Documentation

◆ Path() [1/6]

agx::Path::Path ( )
inline

Definition at line 144 of file Path.h.

◆ Path() [2/6]

agx::Path::Path ( const agx::String path)

◆ Path() [3/6]

agx::Path::Path ( const std::string &  path)

◆ Path() [4/6]

agx::Path::Path ( const char *  path)

◆ Path() [5/6]

agx::Path::Path ( const agx::Path other)

◆ Path() [6/6]

agx::Path::Path ( const Name name)
explicit

◆ ~Path()

agx::Path::~Path ( )

Member Function Documentation

◆ back()

agx::String agx::Path::back ( ) const
Returns
The last component of the path, eg Foo.bar.hej -> hej

◆ base()

agx::Path agx::Path::base ( ) const
Returns
The base of the path, eg Foo.bar.hej -> Foo.bar

◆ begin()

Path::iterator agx::Path::begin ( ) const
inline

Definition at line 149 of file Path.h.

◆ c_str()

const char * agx::Path::c_str ( ) const
Returns
A c-string representation of the path.

Referenced by agxData::EntityInstance::verifyIndex(), and agxData::EntityPtr::verifyIndex().

◆ contains() [1/2]

bool agx::Path::contains ( const Name component)

References agx::hash().

◆ contains() [2/2]

bool agx::Path::contains ( const Path subpath)

◆ empty()

bool agx::Path::empty ( ) const
Returns
True if the path is empty.

◆ end()

Path::iterator agx::Path::end ( ) const
inline

Definition at line 150 of file Path.h.

◆ hash()

UInt32 agx::Path::hash ( ) const

Definition at line 152 of file Path.h.

References agx::hash().

◆ hasTail()

bool agx::Path::hasTail ( ) const
Returns
True if the path has sub-paths.

◆ operator!=()

bool agx::Path::operator!= ( const agx::Path other) const

◆ operator+() [1/2]

agx::Path agx::Path::operator+ ( const agx::Name extension) const

◆ operator+() [2/2]

agx::Path agx::Path::operator+ ( const agx::Path extension) const

◆ operator+=() [1/2]

agx::Path & agx::Path::operator+= ( const agx::Name extension)

◆ operator+=() [2/2]

agx::Path & agx::Path::operator+= ( const agx::Path extension)

◆ operator=()

Path & agx::Path::operator= ( const Path other)

◆ operator==()

bool agx::Path::operator== ( const agx::Path other) const

◆ root()

agx::String agx::Path::root ( ) const
Returns
The root name component.

◆ str()

const String & agx::Path::str ( ) const
Returns
A string representation of the path.

Definition at line 147 of file Path.h.

◆ tail()

agx::Path agx::Path::tail ( ) const
Returns
The subpath below the root, eg Foo.bar.hej -> bar.hej

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