#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().
Public Member Functions | |
IdBuilder (const Char *base) | |
IdBuilder (Block< const Char > base) | |
IdBuilder (const LiteralId &base) | |
IdBuilder && | Append (const DataType &type) |
template<typename... T> | |
IdBuilder && | Append () |
template<Bool B, typename... T> | |
IdBuilder && | Append () |
template<typename IDCLASS = Id> | |
Result< IDCLASS > | ToId () const |
Result< CString > | ToCString () const |
String | ToString (const FormatStatement *formatStatement=nullptr) const |
Static Public Member Functions | |
template<typename... INSTANTIATIONTYPE, typename BASETYPE > | |
static corenodes::IdBuilder | Create (BASETYPE baseId) |
Private Member Functions | |
IdBuilder ()=default | |
IdBuilder && | AppendImpl () |
template<typename... T> | |
IdBuilder && | AppendImpl (const DataType &type, T... types) |
void | AppendString (const Char *str) |
void | AppendString (Block< const Char > str) |
void | AppendParam (const Char *str) |
void | AppendChar (Char ch) |
Private Attributes | |
CString | _name |
Friends | |
class | IdOrBuilder |
|
privatedefault |
|
static |
IdBuilder&& Append | ( | ) |
IdBuilder&& Append | ( | ) |
Result<IDCLASS> 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. Method supports both Id and InternedId types.
String ToString | ( | const FormatStatement * | formatStatement = nullptr | ) | const |
|
private |
|
private |
|
private |
|
private |
|
friend |
|
private |