Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Types | Public Member Functions | Protected Member Functions | List of all members
dpp::module_manager Class Reference

A manager for data processing modules. More...

#include <bayeux/dpp/module_manager.h>

Inheritance diagram for dpp::module_manager:
datatools::i_tree_dumpable

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_modulegrab (const std::string &module_name_)
 
const base_moduleget (const std::string &module_name_) const
 
module_handle_dict_typegrab_modules ()
 
module_handle_dict_typeget_modules ()
 
const module_handle_dict_typeget_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_managerget_service_manager () const
 
datatools::service_managergrab_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_)
 

Detailed Description

A manager for data processing modules.

Member Enumeration Documentation

◆ ctor_flag_type

Enumerator
BLANK 
FACTORY_NOPRELOAD 
FACTORY_INITIALIZATION_AT_LOAD 

Constructor & Destructor Documentation

◆ module_manager()

dpp::module_manager::module_manager ( uint32_t  flags_ = BLANK)

◆ ~module_manager()

virtual dpp::module_manager::~module_manager ( )
virtual

Member Function Documentation

◆ _create_module()

void dpp::module_manager::_create_module ( module_entry_type module_entry_)
protected

◆ _initialize_module()

void dpp::module_manager::_initialize_module ( module_entry_type module_entry_)
protected

◆ _load_module()

void dpp::module_manager::_load_module ( const std::string &  module_name_,
const std::string &  module_id_,
const datatools::properties module_config_ 
)
protected

◆ _load_modules()

void dpp::module_manager::_load_modules ( const datatools::multi_properties modules_config_)
protected

◆ _preload_global_dict()

void dpp::module_manager::_preload_global_dict ( )
protected

◆ _reset_module()

void dpp::module_manager::_reset_module ( module_entry_type module_entry_)
protected

◆ build_modules_infos()

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

◆ build_registered_module_types()

void dpp::module_manager::build_registered_module_types ( std::vector< std::string > &  ids_) const

Copy registered module factories IDs in the supplied vector.

◆ create_module()

void dpp::module_manager::create_module ( module_entry_type module_entry_)

◆ get()

const base_module& dpp::module_manager::get ( const std::string &  module_name_) const

◆ get_logging_priority()

datatools::logger::priority dpp::module_manager::get_logging_priority ( ) const

◆ get_modules() [1/2]

module_handle_dict_type& dpp::module_manager::get_modules ( )

◆ get_modules() [2/2]

const module_handle_dict_type& dpp::module_manager::get_modules ( ) const

◆ get_service_manager()

const datatools::service_manager& dpp::module_manager::get_service_manager ( ) const

◆ grab()

base_module& dpp::module_manager::grab ( const std::string &  module_name_)

◆ grab_modules()

module_handle_dict_type& dpp::module_manager::grab_modules ( )

◆ grab_service_manager()

datatools::service_manager& dpp::module_manager::grab_service_manager ( )

◆ has()

bool dpp::module_manager::has ( const std::string &  module_name_) const

◆ has_module_type()

bool dpp::module_manager::has_module_type ( const std::string &  module_id_) const

Check if a module factory given by ID is registered.

◆ has_service_manager()

bool dpp::module_manager::has_service_manager ( ) const

◆ initialize()

void dpp::module_manager::initialize ( const datatools::properties setup_)

◆ initialize_module()

void dpp::module_manager::initialize_module ( module_entry_type module_entry_)

◆ initialize_simple()

void dpp::module_manager::initialize_simple ( )

◆ install_service_manager()

void dpp::module_manager::install_service_manager ( const datatools::properties service_manager_configuration_)

◆ is_initialization_at_load()

bool dpp::module_manager::is_initialization_at_load ( ) const

◆ is_initialized()

bool dpp::module_manager::is_initialized ( ) const

◆ is_no_preload()

bool dpp::module_manager::is_no_preload ( ) const

◆ load_module()

void dpp::module_manager::load_module ( const std::string &  module_name_,
const std::string &  module_id_,
const datatools::properties module_config_ 
)

◆ load_modules() [1/2]

void dpp::module_manager::load_modules ( const datatools::multi_properties modules_config_)

◆ load_modules() [2/2]

void dpp::module_manager::load_modules ( const std::string &  modules_defs_)

◆ register_module_type()

template<class ModuleClass >
void dpp::module_manager::register_module_type ( const std::string &  module_id_)
inline

Register a factory for a given module class given a (unique) ID.

◆ remove()

void dpp::module_manager::remove ( const std::string &  module_name_)

◆ reset()

void dpp::module_manager::reset ( )

◆ set_logging_priority()

void dpp::module_manager::set_logging_priority ( datatools::logger::priority  )

◆ set_service_manager()

void dpp::module_manager::set_service_manager ( datatools::service_manager service_manager_)

◆ tree_dump()

virtual void dpp::module_manager::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Main old interface method for printing.

Reimplemented from datatools::i_tree_dumpable.

◆ unregister_module_type()

void dpp::module_manager::unregister_module_type ( const std::string &  module_id_)

Unregister a module factory.


The documentation for this class was generated from the following file: