-
首页
-
C4D R23.110 C++ SDK
#include <apibaseid.h>
详细描述
LiteralId
is used as base class of
Id
. It may only be used for strings such as string literals which have a longer lifetime than the
LiteralId
object itself. The benefit is that
LiteralId
is a literal type and has a trivial destructor.
构造函数 & 析构函数文档编制
◆
LiteralId()
[1/9]
◆
LiteralId()
[2/9]
◆
LiteralId()
[3/9]
◆
LiteralId()
[4/9]
◆
LiteralId()
[5/9]
◆
LiteralId()
[6/9]
◆
LiteralId()
[7/9]
constexpr
LiteralId
|
(
|
bool
|
dummy
,
|
|
|
const T &
|
decl
|
|
)
|
|
|
|
constexpr
|
◆
LiteralId()
[8/9]
◆
LiteralId()
[9/9]
成员函数文档编制
◆
operator=()
[1/2]
◆
operator=()
[2/2]
◆
operator==()
◆
operator<()
◆
MAXON_OPERATOR_COMPARISON()
◆
Compare()
Compares two
Id
objects using the lexicographic order.
-
参数
-
-
返回
-
See COMPARERESULT.
◆
GetHashCode()
[1/2]
constexpr
HashInt
GetHashCode
|
(
|
|
)
|
const
|
|
constexpr
|
◆
IsEmpty()
Checks if the
Id
is empty.
-
返回
-
True if the
Id
contains a nullptr as c-string.
◆
IsPopulated()
Bool
IsPopulated
|
(
|
|
)
|
const
|
Checks if this
Id
contains anything.
-
返回
-
True if the ID contains a c-string.
◆
GetCString()
const
Char
* GetCString
|
(
|
|
)
|
const
|
Returns the internal c-string. No copy is made.
-
返回
-
Internal string.
◆
GetCStringLength()
Int
GetCStringLength
|
(
|
|
)
|
const
|
Returns the length of the internal c-string. This function doesn't have to scan the string, because the length is directly available in the
Id
.
-
返回
-
Length of internal string.
◆
ToString()
Returns a readable string of the content.
-
参数
-
[in]
|
formatStatement
|
Nullptr or additional formatting instruction. Currently no additional formatting instructions are supported.
|
-
返回
-
The converted result.
◆
ToCString()
◆
Get()
◆
operator const Id &()
operator const
Id
&
|
(
|
|
)
|
const
|
◆
UsesRefCountedCString()
Bool
UsesRefCountedCString
|
(
|
|
)
|
const
|
Returns true if this
Id
uses a
RefCountedCString
. Otherwise, the
Id
uses a global c-string which is assumed to persist at least as long as the
Id
.
-
返回
-
True if the
Id
uses a
RefCountedCString
.
◆
GetHashCode()
[2/2]
static constexpr
HashInt
GetHashCode
|
(
|
const
Char
*
|
str
|
)
|
|
|
static
constexpr
|
Friends And Related Function Documentation
◆
EntityBase
friend class EntityBase
|
friend
|
Member Data Documentation
◆
MAX_LENGTH_EXPONENT
const
Int
MAX_LENGTH_EXPONENT
static
|
|
◆
LOW_HASH_MASK
const
UInt
LOW_HASH_MASK
static
|
|
Mask for the lower bits of the hash (the part which corresponds to the hash code of the string).
◆
RC_STRING_BIT
Bit position in _hash of the bit which is set when the
Id
uses a
RefCountedCString
.
◆
RC_STRING_MASK
const
UInt
RC_STRING_MASK
|
|
static
protected
|
Mask to get the
RC_STRING_BIT
from _hash.
◆
HASH_MASK
Mask to get the hash code from _hash.
◆
MAX_LENGTH
const
Int
MAX_LENGTH
static
|
|
◆
_value
C-string identifier. If the
RC_STRING_BIT
is set in _hash, this actually points to the _string part of a
RefCountedCString
.
◆
_hash
Combination of hash code (lower bits), then a bit at
RC_STRING_BIT
and finally the string length (MAX_LENGTH_EXPONENT bits). Use
HASH_MASK
to mask out the
RC_STRING_BIT
.