ADTF  3.18.2
plugin_intf.h
Go to the documentation of this file.
1 
8 #ifndef _ADTF_UCOM_ANT_PLUGIN_INTERFACE_INCLUDES_HEADER_
9 #define _ADTF_UCOM_ANT_PLUGIN_INTERFACE_INCLUDES_HEADER_
10 
11 namespace adtf
12 {
13 namespace ucom
14 {
15 namespace ant
16 {
17 
18 class IRuntime;
19 class IClassFactory;
20 
26 class DOEXPORT IPlugin : public IObject
27 {
28 public:
33  ADTF_IID(IPlugin, "plugin.ant.ucom.adtf.iid");
34 
35 public:
37  enum class tPluginState: uint32_t
38  {
39  Deinitialized = 0,
40  Initialized = 1,
41  };
42 
44  enum class tPluginBuildType : uint32_t
45  {
46  Release = 0,
47  Debug = 1
48  };
49 
50 public:
55  virtual const char* GetLabel() const = 0;
56 
61  virtual iterator_adapter<const tNamedVersion,
63 
68  virtual uint32_t GetBuildType() const = 0;
74  virtual tResult SetState(tPluginState eState) = 0;
75 
82  virtual tPluginState GetState() const = 0;
83 
93  virtual tResult GetClassFactory(iobject_ptr<const IClassFactory>& pClassFactory) const = 0;
94 
99  virtual void SetHandle(tHandle hModule) = 0;
100 
110  virtual tHandle GetHandle() const = 0;
111 
112 
113 
114 protected:
116  ~IPlugin() = default;
117 };
118 
119 }//namespace ant
120 
122 using ant::IPlugin;
123 
124 }//namespace ucom
125 }//namespace adtf
126 
127 #endif //_ADTF_UCOM_ANT_PLUGIN_INTERFACE_INCLUDES_HEADER_
tVoid * tHandle
type definition for a handle value (platform and compiler dependent type).
Base class for every interface type within the uCOM.
Definition: object_intf.h:31
Plugin interface.
Definition: plugin_intf.h:27
virtual tHandle GetHandle() const =0
Get native handle.
virtual tPluginState GetState() const =0
Get plugin state.
virtual const char * GetLabel() const =0
Returns a label for the plugin.
virtual tResult SetState(tPluginState eState)=0
Changes the state of the plugin.
virtual void SetHandle(tHandle hModule)=0
Sets the native handle (during loading of the plugin)
virtual tResult GetClassFactory(iobject_ptr< const IClassFactory > &pClassFactory) const =0
Retrieve the class factory of the plugin.
~IPlugin()=default
Protected destructor --> Use implemented Destroy() instead of delete!
tPluginBuildType
lists the several types of plugin states
Definition: plugin_intf.h:45
virtual uint32_t GetBuildType() const =0
Returns the versions of the plugin.
virtual iterator_adapter< const tNamedVersion, pointer_iterator > GetVersions() const =0
Returns the versions of the plugin.
ADTF_IID(IPlugin, "plugin.ant.ucom.adtf.iid")
Marks the IPlugin to be castable with the ucom_cast<>
tPluginState
lists the several types of plugin states
Definition: plugin_intf.h:38
Base object pointer to realize binary compatible reference counting in interface methods.
ant::IClassFactory IClassFactory
Alias always bringing the latest version of ant::IClassFactory into scope.
ant::tNamedVersion tNamedVersion
Alias alwas bringing the latest version of ant::tNamedVersion into scope.
Namespace for entire ADTF SDK.
Adapter for begin and end iterators - usable as return and parameter value in interfaces.
Empty struct template to specialize implementations of iterator interfaces.
Definition: iterator_intf.h:28