The name identifying T across separately built nodes.
More...
The name identifying T across separately built nodes.
A C++ type does not survive compilation in a form two independently built nodes can compare. An exported port carries this name as a type identifier instead. Two exported ports are assumed to carry the same value type if and only if their names are equal.
The SDK names the built-in value types itself:
| Type | Name | Type | Name |
|---|---|---|---|
| void | void | std::uint8_t | u8 |
| bool | bool | std::uint16_t | u16 |
| char | char | std::uint32_t | u32 |
| std::int8_t | i8 | std::uint64_t | u64 |
| std::int16_t | i16 | float | f32 |
| std::int32_t | i32 | double | f64 |
| std::int64_t | i64 | std::string | string |
The integer types use fixed-width spellings so that a name does not vary with the platform's int and long.
Specialize it for your own types in the header that declares them, so every node including that header agrees on the name by construction:
Pick a name unlikely to collide with an unrelated project's type — a dotted path through your organization and package, as above, works well. It must be a non-empty compile-time constant.
| T | The value type being named. |