Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
A manager for data processing modules. More...
#include <bayeux/dpp/module_manager.h>
Public Types | |
enum | ctor_flag_type { BLANK = 0, FACTORY_NOPRELOAD = datatools::bit_mask::bit00, FACTORY_INITIALIZATION_AT_LOAD = datatools::bit_mask::bit01 } |
Public Types inherited from datatools::i_tree_dumpable | |
enum | ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 } |
Enumeration for standard output streams. More... | |
Public Member Functions | |
bool | is_no_preload () const |
bool | is_initialization_at_load () const |
bool | has (const std::string &module_name_) const |
void | remove (const std::string &module_name_) |
base_module & | grab (const std::string &module_name_) |
const base_module & | get (const std::string &module_name_) const |
module_handle_dict_type & | grab_modules () |
module_handle_dict_type & | get_modules () |
const module_handle_dict_type & | get_modules () const |
void | build_modules_infos (std::vector< std::pair< std::string, std::string > > &infos_) const |
bool | is_initialized () const |
void | initialize (const datatools::properties &setup_) |
void | initialize_simple () |
void | reset () |
module_manager (uint32_t flags_=BLANK) | |
virtual | ~module_manager () |
bool | has_service_manager () const |
const datatools::service_manager & | get_service_manager () const |
datatools::service_manager & | grab_service_manager () |
void | set_service_manager (datatools::service_manager &service_manager_) |
void | install_service_manager (const datatools::properties &service_manager_configuration_) |
virtual void | tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const |
Main old interface method for printing. More... | |
void | load_module (const std::string &module_name_, const std::string &module_id_, const datatools::properties &module_config_) |
void | create_module (module_entry_type &module_entry_) |
void | initialize_module (module_entry_type &module_entry_) |
void | load_modules (const datatools::multi_properties &modules_config_) |
void | load_modules (const std::string &modules_defs_) |
datatools::logger::priority | get_logging_priority () const |
void | set_logging_priority (datatools::logger::priority) |
bool | has_module_type (const std::string &module_id_) const |
Check if a module factory given by ID is registered. More... | |
template<class ModuleClass > | |
void | register_module_type (const std::string &module_id_) |
Register a factory for a given module class given a (unique) ID. More... | |
void | unregister_module_type (const std::string &module_id_) |
Unregister a module factory. More... | |
void | build_registered_module_types (std::vector< std::string > &ids_) const |
Copy registered module factories IDs in the supplied vector. More... | |
Public Member Functions inherited from datatools::i_tree_dumpable | |
i_tree_dumpable () | |
Constructor. More... | |
virtual | ~i_tree_dumpable () |
Destructor. More... | |
virtual void | print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const |
Main new interface method for printing. More... | |
void | print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const |
Printing with jsonized options. More... | |
void | print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const |
Printing with jsonized options. More... | |
void | tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const |
void | tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const |
void | smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const |
Protected Member Functions | |
void | _load_module (const std::string &module_name_, const std::string &module_id_, const datatools::properties &module_config_) |
void | _load_modules (const datatools::multi_properties &modules_config_) |
void | _create_module (module_entry_type &module_entry_) |
void | _initialize_module (module_entry_type &module_entry_) |
void | _reset_module (module_entry_type &module_entry_) |
void | _preload_global_dict () |
Additional Inherited Members | |
Static Public Member Functions inherited from datatools::i_tree_dumpable | |
static const boost::property_tree::ptree & | empty_options () |
static boost::property_tree::ptree | make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false) |
static std::ostream & | last_skip_tag (std::ostream &out_) |
static std::ostream & | skip_tag (std::ostream &out_) |
static std::ostream & | last_tag (std::ostream &out_) |
static std::ostream & | tag (std::ostream &out_) |
A manager for data processing modules.
dpp::module_manager::module_manager | ( | uint32_t | flags_ = BLANK | ) |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void dpp::module_manager::build_modules_infos | ( | std::vector< std::pair< std::string, std::string > > & | infos_ | ) | const |
Return an array of pairs describing the name and class registration ID for each managed modules
void dpp::module_manager::build_registered_module_types | ( | std::vector< std::string > & | ids_ | ) | const |
Copy registered module factories IDs in the supplied vector.
void dpp::module_manager::create_module | ( | module_entry_type & | module_entry_ | ) |
const base_module& dpp::module_manager::get | ( | const std::string & | module_name_ | ) | const |
datatools::logger::priority dpp::module_manager::get_logging_priority | ( | ) | const |
module_handle_dict_type& dpp::module_manager::get_modules | ( | ) |
const module_handle_dict_type& dpp::module_manager::get_modules | ( | ) | const |
const datatools::service_manager& dpp::module_manager::get_service_manager | ( | ) | const |
base_module& dpp::module_manager::grab | ( | const std::string & | module_name_ | ) |
module_handle_dict_type& dpp::module_manager::grab_modules | ( | ) |
datatools::service_manager& dpp::module_manager::grab_service_manager | ( | ) |
bool dpp::module_manager::has | ( | const std::string & | module_name_ | ) | const |
bool dpp::module_manager::has_module_type | ( | const std::string & | module_id_ | ) | const |
Check if a module factory given by ID is registered.
bool dpp::module_manager::has_service_manager | ( | ) | const |
void dpp::module_manager::initialize | ( | const datatools::properties & | setup_ | ) |
void dpp::module_manager::initialize_module | ( | module_entry_type & | module_entry_ | ) |
void dpp::module_manager::initialize_simple | ( | ) |
void dpp::module_manager::install_service_manager | ( | const datatools::properties & | service_manager_configuration_ | ) |
bool dpp::module_manager::is_initialization_at_load | ( | ) | const |
bool dpp::module_manager::is_initialized | ( | ) | const |
bool dpp::module_manager::is_no_preload | ( | ) | const |
void dpp::module_manager::load_module | ( | const std::string & | module_name_, |
const std::string & | module_id_, | ||
const datatools::properties & | module_config_ | ||
) |
void dpp::module_manager::load_modules | ( | const datatools::multi_properties & | modules_config_ | ) |
void dpp::module_manager::load_modules | ( | const std::string & | modules_defs_ | ) |
|
inline |
Register a factory for a given module class given a (unique) ID.
void dpp::module_manager::remove | ( | const std::string & | module_name_ | ) |
void dpp::module_manager::reset | ( | ) |
void dpp::module_manager::set_logging_priority | ( | datatools::logger::priority | ) |
void dpp::module_manager::set_service_manager | ( | datatools::service_manager & | service_manager_ | ) |
|
virtual |
Main old interface method for printing.
Reimplemented from datatools::i_tree_dumpable.
void dpp::module_manager::unregister_module_type | ( | const std::string & | module_id_ | ) |
Unregister a module factory.