29 #ifndef DPP_BASE_MODULE_H 30 #define DPP_BASE_MODULE_H 1 51 class multi_properties;
52 class service_manager;
107 const std::string &
get_name()
const;
170 virtual void reset() = 0;
173 virtual void tree_dump(std::ostream & out_ = std::clog,
174 const std::string & title_ =
"",
175 const std::string & indent_ =
"",
176 bool inherit_ =
false)
const;
179 void print(std::ostream & out_ = std::clog)
const;
193 void _set_name(
const std::string & name_);
231 #define DPP_MODULE_REGISTRATION_INTERFACE(T) \ 233 DATATOOLS_FACTORY_SYSTEM_AUTO_REGISTRATION_INTERFACE(::dpp::base_module,T) \ 244 #define DPP_MODULE_REGISTRATION_IMPLEMENT(T,ModuleID) \ 245 DATATOOLS_FACTORY_SYSTEM_AUTO_REGISTRATION_IMPLEMENTATION(::dpp::base_module,T,ModuleID) \ 248 #endif // DPP_BASE_MODULE_H Definition: base_module.h:87
bool has_name() const
Check the module name.
const std::string & get_last_error_message() const
Return the module last error message.
virtual void initialize_standalone(const datatools::properties &config_)
Initialize the module only using a set of parameters.
void append_last_error_message(const std::string &errmsg_)
Append an error message.
Definition: base_module.h:77
Definition: base_module.h:91
Definition: base_module.h:75
Top-level namespace of the Bayeux/dpp module library.
Definition: base_module.h:56
bool _initialized
The initialization flag.
Definition: base_module.h:207
void _set_initialized(bool initialized_)
Set the initialization flag of the module.
datatools::logger::priority _logging
The logging priority threshold.
Definition: base_module.h:205
Definition: base_module.h:82
process_status
Processing status flags used as the returned value of data processing methods through the pipeline.
Definition: base_module.h:65
const std::string & get_name() const
Return the module name.
virtual void initialize_simple()
Initialize the module without external resource.
virtual void initialize_with_service(const datatools::properties &config_, datatools::service_manager &service_manager_)
Initialize the module using a set of parameters and a service manager.
void set_description(const std::string &description_)
Set the module description.
void _set_name(const std::string &name_)
Set the name of the module.
const std::string & get_description() const
Return the module description.
virtual void initialize_without_service(const datatools::properties &config, module_handle_dict_type &module_dictionnary_)
Initialize the module using a set of parameters and a map of modules.
virtual void reset()=0
The main termination method.
base_module(datatools::logger::priority p_=datatools::logger::PRIO_FATAL)
Default constructor :
bool has_description() const
Check the module description.
Definition: base_module.h:66
void print(std::ostream &out_=std::clog) const
Default print.
virtual process_status process(datatools::things &data_model_)=0
void reset_last_error_message()
Reset the module last error message.
Definition: base_module.h:70
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
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
void set_logging_priority(datatools::logger::priority p_)
Set logging priority.
static void common_ocd(datatools::object_configuration_description &ocd_)
Basic OCD support shared by all inherited modules.
virtual ~base_module()
Destructor :
bool has_last_error_message() const
Check the module last error message.
std::string _last_error_message
Last error message (questionable)
Definition: base_module.h:208
Definition: base_module.h:69
std::string _description
The description of the module.
Definition: base_module.h:204
Utilities for logging information.
void set_name(const std::string &)
Set the module name.
std::string _name
The name of the module.
Definition: base_module.h:203
Definition: base_module.h:72
void _common_initialize(const datatools::properties &config_)
Basic initialization shared by all inherited modules.
#define DATATOOLS_FACTORY_SYSTEM_REGISTER_INTERFACE(BaseType)
Declaration of a system (allocator/functor) factory register as a static member of a base class and s...
Definition: factory_macros.h:52
virtual void initialize(const datatools::properties &config_, datatools::service_manager &service_manager_, module_handle_dict_type &module_dictionary_)=0
bool is_initialized() const
Check initialization flag.
datatools::logger::priority get_logging_priority() const
Returns logging priority.
virtual void initialize_simple_with_service(datatools::service_manager &service_manager_)
Initialize the module with a service manager only.
void set_last_error_message(const std::string &)
Set the module last error message.