29 #ifndef DPP_MODULE_MANAGER_H 30 #define DPP_MODULE_MANAGER_H 1 38 #include <boost/cstdint.hpp> 64 bool has(
const std::string & module_name_)
const;
66 void remove(
const std::string & module_name_);
105 virtual void tree_dump(std::ostream & out_ = std::clog,
106 const std::string & title_ =
"",
107 const std::string & indent_ =
"",
108 bool inherit_ =
false)
const;
111 const std::string & module_id_,
129 const std::string & module_id_,
146 template <
class ModuleClass>
149 _factory_register_.registration(module_id_, boost::factory<ModuleClass*>());
168 base_module::factory_register_type _factory_register_;
170 bool _service_manager_owner_;
183 #endif // DPP_MODULE_MANAGER_H void _load_module(const std::string &module_name_, const std::string &module_id_, const datatools::properties &module_config_)
void _initialize_module(module_entry_type &module_entry_)
void remove(const std::string &module_name_)
Definition: module_manager.h:55
bool has_service_manager() const
Top-level namespace of the Bayeux/dpp module library.
Definition: base_module.h:56
void _create_module(module_entry_type &module_entry_)
module_handle_dict_type & get_modules()
Module record entry class.
Definition: module_tools.h:60
void set_service_manager(datatools::service_manager &service_manager_)
virtual ~module_manager()
void install_service_manager(const datatools::properties &service_manager_configuration_)
void create_module(module_entry_type &module_entry_)
bool is_initialized() const
void _preload_global_dict()
bool has(const std::string &module_name_) const
void register_module_type(const std::string &module_id_)
Register a factory for a given module class given a (unique) ID.
Definition: module_manager.h:147
DOCD_CLASS_DECLARATION(my::algo)
Declaration of the OCD support for the my::algo class.
std::map< std::string, module_entry_type > module_handle_dict_type
Definition: module_tools.h:141
Base processing module (abstract interface)
Definition: base_module.h:59
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.
void load_module(const std::string &module_name_, const std::string &module_id_, const datatools::properties &module_config_)
Definition: module_manager.h:57
bool is_no_preload() const
void build_modules_infos(std::vector< std::pair< std::string, std::string > > &infos_) const
void _reset_module(module_entry_type &module_entry_)
const base_module & get(const std::string &module_name_) const
datatools::service_manager & grab_service_manager()
bool is_initialization_at_load() const
void build_registered_module_types(std::vector< std::string > &ids_) const
Copy registered module factories IDs in the supplied vector.
base_module & grab(const std::string &module_name_)
void set_logging_priority(datatools::logger::priority)
module_manager(uint32_t flags_=BLANK)
datatools::logger::priority get_logging_priority() const
Utilities for logging information.
Definition: module_manager.h:56
void load_modules(const datatools::multi_properties &modules_config_)
ctor_flag_type
Definition: module_manager.h:54
A manager for data processing modules.
Definition: module_manager.h:49
void initialize(const datatools::properties &setup_)
void _load_modules(const datatools::multi_properties &modules_config_)
const datatools::service_manager & get_service_manager() const
bool has_module_type(const std::string &module_id_) const
Check if a module factory given by ID is registered.
module_handle_dict_type & grab_modules()
void initialize_module(module_entry_type &module_entry_)
void unregister_module_type(const std::string &module_id_)
Unregister a module factory.