#include <ProtocolFactory.hpp>
Inherits pion::platform::PluginConfig< PluginType >< pion::platform::Protocol >.
Definition at line 37 of file ProtocolFactory.hpp.
Public Member Functions | |
| virtual | ~ProtocolFactory () |
| virtual destructor | |
| ProtocolFactory (const VocabularyManager &vocab_mgr) | |
| ProtocolPtr | getProtocol (const std::string &protocol_id) |
| void | setProtocolConfig (const std::string &protocol_id, const xmlNodePtr config_ptr) |
| std::string | addProtocol (const xmlNodePtr config_ptr) |
| void | removeProtocol (const std::string &protocol_id) |
Static Public Member Functions | |
| static xmlNodePtr | createProtocolConfig (const char *buf, std::size_t len) |
Protected Member Functions | |
| virtual void | addPluginNoLock (const std::string &plugin_id, const std::string &plugin_name, const xmlNodePtr config_ptr) |
Classes | |
| class | ProtocolNotFoundException |
| exception thrown if a Protocol cannot be found More... | |
| pion::platform::ProtocolFactory::ProtocolFactory | ( | const VocabularyManager & | vocab_mgr | ) | [explicit] |
constructs a new ProtocolFactory object
| vocab_mgr | the global manager of Vocabularies |
Definition at line 34 of file ProtocolFactory.cpp.
References pion::platform::ConfigManager::setLogger().
| virtual void pion::platform::ProtocolFactory::addPluginNoLock | ( | const std::string & | plugin_id, | |
| const std::string & | plugin_name, | |||
| const xmlNodePtr | config_ptr | |||
| ) | [inline, protected, virtual] |
adds a new plug-in object (without locking or config file updates). This function must be defined properly for any derived classes that wish to use openPluginConfig().
| plugin_id | unique identifier associated with the plug-in | |
| plugin_name | the name of the plug-in to load (searches plug-in directories and appends extensions) | |
| config_ptr | pointer to a list of XML nodes containing plug-in configuration parameters |
Implements pion::platform::PluginConfig< PluginType >.
Definition at line 119 of file ProtocolFactory.hpp.
References pion::platform::Protocol::setConfig(), pion::platform::PlatformPlugin::setId(), and pion::platform::PlatformPlugin::setProtocolFactory().
| std::string pion::platform::ProtocolFactory::addProtocol | ( | const xmlNodePtr | config_ptr | ) |
adds a new managed Protocol
| config_ptr | pointer to a list of XML nodes containing Protocol configuration parameters (must include a Plugin type) |
Definition at line 63 of file ProtocolFactory.cpp.
Referenced by pion::plugins::ConfigService::operator()().
| static xmlNodePtr pion::platform::ProtocolFactory::createProtocolConfig | ( | const char * | buf, | |
| std::size_t | len | |||
| ) | [inline, static] |
uses a memory buffer to generate XML configuration data for a Protocol
| buf | pointer to a memory buffer containing configuration data | |
| len | number of bytes available in the memory buffer |
Definition at line 102 of file ProtocolFactory.hpp.
References pion::platform::ConfigManager::createResourceConfig().
| ProtocolPtr pion::platform::ProtocolFactory::getProtocol | ( | const std::string & | protocol_id | ) |
gets a unique instance of a Protocol that may be used for en/decoding
| protocol_id | unique identifier associated with the Protocol |
Definition at line 40 of file ProtocolFactory.cpp.
References pion::platform::Protocol::clone(), pion::PluginManager< PLUGIN_TYPE >::get(), pion::platform::PluginConfig< PluginType >::m_mutex, and pion::platform::PluginConfig< PluginType >::m_plugins.
| void pion::platform::ProtocolFactory::removeProtocol | ( | const std::string & | protocol_id | ) |
removes a managed Protocol
| protocol_id | unique identifier associated with the Protocol |
Definition at line 68 of file ProtocolFactory.cpp.
Referenced by pion::plugins::ConfigService::operator()().
| void pion::platform::ProtocolFactory::setProtocolConfig | ( | const std::string & | protocol_id, | |
| const xmlNodePtr | config_ptr | |||
| ) |
sets configuration parameters for a managed Protocol
| protocol_id | unique identifier associated with the Protocol | |
| config_ptr | pointer to a list of XML nodes containing Protocol configuration parameters |
Definition at line 52 of file ProtocolFactory.cpp.
Referenced by pion::plugins::ConfigService::operator()().
1.4.7