27 #ifndef COSMO_COMPONENT_PLUGIN_INTERFACE_H
28 #define COSMO_COMPONENT_PLUGIN_INTERFACE_H
30 #include <Pt/Cosmo/ComponentMode.h>
31 #include <Pt/Cosmo/IComponentType.h>
32 #include <Pt/Cosmo/IEnumerable.h>
39 class IComponentManager;
70 const char*
info()
const;
118 #include <Pt/Cosmo/Component.h>
145 component->
init(
this, decl);
Core module.
Definition: Allocator.h:33
virtual void onDetach(IComponentManager &cm)=0
The plugin is detached from a component manager.
virtual Component * onCreate()=0
Creates a component instance.
void init(const IComponentType *type, const IComponentDeclaration *decl)
Initializes the component.
virtual void onAttach(IComponentManager &cm, const std::string &instance)=0
The plugin is attached to a component manager.
Component base class.
Definition: Component.h:52
virtual void onDetach(IComponentManager &cm, const std::string &instance)=0
The plugin is detached from a component manager.
void destroy(Component *instance)
Destroys a component instance.
Definition: IComponentPlugin.h:150
virtual ComponentMode onGetMode() const =0
Returns the component mode.
Component interface query.
Definition: IComponentType.h:50
const IEnumerable< const char * > & dependencies() const
Returns the feature IDs of the dependencies.
Definition: IComponentPlugin.h:124
Component plugin interface.
Definition: IComponentPlugin.h:51
virtual void onDestroy(Component *instance)=0
Destroys a component instance.
Component manager interface.
Definition: IComponentManager.h:55
virtual const char * onGetInfo() const =0
Returns the info string of the component.
virtual ~IComponentPlugin()
Destructor.
Definition: IComponentPlugin.h:57
const char * info() const
Returns the info string of the component.
Definition: IComponentPlugin.h:136
Component flags.
Definition: ComponentMode.h:45
Component instance declaration.
Definition: IComponentDeclaration.h:45
virtual const IEnumerable< const char * > & onGetDependencies() const =0
Returns the feature IDs of the depencies.
Component * create(const IComponentDeclaration *decl)
Creates a component instance.
Definition: IComponentPlugin.h:142
ComponentMode mode() const
Returns the component mode.
Definition: IComponentPlugin.h:130