#include <apibaseid.h>
Id represents an identifier consisting of a c-string. Such identifiers are used mainly to identify entities such as interfaces, components, classes, registries, entries, modules or published objects.
公共成员函数 |
|
| constexpr | Id () |
| Id (const volatile Char *str) | |
| template<UInt N> | |
| constexpr | Id (const Char (&str)[N]) |
| Id ( Id &&other) | |
| Id (const Id &other) | |
| ~Id () | |
| void | 重置 () |
| MAXON_OPERATOR_MOVE_ASSIGNMENT ( Id ) | |
| Id & | operator= (const Id &other) |
| ResultMem | Init (const Char *str, Bool copyString) |
| ResultMem | Init (const Block < const Char > &str) |
| ResultMem | Init (const CString &str) |
| ResultMem | Init (const String &str) |
| void | Init (const InternedId &id) |
| void | Init (const RefCountedCString *str) |
Public Member Functions inherited from
LiteralId
|
|
| constexpr | LiteralId () |
| LiteralId (const LiteralId &)=default | |
| MAXON_IMPLICIT | LiteralId (const Id &)=delete |
| LiteralId & | operator= (const LiteralId &)=default |
| LiteralId & | operator= (const Id &)=delete |
| template<UInt N> | |
| constexpr | LiteralId (const Char (&str)[N]) |
| Bool | operator== (const LiteralId &other) const |
| Bool | operator< (const LiteralId &other) const |
| MAXON_OPERATOR_COMPARISON ( LiteralId ) | |
| COMPARERESULT | 比较 (const LiteralId &other) const |
| constexpr HashInt | GetHashCode () const |
| Bool | IsEmpty () const |
| Bool | IsPopulated () const |
| const Char * | GetCString () const |
| Int | GetCStringLength () const |
| String | ToString (const FormatStatement *formatStatement=nullptr) const |
| CString | ToCString () const |
| Block < const Char > | ToBlock () const |
| const Id & | Get () const |
| operator const Id & () const | |
| Bool | UsesRefCountedCString () const |
| template<UInt N> | |
| constexpr | LiteralId (bool dummy, const Char (&str)[N]) |
| constexpr | LiteralId (bool dummy, const LiteralId & src ) |
| template<typename T , typename = typename T::DeclarationHelper> | |
| constexpr | LiteralId (bool dummy, const T &decl) |
静态公共成员函数 |
|
| static const Id & | NullValue () |
Static Public Member Functions inherited from
LiteralId
|
|
| static constexpr HashInt | GetHashCode (const Char *str) |
私有成员函数 |
|
| Id (const CString &)=delete | |
| const RefCountedCString * | GetRCString () const |
Additional Inherited Members |
|
Static Public Attributes inherited from
LiteralId
|
|
| static const Int | MAX_LENGTH_EXPONENT |
| static const UInt | LOW_HASH_MASK |
| static const Int | MAX_LENGTH |
Protected Member Functions inherited from
LiteralId
|
|
| constexpr | LiteralId (const Char *value, UInt hash) |
| LiteralId ( ENUM_DONT_INITIALIZE ) | |
Protected Attributes inherited from
LiteralId
|
|
| const Char * | _value |
| UInt | _hash |
Static Protected Attributes inherited from
LiteralId
|
|
| static const Int | RC_STRING_BIT |
| static const UInt | RC_STRING_MASK |
| static const UInt | HASH_MASK |
|
constexpr |
Constructs a null Id . The internal c-string will be nullptr.
|
explicit |
Constructs an Id for a given c-string. str is used directly for the internal c-string pointer. It is assumed that the c-string exists at least as long as the constructed Id .
| [in] | str | Identifier as c-string, may be nullptr. This will always be used directly, i.e., no copy is made. |
|
explicit constexpr |
| Id | ( | Id && | other | ) |
Constructs an Id by moving the values from another Id .
| [in] | other | Another Id to move from. |
| Id | ( | const Id & | other | ) |
Copy constructs an Id from another Id .
| [in] | other | Another Id to copy from. |
| ~ Id | ( | ) |
Destructs the Id . If the Id uses a RefCountedCString , the reference will be removed.
|
explicit private delete |
|
static |
| void Reset | ( | ) |
Resets the Id . Afterwards, its internal c-string will be nullptr.
| MAXON_OPERATOR_MOVE_ASSIGNMENT | ( | Id | ) |
| Id & operator= | ( | const Id & | other | ) |
| ResultMem Init | ( | const Char * | str , |
| Bool | copyString | ||
| ) |
Sets this Id to a new value. If copyString is false, str is used directly for the internal c-string pointer, and it is assumed that the c-string exists at least as long as this Id . Otherwise, if copyString is true, a RefCountedCString is created for str and used for the internal c-string.
| [in] | str | Identifier as c-string, may be nullptr. |
| [in] | copyString | If true, a copy of str is made at first (as a RefCountedCString ). |
| ResultMem Init | ( | const Block < const Char > & | str | ) |
Sets this Id to str. A RefCountedCString is created for str and used for the internal c-string.
| [in] | str | Identifier as a block of characters (no null termination required). |
| ResultMem Init | ( | const CString & | str | ) |
Sets this Id to str. A RefCountedCString is created for str and used for the internal c-string.
| [in] | str | Identifier as CString . |
| ResultMem Init | ( | const String & | str | ) |
Sets this Id to str.
| [in] | str | Identifier as String . |
| void Init | ( | const InternedId & | id | ) |
Sets this Id to id.
| [in] | id | Interned Id . |
| void Init | ( | const RefCountedCString * | str | ) |
Sets this Id 到 RefCountedCString .
| [in] | str | Identifier as RefCountedCString . |
|
private |