#include <Pt/Cosmo/ComponentManager.h>
Default component manager. More...
Inherits Component.
Public Member Functions | |
| ComponentManager () | |
| Constructor. | |
| ~ComponentManager () | |
| Destructor. | |
| void | setModulesDir (const std::string &dir) |
| Set modules search directory. | |
| void | importComponents (const std::string &manifest) |
| Imports all components from manifest. | |
| void | registerComponent (IComponentPlugin &plugin, const std::string &require, const std::string &instanceId) |
| Registers component. | |
| void | load () |
| Loads all registered components. | |
| void | load (const std::string &instanceId) |
| Loads registered component. | |
| void | unload (IComponentPlugin &plugin) |
| Unloads a component plugin. | |
| void | unload (const std::string &instanceId) |
| Unloads a component by instance ID. | |
| const IEnumerable< ComponentInfo > & | components () const |
| Enumerates all components. | |
| void | init (const IComponentType *type, const IComponentDeclaration *decl) |
| Initializes the component. More... | |
| bool | hasFeatureId (const char *featureId) const |
| Returns true if the given feature ID is implemented. More... | |
| const char * | classId () const |
| Returns the class ID. | |
| template<typename I > | |
| I * | queryInterface () |
| Returns the interface or null if not available. | |
Protected Member Functions | |
| virtual void | onInitialize (const IComponentDeclaration &decl) |
| Called when the component is initialized. More... | |
Concrete implementation of IComponentManager. Manages plugin registration, manifest import, dependency resolution, and the component load/unload lifecycle.
|
inherited |
Called by the component plugin after creation. Assigns the component type and declaration, then invokes onInitialize().
| type | The component type providing interface metadata. |
| decl | The instance declaration from the manifest. |
|
inherited |
| featureId | The feature ID to check. |
|
protectedvirtualinherited |
Override to perform setup that requires access to the instance declaration.
| decl | The instance declaration from the manifest. |