MIRA
|
Class for storing/combining/managing resource names consisting of namespaces and names separated by '/' Resource names can be combined and normalized. More...
#include <fw/ResourceName.h>
Public Member Functions | |
ResourceName () | |
Creates default empty resource name. More... | |
ResourceName (const std::string &name) | |
Creates a normalized resource from a name. More... | |
ResourceName (const char *name) | |
Variant for normal C-Strings. More... | |
ResourceName (const ResourceName &other) | |
const ResourceName & | operator= (const std::string &other) |
Assignment for strings. More... | |
const ResourceName & | operator= (const ResourceName &other) |
operator const std::string & () const | |
Casts ResourceName into std::string. More... | |
const std::string & | str () const |
Returns the underlying string containing the name. More... | |
ResourceName | parent () const |
Returns parent namespace. More... | |
std::string | leaf () const |
Returns the leaf, i.e. the bottom most name (the string after the last / ). More... | |
bool | isAncestorOf (const ResourceName &other) const |
Returns true, if this node is an ancestor of "other" in the namespace hierarchy. More... | |
bool | isParentOf (const ResourceName &other) const |
Returns true, if this node is the direct ancestor (parent) of "other" in the namespace hierarchy. More... | |
bool | isSuccessorOf (const ResourceName &other) const |
Returns true, if this node is a successor of "other" in the namespace hierarchy. More... | |
bool | isChildOf (const ResourceName &other) const |
Returns true, if this node is the direct successor (child) of "other" in the namespace hierarchy. More... | |
std::string::value_type | operator[] (std::string::size_type i) |
Returns the i-th character in the name. More... | |
template<typename Reflector > | |
void | reflect (Reflector &r) |
std::string | operator/ (const std::string &other) const |
Concatenates two resource names separated by a '/'. More... | |
ResourceName | operator/ (const ResourceName &other) const |
Concatenates two resource names separated by a '/'. More... | |
const ResourceName & | operator/= (const ResourceName &other) |
Concatenates this with another resource names separated by a '/'. More... | |
bool | isRoot () const |
Returns true, if this is the root namespace "/". More... | |
bool | isFullyQualified () const |
Returns true, if the name is fully qualified. More... | |
Comparison operators | |
bool | operator< (const ResourceName &other) const |
bool | operator<= (const ResourceName &other) const |
bool | operator> (const ResourceName &other) const |
bool | operator>= (const ResourceName &other) const |
bool | operator== (const ResourceName &other) const |
bool | operator!= (const ResourceName &other) const |
Static Public Member Functions | |
static ResourceName | makeFullyQualified (const ResourceName &name, const ResourceName &ns) |
Friends | |
std::ostream & | operator<< (std::ostream &os, const ResourceName &name) |
std::istream & | operator>> (std::istream &is, ResourceName &name) |
Class for storing/combining/managing resource names consisting of namespaces and names separated by '/' Resource names can be combined and normalized.
|
inline |
Creates default empty resource name.
|
inline |
Creates a normalized resource from a name.
|
inline |
Variant for normal C-Strings.
|
inline |
|
inline |
Assignment for strings.
|
inline |
|
inline |
Casts ResourceName into std::string.
|
inline |
Returns the underlying string containing the name.
ResourceName parent | ( | ) | const |
Returns parent namespace.
If *this has no parent (e.g. "namewithoutparent"), it returns an empty ResourceName.
std::string leaf | ( | ) | const |
Returns the leaf, i.e. the bottom most name (the string after the last / ).
bool isAncestorOf | ( | const ResourceName & | other | ) | const |
Returns true, if this node is an ancestor of "other" in the namespace hierarchy.
bool isParentOf | ( | const ResourceName & | other | ) | const |
Returns true, if this node is the direct ancestor (parent) of "other" in the namespace hierarchy.
bool isSuccessorOf | ( | const ResourceName & | other | ) | const |
Returns true, if this node is a successor of "other" in the namespace hierarchy.
bool isChildOf | ( | const ResourceName & | other | ) | const |
Returns true, if this node is the direct successor (child) of "other" in the namespace hierarchy.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns the i-th character in the name.
|
inline |
|
inline |
Concatenates two resource names separated by a '/'.
|
inline |
Concatenates two resource names separated by a '/'.
|
inline |
Concatenates this with another resource names separated by a '/'.
|
inline |
Returns true, if this is the root namespace "/".
|
inline |
Returns true, if the name is fully qualified.
|
static |
|
friend |
|
friend |