EntropyCanvas::Schema
EntropyCanvas::Schema
Section titled “EntropyCanvas::Schema”Classes
Section titled “Classes”| Name | |
|---|---|
| class | EntropyCanvas::Schema::TypeInfo Runtime type information container with field introspection. |
| struct | EntropyCanvas::Schema::TypeID A cross-platform type identifier with stable hashing and comparison. |
| struct | EntropyCanvas::Schema::Result Result type for operations that may fail. |
| struct | EntropyCanvas::Schema::PropertyDefinition Property definition within a component schema. |
| struct | EntropyCanvas::Schema::FieldInfo Information about a reflected field in a type. |
| class | EntropyCanvas::Schema::ComponentSchemaRegistry Thread-safe registry for component schemas. |
| struct | EntropyCanvas::Schema::ComponentSchema Component schema definition. |
| Name | |
|---|---|
| enum class | PropertyType { } Property type enumeration. |
| using PropertyHash | ComponentTypeHash Type alias for component type identification. |
Functions
Section titled “Functions”| Name | |
|---|---|
| std::optional< PropertyType > | typeIdToPropertyType(TypeID typeId) Map a TypeID from the reflection system to a PropertyType for networking. |
| size_t | registerBuiltinSchemas(ComponentSchemaRegistry & registry) Register all built-in Canvas component schemas with a registry. |
| size_t | propertyTypeSize(PropertyType type) Get the size in bytes of a PropertyType. |
| ComponentTypeHash | getTransformTypeHash() |
| const Result< ComponentSchema > & | getTransformSchema() Get the Transform component schema (cached, reflection-based). |
| ComponentTypeHash | getRotatorTypeHash() |
| const Result< ComponentSchema > & | getRotatorSchema() Get the Rotator component schema (cached, reflection-based). |
| ComponentTypeHash | getReflectionProbeTypeHash() |
| const Result< ComponentSchema > & | getReflectionProbeSchema() Get the ReflectionProbe component schema (cached, reflection-based). |
| ComponentTypeHash | getRainbowShiftTypeHash() |
| const Result< ComponentSchema > & | getRainbowShiftSchema() Get the RainbowShift component schema (cached, reflection-based). |
| ComponentTypeHash | getMeshTypeHash() |
| const Result< ComponentSchema > & | getMeshSchema() Get the Mesh component schema (cached, reflection-based). |
| ComponentTypeHash | getLightTypeHash() |
| const Result< ComponentSchema > & | getLightSchema() Get the Light component schema (cached, reflection-based). |
| ComponentTypeHash | getLightProbeTypeHash() |
| const Result< ComponentSchema > & | getLightProbeSchema() Get the LightProbe component schema (cached, reflection-based). |
| ComponentTypeHash | getCameraTypeHash() |
| const Result< ComponentSchema > & | getCameraSchema() Get the Camera component schema (cached, reflection-based). |
| std::vector< Result< ComponentSchema > > | getAllBuiltinSchemas() Get all built-in component schemas for the Canvas ecosystem. |
| template <typename T > TypeID | createTypeId() |
| template <typename T > Result< ComponentSchema > | createSchemaFromReflection() Generate a ComponentSchema from a reflected type T. |
Attributes
Section titled “Attributes”| Name | |
|---|---|
| uint32_t | kSchemaVersion |
| const char * | kAppId |
Types Documentation
Section titled “Types Documentation”enum PropertyType
Section titled “enum PropertyType”| Enumerator | Value | Description |
|---|
Property type enumeration.
Matches the PropertyType enum in entropy.capnp
using ComponentTypeHash
Section titled “using ComponentTypeHash”using EntropyEngine::Networking::ComponentTypeHash = PropertyHash;Type alias for component type identification.
ComponentTypeHash identifies a component type across applications. Computed from appId, componentName, schemaVersion, and structural hash.
Uses the same 128-bit hash structure as PropertyHash for consistency.
Functions Documentation
Section titled “Functions Documentation”function typeIdToPropertyType
Section titled “function typeIdToPropertyType”inline std::optional< PropertyType > typeIdToPropertyType( TypeID typeId)Map a TypeID from the reflection system to a PropertyType for networking.
Returns nullopt if the type is not supported for network serialization.
function registerBuiltinSchemas
Section titled “function registerBuiltinSchemas”inline size_t registerBuiltinSchemas( ComponentSchemaRegistry & registry)Register all built-in Canvas component schemas with a registry.
Parameters:
- registry The ComponentSchemaRegistry to populate
Return: Number of schemas successfully registered
function propertyTypeSize
Section titled “function propertyTypeSize”inline size_t propertyTypeSize( PropertyType type)Get the size in bytes of a PropertyType.
function getTransformTypeHash
Section titled “function getTransformTypeHash”inline ComponentTypeHash getTransformTypeHash()function getTransformSchema
Section titled “function getTransformSchema”inline const Result< ComponentSchema > & getTransformSchema()Get the Transform component schema (cached, reflection-based).
function getRotatorTypeHash
Section titled “function getRotatorTypeHash”inline ComponentTypeHash getRotatorTypeHash()function getRotatorSchema
Section titled “function getRotatorSchema”inline const Result< ComponentSchema > & getRotatorSchema()Get the Rotator component schema (cached, reflection-based).
function getReflectionProbeTypeHash
Section titled “function getReflectionProbeTypeHash”inline ComponentTypeHash getReflectionProbeTypeHash()function getReflectionProbeSchema
Section titled “function getReflectionProbeSchema”inline const Result< ComponentSchema > & getReflectionProbeSchema()Get the ReflectionProbe component schema (cached, reflection-based).
function getRainbowShiftTypeHash
Section titled “function getRainbowShiftTypeHash”inline ComponentTypeHash getRainbowShiftTypeHash()function getRainbowShiftSchema
Section titled “function getRainbowShiftSchema”inline const Result< ComponentSchema > & getRainbowShiftSchema()Get the RainbowShift component schema (cached, reflection-based).
function getMeshTypeHash
Section titled “function getMeshTypeHash”inline ComponentTypeHash getMeshTypeHash()function getMeshSchema
Section titled “function getMeshSchema”inline const Result< ComponentSchema > & getMeshSchema()Get the Mesh component schema (cached, reflection-based).
function getLightTypeHash
Section titled “function getLightTypeHash”inline ComponentTypeHash getLightTypeHash()function getLightSchema
Section titled “function getLightSchema”inline const Result< ComponentSchema > & getLightSchema()Get the Light component schema (cached, reflection-based).
function getLightProbeTypeHash
Section titled “function getLightProbeTypeHash”inline ComponentTypeHash getLightProbeTypeHash()function getLightProbeSchema
Section titled “function getLightProbeSchema”inline const Result< ComponentSchema > & getLightProbeSchema()Get the LightProbe component schema (cached, reflection-based).
function getCameraTypeHash
Section titled “function getCameraTypeHash”inline ComponentTypeHash getCameraTypeHash()function getCameraSchema
Section titled “function getCameraSchema”inline const Result< ComponentSchema > & getCameraSchema()Get the Camera component schema (cached, reflection-based).
function getAllBuiltinSchemas
Section titled “function getAllBuiltinSchemas”inline std::vector< Result< ComponentSchema > > getAllBuiltinSchemas()Get all built-in component schemas for the Canvas ecosystem.
Return: Vector of Result
function createTypeId
Section titled “function createTypeId”template <typename T >inline TypeID createTypeId()function createSchemaFromReflection
Section titled “function createSchemaFromReflection”template <typename T >Result< ComponentSchema > createSchemaFromReflection()Generate a ComponentSchema from a reflected type T.
Template Parameters:
- T Component type with reflection metadata
Return: Result containing the generated schema, or error if generation fails
Uses ENTROPY_REGISTER_TYPE and ENTROPY_FIELD metadata to automatically build property definitions with correct names, types, and offsets.
Attributes Documentation
Section titled “Attributes Documentation”variable kSchemaVersion
Section titled “variable kSchemaVersion”uint32_t kSchemaVersion = 1;variable kAppId
Section titled “variable kAppId”const char * kAppId = "CanvasEngine";Updated on 2026-01-26 at 17:14:35 -0500