#include <PluginManager.hpp>
|
typedef boost::function1< void, PLUGIN_TYPE * > | PluginRunFunction |
| data type for a function that may be called by the run() method
|
|
typedef boost::function1< boost::uint64_t, const PLUGIN_TYPE * > | PluginStatFunction |
| data type for a function that may be called by the getStat() method
|
|
|
| PluginManager (void) |
| default constructor
|
|
virtual | ~PluginManager () |
| 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, PLUGIN_TYPE *plugin_object_ptr) |
|
void | remove (const std::string &plugin_id) |
|
void | replace (const std::string &plugin_id, PLUGIN_TYPE *plugin_ptr) |
|
PLUGIN_TYPE * | clone (const std::string &plugin_id) |
|
PLUGIN_TYPE * | load (const std::string &plugin_id, const std::string &plugin_type) |
|
PLUGIN_TYPE * | get (const std::string &plugin_id) |
|
const PLUGIN_TYPE * | get (const std::string &plugin_id) const |
|
PionPluginPtr< PLUGIN_TYPE > | getLibPtr (const std::string &plugin_id) const |
|
PLUGIN_TYPE * | find (const std::string &resource) |
|
void | run (PluginRunFunction run_func) |
|
void | run (const std::string &plugin_id, PluginRunFunction run_func) |
|
boost::uint64_t | getStatistic (PluginStatFunction stat_func) const |
|
boost::uint64_t | getStatistic (const std::string &plugin_id, PluginStatFunction stat_func) const |
|
template<typename PLUGIN_TYPE>
class pion::PluginManager< PLUGIN_TYPE >
PluginManager: used to manage a collection of plug-in objects
Definition at line 30 of file PluginManager.hpp.
template<typename PLUGIN_TYPE>
void pion::PluginManager< PLUGIN_TYPE >::add |
( |
const std::string & |
plugin_id, |
|
|
PLUGIN_TYPE * |
plugin_object_ptr |
|
) |
| |
|
inline |
template<typename PLUGIN_TYPE >
template<typename PLUGIN_TYPE >
template<typename PLUGIN_TYPE >
gets the plug-in object associated with a particular plugin_id (exact match)
- Parameters
-
plugin_id | unique identifier associated with the plug-in |
- Returns
- PLUGIN_TYPE* pointer to the matching plug-in object or NULL if not found
Definition at line 286 of file PluginManager.hpp.
References pion::PluginManager< PLUGIN_TYPE >::find().
template<typename PLUGIN_TYPE >
const PLUGIN_TYPE * pion::PluginManager< PLUGIN_TYPE >::get |
( |
const std::string & |
plugin_id | ) |
const |
|
inline |
gets the plug-in object associated with a particular plugin_id (exact match)
- Parameters
-
plugin_id | unique identifier associated with the plug-in |
- Returns
- PLUGIN_TYPE* pointer to the matching plug-in object or NULL if not found
Definition at line 297 of file PluginManager.hpp.
References pion::PluginManager< PLUGIN_TYPE >::find().
template<typename PLUGIN_TYPE >
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
- PionPluginPtr<PLUGIN_TYPE> pointer to the plugin shared library if found
Definition at line 308 of file PluginManager.hpp.
References pion::PluginManager< PLUGIN_TYPE >::find().
template<typename PLUGIN_TYPE >
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 383 of file PluginManager.hpp.
template<typename PLUGIN_TYPE >
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 396 of file PluginManager.hpp.
template<typename PLUGIN_TYPE >
PLUGIN_TYPE * pion::PluginManager< PLUGIN_TYPE >::load |
( |
const std::string & |
plugin_id, |
|
|
const std::string & |
plugin_type |
|
) |
| |
|
inline |
template<typename PLUGIN_TYPE >
template<typename PLUGIN_TYPE>
void pion::PluginManager< PLUGIN_TYPE >::replace |
( |
const std::string & |
plugin_id, |
|
|
PLUGIN_TYPE * |
plugin_ptr |
|
) |
| |
|
inline |
template<typename PLUGIN_TYPE >
template<typename PLUGIN_TYPE >
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 372 of file PluginManager.hpp.
The documentation for this class was generated from the following file: