#include <Pt/Cosmo/IComponentPlugin.h>
Component plugin interface.
More...
Inherits IComponentType.
Inherited by ComponentPlugin< ComponentManager, ComponentManagerFactory >, ComponentPlugin< Main, MainFactory >, and ComponentPlugin< T, Factory >.
|
|
virtual | ~IComponentPlugin () |
| | Destructor.
|
|
const IEnumerable< const char * > & | dependencies () const |
| | Returns the feature IDs of the dependencies.
|
|
ComponentMode | mode () const |
| | Returns the component mode.
|
|
const char * | info () const |
| | Returns the info string of the component.
|
|
Component * | create (const IComponentDeclaration *decl) |
| | Creates a component instance.
|
|
void | destroy (Component *instance) |
| | Destroys a component instance.
|
| bool | hasFeatureId (const char *featureId) const |
| | Returns true if the given feature ID is implemented.
|
|
const IEnumerable< const char * > & | featureIds () const |
| | Returns the implemented feature IDs.
|
|
const char * | classId () const |
| | Returns the class ID of the component.
|
|
template<typename I> |
| bool | hasInterface () const |
| | Returns true if the interface is implemented.
|
| template<typename I> |
| I * | queryInterface (Component &c) const |
| | Returns the interface or null if not implemented.
|
|
|
virtual void | onAttach (IComponentManager &cm, const std::string &instance)=0 |
| | The plugin is attached to a component manager.
|
|
virtual void | onDetach (IComponentManager &cm, const std::string &instance)=0 |
| | The plugin is detached from a component manager.
|
|
virtual void | onDetach (IComponentManager &cm)=0 |
| | The plugin is detached from a component manager.
|
|
virtual const IEnumerable< const char * > & | onGetDependencies () const =0 |
| | Returns the feature IDs of the depencies.
|
|
virtual ComponentMode | onGetMode () const =0 |
| | Returns the component mode.
|
|
virtual const char * | onGetInfo () const =0 |
| | Returns the info string of the component.
|
|
virtual Component * | onCreate ()=0 |
| | Creates a component instance.
|
|
virtual void | onDestroy (Component *instance)=0 |
| | Destroys a component instance.
|
|
virtual bool | onHasFeatureId (const char *featureId) const =0 |
| | Returns true if the given feature ID is implemented.
|
|
virtual const IEnumerable< const char * > & | onGetFeatureIds () const =0 |
| | Returns the implemented feature IDs.
|
|
virtual const char * | onGetClassId () const =0 |
| | Returns the class ID of the component.
|
|
virtual bool | onHasInterface (const std::type_info &ti) const =0 |
| | Returns true if the interface is implemented.
|
|
virtual IUnknown * | onQueryInterface (Component &c, const std::type_info &ti) const =0 |
| | Returns the interface or null if the interface is not implemented.
|
A plugin describes a component class. It provides metadata such as class ID, feature IDs, dependencies, and component mode. The IComponentManager uses plugins to create, initialize and destroy component instances.
◆ hasFeatureId()
| bool hasFeatureId |
( |
const char * | featureId | ) |
const |
|
inherited |
- Parameters
-
| featureId | The feature ID to check. |
◆ queryInterface()
- Parameters
-
| c | The component instance to query. |