#include <corenodes_helpers.h>
IdBuilder
can be used to build identifiers for instantiations of generic core nodes. For example the generic multiplication core node "net.maxon.corenode.mul" has instantiations for several data types such as "net.maxon.corenode.mul<int64>" for the type Int64. The id of the instantiation can be obtained with an
IdBuilder
by writing
{
IdBuilder
("net.maxon.corenode.mul").
Append<Int>()
} as in this example code:
The constructor and Append functions of IdBuilder don't return errors, a potential out-of-memory error is postponed to the final call of ToId() or ToCString() .
公共成员函数 |
|
IdBuilder (const Char *base) | |
IdBuilder (const LiteralId &base) | |
IdBuilder && | Append (const DataType &type) |
template<typename... T> | |
IdBuilder && | Append () |
template<Bool B, typename... T> | |
IdBuilder && | Append () |
Result < Id > | ToId () const |
Result < CString > | ToCString () const |
String | ToString (const FormatStatement *formatStatement=nullptr) const |
静态公共成员函数 |
|
template<typename... INSTANTIATIONTYPE, typename BASETYPE > | |
static corenodes::IdBuilder | 创建 (BASETYPE baseId) |
私有成员函数 |
|
IdBuilder ()=default | |
IdBuilder && | AppendImpl () |
template<typename... T> | |
IdBuilder && | AppendImpl (const DataType &type, T... types) |
void | AppendString (const Char *str) |
void | AppendParam (const Char *str) |
void | AppendChar ( Char ch) |
Private Attributes |
|
CString | _name |
Friends |
|
class | IdOrBuilder |
|
explicit |
Constructs a new IdBuilder where base is the part of the id before the instantiation suffix.
[in] | base | The base identifier for this IdBuilder . |
|
explicit |
Constructs a new IdBuilder where base is the part of the id before the instantiation suffix.
[in] | base | The base identifier for this IdBuilder . |
|
private default |
|
static |
Constructs a new IdBuilder based on #baseId with type instantiation suffixes.
INSTANTIATIONTYPE | The instantiation types to append. |
BASETYPE | The type of #baseId (for calling constructor). |
[in] | baseId | The base identifier for this IdBuilder . |
IdBuilder && Append | ( | const DataType & | type | ) |
Appends the identifier of type to the instantiation suffix of this IdBuilder . Angular brackets and commas are appended as needed.
[in] | type | The type to append. |
IdBuilder && Append | ( | ) |
Appends the identifiers of the given types to the instantiation suffix of this IdBuilder . Angular brackets and commas are appended as needed.
T | The types to append. |
IdBuilder && Append | ( | ) |
Appends the identifiers of the given types to the instantiation suffix of this IdBuilder . Angular brackets and commas are appended as needed.
B | A value to append. |
T | The types to append. |
Result < Id > ToId | ( | ) | const |
Returns the constructed identifier of this IdBuilder as an Id . If an error happened during construction, this is reported by the call to this function.
Result < CString > ToCString | ( | ) | const |
Returns the constructed identifier of this IdBuilder 作为 CString . If an error happened during construction, this is reported by the call to this function.
String ToString | ( | const FormatStatement * |
formatStatement
=
nullptr
|
) | const |
Returns a String representation of this @CLASS.
[in] | formatStatement | Nullptr or additional formatting instruction. |
|
private |
|
private |
|
private |
|
private |
|
private |
|
friend |
|
private |