#include <pluginmanager.hh>
Public Types | |
typedef utilmm::singleton::use < PluginManager > | self |
typedef utilmm::singleton::use < PluginManager > | self |
Public Member Functions | |
void | add (TypeDefinitionPlugin *plugin) |
bool | add (ImportPlugin *plugin) |
bool | add (ExportPlugin *plugin) |
void | add (TypeDefinitionPlugin *plugin) |
bool | add (ImportPlugin *plugin) |
bool | add (ExportPlugin *plugin) |
Exporter * | exporter (std::string const &name) const |
Exporter * | exporter (std::string const &name) const |
Importer * | importer (std::string const &name) const |
Importer * | importer (std::string const &name) const |
void | registerPluginTypes (Registry ®istry) |
void | registerPluginTypes (Registry ®istry) |
Static Public Member Functions | |
static void | load (std::string const &kind, std::string const &file, utilmm::config_set const &config, Registry &into) |
static Registry * | load (std::string const &kind, std::string const &file, utilmm::config_set const &config) |
static void | load (std::string const &kind, std::istream &stream, utilmm::config_set const &config, Registry &into) |
static Registry * | load (std::string const &kind, std::istream &stream, utilmm::config_set const &config) |
static void | load (std::string const &kind, std::string const &file, Registry &into) |
static Registry * | load (std::string const &kind, std::string const &file) |
static void | load (std::string const &kind, std::istream &stream, Registry &into) |
static Registry * | load (std::string const &kind, std::istream &stream) |
static void | load (std::string const &kind, std::string const &file, utilmm::config_set const &config, Registry &into) |
static Registry * | load (std::string const &kind, std::string const &file, utilmm::config_set const &config) |
static void | load (std::string const &kind, std::istream &stream, utilmm::config_set const &config, Registry &into) |
static Registry * | load (std::string const &kind, std::istream &stream, utilmm::config_set const &config) |
static void | load (std::string const &kind, std::string const &file, Registry &into) |
static Registry * | load (std::string const &kind, std::string const &file) |
static void | load (std::string const &kind, std::istream &stream, Registry &into) |
static Registry * | load (std::string const &kind, std::istream &stream) |
static void | save (std::string const &kind, utilmm::config_set const &config, Registry const ®istry, std::ostream &into) |
static void | save (std::string const &kind, Registry const ®istry, std::ostream &into) |
static std::string | save (std::string const &kind, utilmm::config_set const &config, Registry const ®istry) |
static std::string | save (std::string const &kind, Registry const ®istry) |
static void | save (std::string const &kind, utilmm::config_set const &config, Registry const ®istry, std::ostream &into) |
static void | save (std::string const &kind, Registry const ®istry, std::ostream &into) |
static std::string | save (std::string const &kind, utilmm::config_set const &config, Registry const ®istry) |
static std::string | save (std::string const &kind, Registry const ®istry) |
Private Types | |
typedef void(* | PluginEntryPoint )(PluginManager &) |
typedef void(* | PluginEntryPoint )(PluginManager &) |
Private Member Functions | |
bool | loadPlugin (std::string const &path) |
bool | loadPlugin (std::string const &path) |
PluginManager () | |
PluginManager () | |
~PluginManager () | |
~PluginManager () | |
Private Attributes | |
std::vector < TypeDefinitionPlugin * > | m_definition_plugins |
std::map< std::string, ExportPlugin * > | m_exporters |
std::map< std::string, ImportPlugin * > | m_importers |
std::vector< void * > | m_library_handles |
Friends | |
class | utilmm::singleton::wrapper< PluginManager > |
The plugin manager
It is a singleton, using utilmm::singleton You have to access it using PluginManager::self manager;
manager->importer()
The object is destroyed when the last of the use<> objects is, and created back when a new use<> object is built.
Definition at line 48 of file install/include/typelib/pluginmanager.hh.
typedef void(* Typelib::PluginManager::PluginEntryPoint)(PluginManager &) [private] |
Definition at line 56 of file typelib/pluginmanager.hh.
typedef void(* Typelib::PluginManager::PluginEntryPoint)(PluginManager &) [private] |
Definition at line 56 of file install/include/typelib/pluginmanager.hh.
typedef utilmm::singleton::use<PluginManager> Typelib::PluginManager::self |
The one PluginManager object. See main PluginManager documentation for its use.
Definition at line 187 of file typelib/pluginmanager.hh.
typedef utilmm::singleton::use<PluginManager> Typelib::PluginManager::self |
The one PluginManager object. See main PluginManager documentation for its use.
Definition at line 187 of file install/include/typelib/pluginmanager.hh.
PluginManager::PluginManager | ( | ) | [private] |
Definition at line 40 of file pluginmanager.cc.
PluginManager::~PluginManager | ( | ) | [private] |
Definition at line 55 of file pluginmanager.cc.
Typelib::PluginManager::PluginManager | ( | ) | [private] |
Typelib::PluginManager::~PluginManager | ( | ) | [private] |
void Typelib::PluginManager::add | ( | TypeDefinitionPlugin * | plugin | ) |
Adds a type definition plugin. A type definition plugin defines a set of "default" types that gets added automatically to new registries
bool Typelib::PluginManager::add | ( | ImportPlugin * | plugin | ) |
Registers a new importer
bool Typelib::PluginManager::add | ( | ExportPlugin * | plugin | ) |
Registers a new exporter
void PluginManager::add | ( | TypeDefinitionPlugin * | plugin | ) |
Adds a type definition plugin. A type definition plugin defines a set of "default" types that gets added automatically to new registries
Definition at line 93 of file pluginmanager.cc.
bool PluginManager::add | ( | ImportPlugin * | plugin | ) |
Registers a new importer
Definition at line 91 of file pluginmanager.cc.
bool PluginManager::add | ( | ExportPlugin * | plugin | ) |
Registers a new exporter
Definition at line 89 of file pluginmanager.cc.
Exporter* Typelib::PluginManager::exporter | ( | std::string const & | name | ) | const |
Build a new export plugin from its plugin name
PluginNotFound |
Exporter * PluginManager::exporter | ( | std::string const & | name | ) | const |
Build a new export plugin from its plugin name
PluginNotFound |
Definition at line 107 of file pluginmanager.cc.
Importer* Typelib::PluginManager::importer | ( | std::string const & | name | ) | const |
Build a new import plugin from its plugin name
PluginNotFound |
Importer * PluginManager::importer | ( | std::string const & | name | ) | const |
Build a new import plugin from its plugin name
PluginNotFound |
Definition at line 105 of file pluginmanager.cc.
static void Typelib::PluginManager::load | ( | std::string const & | kind, | |
std::string const & | file, | |||
utilmm::config_set const & | config, | |||
Registry & | into | |||
) | [static] |
Imports types from a file into an already existing registry
static Registry* Typelib::PluginManager::load | ( | std::string const & | kind, | |
std::string const & | file, | |||
utilmm::config_set const & | config | |||
) | [static] |
Creates a registry from a file
static void Typelib::PluginManager::load | ( | std::string const & | kind, | |
std::istream & | stream, | |||
utilmm::config_set const & | config, | |||
Registry & | into | |||
) | [static] |
Imports types from a istream object to an already existing registry
static Registry* Typelib::PluginManager::load | ( | std::string const & | kind, | |
std::istream & | stream, | |||
utilmm::config_set const & | config | |||
) | [static] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
static void Typelib::PluginManager::load | ( | std::string const & | kind, | |
std::string const & | file, | |||
Registry & | into | |||
) | [static] |
Imports types from a file into an already existing registry
static Registry* Typelib::PluginManager::load | ( | std::string const & | kind, | |
std::string const & | file | |||
) | [static] |
Creates a registry from a file
static void Typelib::PluginManager::load | ( | std::string const & | kind, | |
std::istream & | stream, | |||
Registry & | into | |||
) | [static] |
Imports types from a istream object to an already existing registry
static Registry* Typelib::PluginManager::load | ( | std::string const & | kind, | |
std::istream & | stream | |||
) | [static] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void PluginManager::load | ( | std::string const & | kind, | |
std::string const & | file, | |||
utilmm::config_set const & | config, | |||
Registry & | into | |||
) | [static] |
Imports types from a file into an already existing registry
Definition at line 173 of file pluginmanager.cc.
Registry * PluginManager::load | ( | std::string const & | kind, | |
std::string const & | file, | |||
utilmm::config_set const & | config | |||
) | [static] |
Creates a registry from a file
Definition at line 167 of file pluginmanager.cc.
void PluginManager::load | ( | std::string const & | kind, | |
std::istream & | stream, | |||
utilmm::config_set const & | config, | |||
Registry & | into | |||
) | [static] |
Imports types from a istream object to an already existing registry
Definition at line 161 of file pluginmanager.cc.
Registry * PluginManager::load | ( | std::string const & | kind, | |
std::istream & | stream, | |||
utilmm::config_set const & | config | |||
) | [static] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 155 of file pluginmanager.cc.
void PluginManager::load | ( | std::string const & | kind, | |
std::string const & | file, | |||
Registry & | into | |||
) | [static] |
Imports types from a file into an already existing registry
Definition at line 149 of file pluginmanager.cc.
Registry * PluginManager::load | ( | std::string const & | kind, | |
std::string const & | file | |||
) | [static] |
Creates a registry from a file
Definition at line 144 of file pluginmanager.cc.
void PluginManager::load | ( | std::string const & | kind, | |
std::istream & | stream, | |||
Registry & | into | |||
) | [static] |
Imports types from a istream object to an already existing registry
Definition at line 139 of file pluginmanager.cc.
Registry * PluginManager::load | ( | std::string const & | kind, | |
std::istream & | stream | |||
) | [static] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 134 of file pluginmanager.cc.
bool Typelib::PluginManager::loadPlugin | ( | std::string const & | path | ) | [private] |
bool PluginManager::loadPlugin | ( | std::string const & | path | ) | [private] |
Definition at line 67 of file pluginmanager.cc.
void Typelib::PluginManager::registerPluginTypes | ( | Registry & | registry | ) |
Adds the types from the type definition plugins to registry
void PluginManager::registerPluginTypes | ( | Registry & | registry | ) |
Adds the types from the type definition plugins to registry
Definition at line 96 of file pluginmanager.cc.
static void Typelib::PluginManager::save | ( | std::string const & | kind, | |
utilmm::config_set const & | config, | |||
Registry const & | registry, | |||
std::ostream & | into | |||
) | [static] |
Exports a registry to an ostream object
PluginNotFound | if kind is invalid | |
UnsupportedType | if a specific type cannot be exported into this format | |
ExportError | if another error occured during the export |
static void Typelib::PluginManager::save | ( | std::string const & | kind, | |
Registry const & | registry, | |||
std::ostream & | into | |||
) | [static] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This is provided for backward compatibility only
static std::string Typelib::PluginManager::save | ( | std::string const & | kind, | |
utilmm::config_set const & | config, | |||
Registry const & | registry | |||
) | [static] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
static std::string Typelib::PluginManager::save | ( | std::string const & | kind, | |
Registry const & | registry | |||
) | [static] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This is provided for backward compatibility only
void PluginManager::save | ( | std::string const & | kind, | |
utilmm::config_set const & | config, | |||
Registry const & | registry, | |||
std::ostream & | into | |||
) | [static] |
Exports a registry to an ostream object
PluginNotFound | if kind is invalid | |
UnsupportedType | if a specific type cannot be exported into this format | |
ExportError | if another error occured during the export |
Definition at line 128 of file pluginmanager.cc.
void PluginManager::save | ( | std::string const & | kind, | |
Registry const & | registry, | |||
std::ostream & | into | |||
) | [static] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This is provided for backward compatibility only
Definition at line 123 of file pluginmanager.cc.
std::string PluginManager::save | ( | std::string const & | kind, | |
utilmm::config_set const & | config, | |||
Registry const & | registry | |||
) | [static] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 117 of file pluginmanager.cc.
std::string PluginManager::save | ( | std::string const & | kind, | |
Registry const & | registry | |||
) | [static] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This is provided for backward compatibility only
Definition at line 111 of file pluginmanager.cc.
friend class utilmm::singleton::wrapper< PluginManager > [friend] |
Definition at line 190 of file install/include/typelib/pluginmanager.hh.
std::vector< TypeDefinitionPlugin * > Typelib::PluginManager::m_definition_plugins [private] |
Definition at line 52 of file install/include/typelib/pluginmanager.hh.
std::map< std::string, ExportPlugin * > Typelib::PluginManager::m_exporters [private] |
Definition at line 50 of file install/include/typelib/pluginmanager.hh.
std::map< std::string, ImportPlugin * > Typelib::PluginManager::m_importers [private] |
Definition at line 51 of file install/include/typelib/pluginmanager.hh.
std::vector< void * > Typelib::PluginManager::m_library_handles [private] |
Definition at line 53 of file install/include/typelib/pluginmanager.hh.