Cogs.Foundation
|
Represents an unique name. More...
#include <Name.h>
Public Member Functions | |
Name ()=default | |
Default constructor. | |
Name (const StringView &name) | |
Construct a new unique name instance from the given name string. | |
Name (const char *name) | |
Construct a new unique name from the given null terminated C string. | |
Name (const std::string &name) | |
Construct a new unique name from the given standard string. | |
Name (const Name &other)=default | |
Defaulted copy constructor. | |
Name (Name &&other) noexcept=default | |
Default move constructor. | |
Name & | operator= (const Name &other)=default |
Default copy assignment operator. | |
Name & | operator= (Name &&other) noexcept=default |
Default move assignment operator. | |
bool | operator== (const Name &other) const |
Compare to other. Considered equal if the identifier is the same. | |
const std::string & | getName () const |
Get the string name. This can be empty, even in valid instances of Name. | |
const char * | c_str () const |
Gets the name as a null-terminated string. | |
size_t | getId () const |
Get the unique identifier of this name. | |
Represents an unique name.
Stores the hash of the string given internally to use as basis for comparisons.
|
default |
Default constructor.
|
inline |
Construct a new unique name instance from the given name string.
The hash of the given name will be calculated and stored in this instance.
References Cogs::hash().
|
inline |
Construct a new unique name from the given null terminated C string.
|
inline |
Construct a new unique name from the given standard string.
|
default |
Defaulted copy constructor.
|
defaultnoexcept |
Default move constructor.
|
inline |
Gets the name as a null-terminated string.
|
inline |
Get the unique identifier of this name.
Referenced by Cogs::Reflection::TypeDatabase::getType().
|
inline |
Get the string name. This can be empty, even in valid instances of Name.
Default copy assignment operator.
Default move assignment operator.
|
inline |
Compare to other. Considered equal if the identifier is the same.