#include <Pt/Cosmo/Component.h>
Component base class.
More...
Inherited by ComponentManager, and Main.
|
|
| Component () |
| | Constructor.
|
|
| Component (const Component &)=delete |
| | No copy constructor.
|
|
virtual | ~Component () |
| | Destructor.
|
|
Component & | operator= (const Component &)=delete |
| | No copy assignment.
|
| void | init (const IComponentType *type, const IComponentDeclaration *decl) |
| | Initializes the component.
|
| bool | hasFeatureId (const char *featureId) const |
| | Returns true if the given feature ID is implemented.
|
|
const char * | classId () const |
| | Returns the class ID.
|
|
template<typename I> |
| I * | queryInterface () |
| | Returns the interface or null if not available.
|
All Cosmo components derive from Component. A component exposes its capabilities through interfaces derived from IUnknown that are discovered via queryInterface().
◆ init()
Called by the component plugin after creation. Assigns the component type and declaration, then invokes onInitialize().
- Parameters
-
| type | The component type providing interface metadata. |
| decl | The instance declaration from the manifest. |
◆ hasFeatureId()
| bool hasFeatureId |
( |
const char * | featureId | ) |
const |
- Parameters
-
| featureId | The feature ID to check. |
◆ onInitialize()
Override to perform setup that requires access to the instance declaration.
- Parameters
-
| decl | The instance declaration from the manifest. |