GL Studio C++ Runtime API
|
#include <disti_metadata.h>
Public Member Functions | |
AttributeName (const std::string &name) | |
* | AttributeName (const char *name) |
AttributeName (long stringIndex) | |
AttributeName (const AttributeName &other) | |
Copy constructor. | |
AttributeName & | operator= (const AttributeName &other) |
Copy assignment. | |
long | StringIndex () const |
Returns the index to the string associate with this instance. | |
operator std::string () const | |
Defines the cast operator to make this look like a std::string for reading. | |
AttributeName class can be treated like a std::string in some instances It creates static storage for any referenced name. This results in only one copy for each name which saves memory Very fast comparison between references to names
|
explicit |
Constructor Explicit because construction of an AttributeName is an expensive operation. If possible you should use a static AttrbuteName object rather than constructing a new one each time it is needed.
name | the desired Name |
|
explicit |
Constructor See comments on AttributeName(const std::string &name)
name | the desired Name |
|
explicit |
Constructor
stringIndex | The index into the string map. |