EntropyEngine::Core::EntropyServiceRegistry
EntropyEngine::Core::EntropyServiceRegistry
Section titled “EntropyEngine::Core::EntropyServiceRegistry”Registry and lifecycle orchestrator for EntropyService instances. More…
#include <EntropyServiceRegistry.h>
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| ~EntropyServiceRegistry() | |
| bool | unregisterService(const TypeSystem::TypeID & tid) Unregister a service by type. |
| template <typename T > bool | unregisterService() |
| void | unloadAll() |
| void | stopAll() |
| void | startAll() |
| size_t | serviceCount() const |
| bool | registerService(RefObject< EntropyService > service) |
| template <typename TService > bool | registerService(RefObject< TService > service) |
| EntropyServiceRegistry & | operator=(const EntropyServiceRegistry & ) =delete |
| EntropyServiceRegistry & | operator=(EntropyServiceRegistry && ) =delete |
| void | loadAll() |
| bool | isValid(const EntropyService * service) const Validate a service is still registered with matching generation. |
| bool | has(const TypeSystem::TypeID & tid) const |
| template <typename T > bool | has() const |
| template <typename T > WeakRef< T > | getWeak() const Get weak reference to service by type. |
| RefObject< EntropyService > | get(const TypeSystem::TypeID & tid) const |
| template <typename T > RefObject< T > | get() const |
| EntropyServiceRegistry() =default | |
| EntropyServiceRegistry(const EntropyServiceRegistry & ) =delete | |
| EntropyServiceRegistry(EntropyServiceRegistry && ) =delete |
Detailed Description
Section titled “Detailed Description”class EntropyEngine::Core::EntropyServiceRegistry;Registry and lifecycle orchestrator for EntropyService instances.
Services are registered and looked up by static TypeID (RTTI-less). The registry can load/start/stop/unload all registered services honoring their declared type dependencies.
Services are stamped with handle identity (owner/index/generation) on registration, enabling generation-based validation and WeakRef support for safe cross-subsystem references.
Public Functions Documentation
Section titled “Public Functions Documentation”function ~EntropyServiceRegistry
Section titled “function ~EntropyServiceRegistry”~EntropyServiceRegistry()function unregisterService
Section titled “function unregisterService”bool unregisterService( const TypeSystem::TypeID & tid)Unregister a service by type.
Return: true if service was found and unregistered
Clears the service’s handle stamp and removes it from the registry. The slot’s generation is incremented to invalidate stale WeakRefs.
function unregisterService
Section titled “function unregisterService”template <typename T >inline bool unregisterService()function unloadAll
Section titled “function unloadAll”void unloadAll()function stopAll
Section titled “function stopAll”void stopAll()function startAll
Section titled “function startAll”void startAll()function serviceCount
Section titled “function serviceCount”inline size_t serviceCount() constfunction registerService
Section titled “function registerService”bool registerService( RefObject< EntropyService > service)function registerService
Section titled “function registerService”template <typename TService >inline bool registerService( RefObject< TService > service)function operator=
Section titled “function operator=”EntropyServiceRegistry & operator=( const EntropyServiceRegistry &) =deletefunction operator=
Section titled “function operator=”EntropyServiceRegistry & operator=( EntropyServiceRegistry &&) =deletefunction loadAll
Section titled “function loadAll”void loadAll()function isValid
Section titled “function isValid”bool isValid( const EntropyService * service) constValidate a service is still registered with matching generation.
function has
Section titled “function has”bool has( const TypeSystem::TypeID & tid) constfunction has
Section titled “function has”template <typename T >inline bool has() constfunction getWeak
Section titled “function getWeak”template <typename T >inline WeakRef< T > getWeak() constGet weak reference to service by type.
Return: WeakRef
Returns a WeakRef that does not prevent service unregistration. Caller must lock() before use and handle the case where service is gone.
function get
Section titled “function get”RefObject< EntropyService > get( const TypeSystem::TypeID & tid) constfunction get
Section titled “function get”template <typename T >inline RefObject< T > get() constfunction EntropyServiceRegistry
Section titled “function EntropyServiceRegistry”EntropyServiceRegistry() =defaultfunction EntropyServiceRegistry
Section titled “function EntropyServiceRegistry”EntropyServiceRegistry( const EntropyServiceRegistry &) =deletefunction EntropyServiceRegistry
Section titled “function EntropyServiceRegistry”EntropyServiceRegistry( EntropyServiceRegistry &&) =deleteUpdated on 2026-01-26 at 16:50:32 -0500