#include <plugin_manager.hpp>
|
typedef boost::function1< void, PluginType * > | PluginRunFunction |
| data type for a function that may be called by the run() method
|
|
typedef boost::function1< boost::uint64_t, const PluginType * > | PluginStatFunction |
| data type for a function that may be called by the getStat() method
|
|
|
| plugin_manager (void) |
| default constructor
|
|
virtual | ~plugin_manager () |
| default destructor
|
|
void | clear (void) |
| clears all the plug-in objects being managed
|
|
bool | empty (void) const |
| returns true if there are no plug-in objects being managed
|
|
void | add (const std::string &plugin_id, PluginType *plugin_object_ptr) |
|
void | remove (const std::string &plugin_id) |
|
void | replace (const std::string &plugin_id, PluginType *plugin_ptr) |
|
PluginType * | clone (const std::string &plugin_id) |
|
PluginType * | load (const std::string &plugin_id, const std::string &plugin_type) |
|
PluginType * | get (const std::string &plugin_id) |
|
const PluginType * | get (const std::string &plugin_id) const |
|
plugin_ptr< PluginType > | get_lib_ptr (const std::string &plugin_id) const |
|
PluginType * | find (const std::string &resource) |
|
void | run (PluginRunFunction run_func) |
|
void | run (const std::string &plugin_id, PluginRunFunction run_func) |
|
boost::uint64_t | get_statistic (PluginStatFunction stat_func) const |
|
boost::uint64_t | get_statistic (const std::string &plugin_id, PluginStatFunction stat_func) const |
|
template<typename PluginType>
class pion::plugin_manager< PluginType >
plugin_manager: used to manage a collection of plug-in objects
Definition at line 31 of file plugin_manager.hpp.
template<typename PluginType>
void pion::plugin_manager< PluginType >::add |
( |
const std::string & |
plugin_id, |
|
|
PluginType * |
plugin_object_ptr |
|
) |
| |
|
inline |
template<typename PluginType >
template<typename PluginType >
template<typename PluginType >
gets the plug-in object associated with a particular plugin_id (exact match)
- Parameters
-
plugin_id | unique identifier associated with the plug-in |
- Returns
- PluginType* pointer to the matching plug-in object or NULL if not found
Definition at line 262 of file plugin_manager.hpp.
References pion::plugin_manager< PluginType >::find().
template<typename PluginType >
gets the plug-in object associated with a particular plugin_id (exact match)
- Parameters
-
plugin_id | unique identifier associated with the plug-in |
- Returns
- PluginType* pointer to the matching plug-in object or NULL if not found
Definition at line 273 of file plugin_manager.hpp.
References pion::plugin_manager< PluginType >::find().
template<typename PluginType >
gets a smart pointer to the plugin shared library for a particular plugin_id (exact match)
- Parameters
-
plugin_id | unique identifier associated with the plug-in |
- Returns
- plugin_ptr<PluginType> pointer to the plugin shared library if found
Definition at line 284 of file plugin_manager.hpp.
References pion::plugin_manager< PluginType >::find().
template<typename PluginType >
returns a total statistic value summed for every plug-in being managed
- Parameters
-
stat_func | the statistic function to execute for each plug-in object |
Definition at line 359 of file plugin_manager.hpp.
template<typename PluginType >
returns a statistic value for a particular plug-in
- Parameters
-
plugin_id | unique identifier associated with the plug-in |
stat_func | the statistic function to execute |
Definition at line 372 of file plugin_manager.hpp.
template<typename PluginType >
PluginType * pion::plugin_manager< PluginType >::load |
( |
const std::string & |
plugin_id, |
|
|
const std::string & |
plugin_type |
|
) |
| |
|
inline |
template<typename PluginType >
template<typename PluginType>
void pion::plugin_manager< PluginType >::replace |
( |
const std::string & |
plugin_id, |
|
|
PluginType * |
plugin_ptr |
|
) |
| |
|
inline |
template<typename PluginType >
template<typename PluginType >
runs a method for a particular plug-in
- Parameters
-
plugin_id | unique identifier associated with the plug-in |
run_func | the function to execute |
Definition at line 348 of file plugin_manager.hpp.
The documentation for this class was generated from the following file: