12 #ifndef __COMMON_ADDONS_MANAGER_H__ 13 #define __COMMON_ADDONS_MANAGER_H__ 55 virtual void Unregister(
const AddonId &
id) = 0;
62 virtual std::shared_ptr<Addon> GetAddon(
const AddonId &
id)
const = 0;
64 virtual std::shared_ptr<Addon>
GetAddon(
const char id[])
const 72 template <
class AddonClass>
73 typename std::shared_ptr<AddonClass> GetAddon(
const AddonId &
id)
const;
78 template <
class AddonClass>
79 typename std::shared_ptr<AddonClass> GetAddon(
const char id[])
const;
85 virtual void Start() = 0;
88 virtual void Stop() = 0;
90 virtual const Logger::SharedPtr &
GetLogger()
const {
return Logger; }
103 template <
class AddonClass>
106 return std::dynamic_pointer_cast<AddonClass>(GetAddon(
id));
109 template <
class AddonClass>
112 return std::dynamic_pointer_cast<AddonClass>(GetAddon(
AddonId(
id)));
118 #endif // __COMMON_ADDONS_MANAGER_H__
virtual const Logger::SharedPtr & GetLogger() const
virtual std::shared_ptr< Addon > GetAddon(const char id[]) const
Addon interface definition GNU LGPL.
virtual std::shared_ptr< Addon > GetAddon(const AddonId &id) const =0
getting addon by id
AddonsManager::UniquePtr CreateAddonsManager(const Common::Logger::SharedPtr &logger)
Get instance of addons core.
#define DEFINE_CLASS_POINTERS(ClassName)
Exception declarations GNU LGPL.
AddonsManager(const Logger::SharedPtr &logger)