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>
52 friend class IComponentManager;
83 virtual void onAttach(IComponentManager& cm,
const std::string& instance) = 0;
87 virtual void onDetach(IComponentManager& cm,
const std::string& instance) = 0;
91 virtual void onDetach(IComponentManager& cm) = 0;
118#include <Pt/Cosmo/Component.h>
145 component->
init(
this, decl);
Component flags.
Definition ComponentMode.h:45
Component base class.
Definition Component.h:52
void init(const IComponentType *type, const IComponentDeclaration *decl)
Initializes the component.
Component instance declaration.
Definition IComponentDeclaration.h:45
Component manager interface.
Definition IComponentManager.h:55
Component plugin interface.
Definition IComponentPlugin.h:51
void destroy(Component *instance)
Destroys a component instance.
Definition IComponentPlugin.h:150
const IEnumerable< const char * > & dependencies() const
Returns the feature IDs of the dependencies.
Definition IComponentPlugin.h:124
virtual ComponentMode onGetMode() const =0
Returns the component mode.
Component * create(const IComponentDeclaration *decl)
Creates a component instance.
Definition IComponentPlugin.h:142
virtual void onDestroy(Component *instance)=0
Destroys a component instance.
ComponentMode mode() const
Returns the component mode.
Definition IComponentPlugin.h:130
virtual const IEnumerable< const char * > & onGetDependencies() const =0
Returns the feature IDs of the depencies.
virtual ~IComponentPlugin()
Destructor.
Definition IComponentPlugin.h:57
virtual const char * onGetInfo() const =0
Returns the info string of the component.
virtual void onDetach(IComponentManager &cm, const std::string &instance)=0
The plugin is detached from a component manager.
virtual Component * onCreate()=0
Creates a component instance.
const char * info() const
Returns the info string of the component.
Definition IComponentPlugin.h:136
virtual void onAttach(IComponentManager &cm, const std::string &instance)=0
The plugin is attached to a component manager.
virtual void onDetach(IComponentManager &cm)=0
The plugin is detached from a component manager.
Component interface query.
Definition IComponentType.h:50
Enumerable interface.
Definition IEnumerable.h:58
Cosmo Component Model.
Definition Api.h:53
Core module.
Definition Allocator.h:33