EntropyCanvas::ComponentSchemaService
EntropyCanvas::ComponentSchemaService
Section titled “EntropyCanvas::ComponentSchemaService”Service for managing component schema lifecycle and caching. More…
#include <ComponentSchemaService.h>
Inherits from EntropyEngine::Core::EntropyService, EntropyEngine::Core::EntropyObject
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| ~ComponentSchemaService() override =default | |
| virtual const char * | version() const override |
| virtual void | unload() override |
| virtual EntropyEngine::Core::TypeSystem::TypeID | typeId() const override |
| virtual void | stop() override |
| virtual void | start() override |
| size_t | schemaCount() const Get number of registered schemas. |
| EntropyEngine::Networking::ComponentSchemaRegistry * | registry() Get the underlying registry for low-level access. |
| const EntropyEngine::Networking::ComponentSchemaRegistry * | registry() const |
| bool | registerSchema(const EntropyEngine::Networking::ComponentSchema & schema) Register a schema (returns false if hash already exists). |
| ComponentSchemaService & | operator=(const ComponentSchemaService & ) =delete |
| virtual const char * | name() const override |
| virtual void | load() override |
| virtual const char * | id() const override |
| bool | hasSchema(const EntropyEngine::Networking::ComponentTypeHash & hash) const Check if a schema is registered. |
| std::optional< EntropyEngine::Networking::ComponentSchema > | getSchema(const EntropyEngine::Networking::ComponentTypeHash & hash) const Lookup schema by hash - THE only way. |
| EntropyEngine::Networking::ComponentTypeHash | getBuiltinHash(ComponentType type) const Get hash for a builtin component type. |
| ComponentSchemaService() =default | |
| ComponentSchemaService(const ComponentSchemaService & ) =delete |
Additional inherited members
Section titled “Additional inherited members”Public Functions inherited from EntropyEngine::Core::EntropyService
| Name | |
|---|---|
| ~EntropyService() override =default | |
| ServiceState | state() const |
| virtual std::vector< TypeSystem::TypeID > | dependsOnTypes() const |
| virtual std::vector< std::string > | dependsOn() const |
| virtual const char * | className() const override Runtime class name for diagnostics and reflection. |
Protected Functions inherited from EntropyEngine::Core::EntropyService
| Name | |
|---|---|
| void | setState(ServiceState s) |
Friends inherited from EntropyEngine::Core::EntropyService
| Name | |
|---|---|
| class | EntropyServiceRegistry |
Protected Classes inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| struct | HandleCore Optional handle identity stamped by an owner/registry. |
Public Functions inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| virtual | ~EntropyObject() =default |
| virtual const TypeSystem::TypeInfo * | typeInfo() const Optional richer type information; may be null. |
| bool | tryRetain() const Attempts to retain only if the object is still alive. |
| virtual std::string | toString() const Human-readable short string (class@ptr by default). |
| void | retain() const Increments the reference count. |
| void | release() const Decrements the reference count and deletes when it reaches zero. |
| uint32_t | refCount() const Current reference count (approximate under contention). |
| bool | hasHandle() const |
| template <class OwnerT > OwnerT * | handleOwnerAs() const Returns the stamped owner pointer cast to the requested type. |
| const void * | handleOwner() const |
| uint32_t | handleIndex() const |
| uint64_t | handleId() const |
| uint32_t | handleGeneration() const |
| WeakControlBlock * | getWeakControlBlock() const Lazily retrieves or creates the weak control block. |
| virtual std::string | description() const Long-form description; defaults to toString(). |
| virtual std::string | debugString() const Debug-oriented string including refcount and handle when present. |
| virtual const char * | className() const Runtime class name for diagnostics and reflection. |
| virtual uint64_t | classHash() const Stable type hash for cross-language identification. |
| EntropyObject() =default | |
| EntropyObject(EntropyObject && ) =delete | |
| EntropyObject(const EntropyObject & ) =delete |
Protected Functions inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| void | _setHandleIdentity(void * owner, uint32_t index, uint32_t generation) |
| void | _clearHandleIdentity() |
Protected Attributes inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| std::atomic< WeakControlBlock * > | _weakBlock Lazily allocated control block for weak refs. |
| std::atomic< uint32_t > | _refCount Thread-safe retain/release counter. |
| struct EntropyEngine::Core::EntropyObject::HandleCore | _handle |
Friends inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| struct | HandleAccess |
Detailed Description
Section titled “Detailed Description”class EntropyCanvas::ComponentSchemaService;Service for managing component schema lifecycle and caching.
All schema lookups MUST go through this service. Schemas are created once during load() and cached by their ComponentTypeHash.
Public Functions Documentation
Section titled “Public Functions Documentation”function ~ComponentSchemaService
Section titled “function ~ComponentSchemaService”~ComponentSchemaService() override =defaultfunction version
Section titled “function version”inline virtual const char * version() const overrideReimplements: EntropyEngine::Core::EntropyService::version
function unload
Section titled “function unload”virtual void unload() overrideReimplements: EntropyEngine::Core::EntropyService::unload
function typeId
Section titled “function typeId”inline virtual EntropyEngine::Core::TypeSystem::TypeID typeId() const overrideReimplements: EntropyEngine::Core::EntropyService::typeId
function stop
Section titled “function stop”inline virtual void stop() overrideReimplements: EntropyEngine::Core::EntropyService::stop
function start
Section titled “function start”inline virtual void start() overrideReimplements: EntropyEngine::Core::EntropyService::start
function schemaCount
Section titled “function schemaCount”inline size_t schemaCount() constGet number of registered schemas.
function registry
Section titled “function registry”inline EntropyEngine::Networking::ComponentSchemaRegistry * registry()Get the underlying registry for low-level access.
Return: Pointer to owned registry, or nullptr if not loaded
Use this for advanced features like structural hash lookup, public/private filtering, or thread-safe concurrent access.
function registry
Section titled “function registry”inline const EntropyEngine::Networking::ComponentSchemaRegistry * registry() constfunction registerSchema
Section titled “function registerSchema”bool registerSchema( const EntropyEngine::Networking::ComponentSchema & schema)Register a schema (returns false if hash already exists).
Parameters:
- schema The schema to register
Return: true if registered, false if hash collision
function operator=
Section titled “function operator=”ComponentSchemaService & operator=( const ComponentSchemaService &) =deletefunction name
Section titled “function name”inline virtual const char * name() const overrideReimplements: EntropyEngine::Core::EntropyService::name
function load
Section titled “function load”virtual void load() overrideReimplements: EntropyEngine::Core::EntropyService::load
function id
Section titled “function id”inline virtual const char * id() const overrideReimplements: EntropyEngine::Core::EntropyService::id
function hasSchema
Section titled “function hasSchema”bool hasSchema( const EntropyEngine::Networking::ComponentTypeHash & hash) constCheck if a schema is registered.
Parameters:
- hash Component type hash
Return: true if registered
function getSchema
Section titled “function getSchema”std::optional< EntropyEngine::Networking::ComponentSchema > getSchema( const EntropyEngine::Networking::ComponentTypeHash & hash) constLookup schema by hash - THE only way.
Parameters:
- hash Component type hash
Return: Optional schema if found
function getBuiltinHash
Section titled “function getBuiltinHash”EntropyEngine::Networking::ComponentTypeHash getBuiltinHash( ComponentType type) constGet hash for a builtin component type.
Parameters:
- type Component type enum
Return: Type hash, or null hash if not found
Convenience method for built-in types. Uses internal mapping.
function ComponentSchemaService
Section titled “function ComponentSchemaService”ComponentSchemaService() =defaultfunction ComponentSchemaService
Section titled “function ComponentSchemaService”ComponentSchemaService( const ComponentSchemaService &) =deleteUpdated on 2026-01-26 at 17:14:35 -0500