VizKit
3.3.7
|
Identifier of an item (like e.g. More...
#include <VisualItemIdentifier.h>
Public Member Functions | |
VisualItemIdentifier () | |
The constructor. | |
VisualItemIdentifier (const char *const aName) | |
Another constructor. | |
~VisualItemIdentifier () | |
The destructor. | |
VisualItemIdentifier (const VisualItemIdentifier &other) | |
Copy constructor. | |
VisualItemIdentifier & | operator= (const VisualItemIdentifier &other) |
Assignment operator. | |
bool | operator< (const VisualItemIdentifier &other) const |
Less than operator. | |
bool | operator== (const VisualItemIdentifier &other) const |
Equality operator. | |
bool | operator!= (const VisualItemIdentifier &other) |
Inequality operator. | |
const char *const | getName (void) |
Returns the name (NULL if there is none). | |
Static Public Member Functions | |
static VisualItemIdentifier * | createVisualItemIdentifier (const char *const aName) |
Returns a VisualItemIdentifier identified by name. | |
Private Types | |
typedef std::map< std::string, uint32 > | VisualItemIdentifierNameTokenMap |
A VisualItemIdentifierTokenNameMap is a map of names and tokens. | |
typedef VisualItemIdentifierNameTokenMap::iterator | VisualItemIdentifierNameTokenMapIterator |
A VisualItemIdentifierNameTokenMapIterator is an iterator of a VisualItemIdentifierNameTokenMap. | |
Private Member Functions | |
VisualItemIdentifier (const char *const aName, uint32 aToken) | |
Private constructor. | |
void | copy (const VisualItemIdentifier &other) |
Copy method for assignment operator and copy constructor. | |
Static Private Member Functions | |
static uint32 | getNextToken () |
Internal method to receive the next valid token. | |
Private Attributes | |
char * | name |
The optional identifier name (for shared VisualItemIdentifiers). | |
uint32 | token |
The internal identifier of the VisualItemIdentifier. | |
Static Private Attributes | |
static VisualItemIdentifierNameTokenMap | visualItemIdentifierNameTokenMap |
A map of names and tokens. |
Identifier of an item (like e.g.
a VisualNurbs or a VisualAnimationComponent). The internal token of the identifier stays the same across copy operations. Comparisons of copied instances yield equal result. Identifiers can be shared by supplying a name. If another VisualItemIdentifier with the same name has been created already, it is returned by VisualItemIdentifierRegistry's getVisualItemIdentifier().
typedef std::map<std::string, uint32> VizKit::VisualItemIdentifier::VisualItemIdentifierNameTokenMap [private] |
A VisualItemIdentifierTokenNameMap is a map of names and tokens.
typedef VisualItemIdentifierNameTokenMap::iterator VizKit::VisualItemIdentifier::VisualItemIdentifierNameTokenMapIterator [private] |
A VisualItemIdentifierNameTokenMapIterator is an iterator of a VisualItemIdentifierNameTokenMap.
The constructor.
VisualItemIdentifier::VisualItemIdentifier | ( | const char *const | aName | ) |
Another constructor.
aName | An optional identifier name (for shared VisualItemIdentifiers). |
The destructor.
VisualItemIdentifier::VisualItemIdentifier | ( | const VisualItemIdentifier & | other | ) |
Copy constructor.
other | Another VisualItemIdentifier. |
VisualItemIdentifier::VisualItemIdentifier | ( | const char *const | aName, |
uint32 | aToken | ||
) | [private] |
Private constructor.
aName | Name of VisualItemIdentifier. |
aToken | Token of VisualItemIdentifier. |
void VisualItemIdentifier::copy | ( | const VisualItemIdentifier & | other | ) | [private] |
Copy method for assignment operator and copy constructor.
other | Another VisualItemIdentifier. |
VisualItemIdentifier * VisualItemIdentifier::createVisualItemIdentifier | ( | const char *const | aName | ) | [static] |
Returns a VisualItemIdentifier identified by name.
By using a name as token, the same identifier can be used at different places.
aName | The name of the VisualItemIdentifier. |
const char *const VisualItemIdentifier::getName | ( | void | ) |
Returns the name (NULL if there is none).
uint32 VisualItemIdentifier::getNextToken | ( | ) | [static, private] |
Internal method to receive the next valid token.
bool VisualItemIdentifier::operator!= | ( | const VisualItemIdentifier & | other | ) |
Inequality operator.
other | Another VisualItemIdentifier. |
bool VisualItemIdentifier::operator< | ( | const VisualItemIdentifier & | other | ) | const |
Less than operator.
other | Another VisualItemIdentifier. |
VisualItemIdentifier & VisualItemIdentifier::operator= | ( | const VisualItemIdentifier & | other | ) |
Assignment operator.
bool VisualItemIdentifier::operator== | ( | const VisualItemIdentifier & | other | ) | const |
Equality operator.
other | Another VisualItemIdentifier. |
char* VizKit::VisualItemIdentifier::name [private] |
The optional identifier name (for shared VisualItemIdentifiers).
uint32 VizKit::VisualItemIdentifier::token [private] |
The internal identifier of the VisualItemIdentifier.
VisualItemIdentifier::VisualItemIdentifierNameTokenMap VisualItemIdentifier::visualItemIdentifierNameTokenMap [static, private] |
A map of names and tokens.