30 #include <boost/any.hpp> 81 const std::string get_plugin_names()
const;
84 const std::set<std::string> get_set()
const;
88 const_iterator begin()
const;
91 const_iterator end()
const;
99 bool add_plugin(PInterface plugin);
108 void add_plugin_internal(PInterface plugin);
132 virtual void do_initialise();
134 void do_add_dependend_handlers(
HandlerHelpMap& handler_map)
const;
136 std::vector<PPluginModule> m_modules;
137 CPluginMap m_plugins;
139 virtual void do_print_short_help(std::ostream& os)
const;
140 virtual void do_print_help(std::ostream& os)
const;
141 virtual void do_get_xml_help(
CXMLElement& root)
const;
143 static const char *
const m_help;
156 template <
typename T>
178 static const T& instance();
180 static bool add_plugin(
typename T::PInterface p);
186 static const T* pointer();
199 static T& do_instance(
bool require_initialization);
202 static bool m_is_created;
203 static CMutex m_initialization_mutex;
204 static std::atomic<bool> m_is_initialized;
I Interface
typedef for the plug-in interface provided by the class
the singleton that a plug-in handler really is
std::map< std::string, PInterface > CPluginMap
a map containing the names and the available plug-ins
T::const_iterator const_iterator
iterator to iterator over the actual plug-ins
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
std::map< std::string, const CPluginHandlerBase * > HandlerHelpMap
A map that is used to collect the plug-in handlers used in a program.
T Instance
The instance of the plugin handler.
The base class for all plugin handlers.
std::shared_ptr< I > PInterface
CPluginMap::const_iterator const_iterator
the iterator to walk over the available plug-ins
This class implements a facade for the xml Element.
static CMutex m_creation_mutex
T::CPluginMap::value_type value_type
the name,plug-in pair
The basic template of all plugin handlers.
#define NS_MIA_END
conveniance define to end the mia namespace