7#ifndef _UCOM_PLUGIN_HEADER_
8#define _UCOM_PLUGIN_HEADER_
26 vision::IPluginLogging,
27 level_machine<cPlugin,
28 IPlugin::tPluginState,
29 IPlugin::tPluginState::Deinitialized>>
33 static constexpr const tChar*
const DEFAULT_PLUGIN_EXTENSION =
".adtfplugin";
37 adtf::util::cString m_strLabel;
40 cPlugin(
const char* strLabel);
44 cPlugin(cPlugin&& oPlugin) =
delete;
45 cPlugin(
const cPlugin& oPlugin) =
delete;
46 cPlugin& operator=(cPlugin&& oPlugin) =
delete;
47 cPlugin& operator=(
const cPlugin& oPlugin) =
delete;
49 const char* GetLabel()
const override;
52 uint32_t GetBuildType()
const override;
53 tResult SetState(tPluginState eState)
override;
54 tPluginState GetState()
const override;
56 void SetHandle(tHandle hModule)
override;
57 tHandle GetHandle()
const override;
64 void SetLogger(
ILogger* pLogger)
override;
65 void SetLogChannels(util::log::ILogChannel* pFallback, util::log::IThreadLocalLogChannelStack* pStack)
noexcept override;
74 static const std::array<const tNamedVersion, 1> sVersions{{UCOM_VERSION_ID, adtf::ucom::get_ucom_version_information()}};
75 return iterator_adapter<const tNamedVersion, pointer_iterator>::create(&*sVersions.begin(), &*sVersions.begin() + sVersions.size());
80template<
typename PLUGIN_VERSION_TYPE,
typename ...CLASSES>
81class plugin_template:
public cPlugin
89 return PLUGIN_VERSION_TYPE::GetVersions();
92 plugin_template(
const char* strLabel):
100 pClassFactory.
Reset(m_pClassFactory);
105template<
typename PLUGIN_CLASS>
108 template <
typename ...Args>
112 if (_runtime ==
reinterpret_cast<IRuntime*
>(-1))
114 UCOM_GetVersion3(
nullptr,
nullptr,
nullptr,
nullptr);
115 UCOM_LoadPlugin3(
nullptr, 0, 0, 0,
nullptr, 0);
116 UCOM_UnloadPlugin3();
#define UCOM_RESOLVE(...)
Resolve a path to a base class which is inherited multiple times.
Definition adtf_iid.h:46
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Definition result.h:29
Definition logger_intf.h:22
Definition object_intf.h:33
Definition plugin_intf.h:27
Definition runtime_intf.h:104
Definition class_factory.h:26
virtual tResult Reset(const iobject_ptr< T > &i_oOther)=0
Reset this object_ptr<> with the content of another iobject_ptr<>
Base object pointer to realize binary compatible reference counting in interface methods.
Definition object_ptr_intf.h:112
Definition object_ptr.h:384
Namespace for all functionality of the ADTF UCOM SDK provided since v3.0.
Definition test_runtime.h:14
object_ptr< Implementation > make_object_ptr(Args &&... args)
Create an instance of type object_ptr with Implementation as the shared resource.
Definition object_ptr_utilities.h:129
Namespace for the ADTF uCOM SDK.
Definition adtf_system.h:324
ant::iobject_ptr< T > iobject_ptr
Alias always bringing the latest version of ant::iobject_ptr into scope.
Definition object_ptr_intf.h:437
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14
std::function< tResult(adtf::ucom::iobject_ptr< adtf::ucom::IPlugin > &)> _plugin_initialization
Global Plugin initialization method.
std::function< void()> _plugin_deinitialization
Global Plugin deinitialization method.
Adapter for begin and end iterators - usable as return and parameter value in interfaces.
Definition iterator_intf.h:190
Empty struct template to specialize implementations of iterator interfaces.
Definition iterator_intf.h:28
Named version information consisting of the modules name and its adtf_util::tVersion.
Definition class_info_intf.h:22