32 #ifndef CUTS_CUT_MANAGER_H 33 #define CUTS_CUT_MANAGER_H 1 40 #include <boost/cstdint.hpp> 52 class multi_properties;
53 class service_manager;
87 bool has(
const std::string & a_cut_name)
const;
90 void remove(
const std::string & a_cut_name);
93 i_cut &
grab(
const std::string & a_cut_name);
96 const i_cut &
get(
const std::string & a_cut_name)
const;
135 virtual void tree_dump(std::ostream & a_out = std::clog,
136 const std::string & a_title =
"",
137 const std::string & a_indent =
"",
138 bool a_inherit =
false)
const;
141 void print_report(std::ostream & a_out = std::clog)
const;
144 void load_cut(
const std::string & cut_name_,
145 const std::string & cut_id_,
155 template <
class CutClass>
158 _factory_register_.registration(cut_id_, boost::factory<CutClass*>());
167 void _load_cut(
const std::string & cut_name_,
168 const std::string & cut_id_,
186 i_cut::factory_register_type _factory_register_;
188 bool _service_manager_owner_;
205 #endif // CUTS_CUT_MANAGER_H datatools::logger::priority get_logging_priority() const
Returns logging priority.
bool is_no_preload() const
Check the 'no-preload' flag.
void initialize(const datatools::properties &a_setup)
Initialization.
cut_manager(uint32_t the_flags=BLANK)
Default constructor.
bool has_cut_type(const std::string &cut_id_) const
Check if a given cut factory is registered.
virtual ~cut_manager()
Destructor.
Definition: cut_manager.h:68
The cut abstract base class (interface)
Definition: i_cut.h:62
void load_cut(const std::string &cut_name_, const std::string &cut_id_, const datatools::properties &cut_config_)
Load a cut.
void set_logging_priority(datatools::logger::priority p)
Set logging priority.
Definition: cut_manager.h:66
const i_cut & get(const std::string &a_cut_name) const
Return a non mutable reference to a cut given its name.
void _reset_cut(cut_entry_type &cut_entry_)
virtual void tree_dump(std::ostream &a_out=std::clog, const std::string &a_title="", const std::string &a_indent="", bool a_inherit=false) const
Smart print.
Top-level namespace of the Bayeux/cuts module library.
Definition: accept_cut.h:21
void remove(const std::string &a_cut_name)
Remove cut with given name.
void install_service_manager(const datatools::properties &a_service_manager_configuration)
Install an embedded service manager.
bool has_service_manager() const
Check availability of the service manager.
void load_cuts(const datatools::multi_properties &cuts_config_)
Load several cuts.
cut_handle_dict_type & get_cuts()
Return a mutable reference to the embedded dictionary of cuts.
void _load_cuts(const datatools::multi_properties &cuts_config_)
ctor_flag_type
Factory flags.
Definition: cut_manager.h:65
DOCD_CLASS_DECLARATION(my::algo)
Declaration of the OCD support for the my::algo class.
The cut manager class.
Definition: cut_manager.h:59
void register_cut_type(const std::string &cut_id_)
Register a cut factory.
Definition: cut_manager.h:156
bool is_initialized() const
Check initialization flag.
std::vector< std::string > ordered_cut_list_type
Alias type of an array of cut names.
Definition: cut_tools.h:178
Internal record that handles a dynamically allocated cut.
Definition: cut_tools.h:75
bool has(const std::string &a_cut_name) const
Check if cut with given name is defined.
void _preload_global_dict()
datatools::service_manager & grab_service_manager()
Return a mutable reference to the service manager.
void print_report(std::ostream &a_out=std::clog) const
Print report.
const datatools::service_manager & get_service_manager() const
Return a non mutable reference to the service manager.
void _initialize_cut(cut_entry_type &cut_entry_)
Utilities for logging information.
bool is_initialization_at_load() const
Check the 'initialization_at_load' flag.
void set_service_manager(datatools::service_manager &a_service_manager)
Set service manager.
std::map< std::string, cut_entry_type > cut_handle_dict_type
Alias type of a dictionary of cut entry.
Definition: cut_tools.h:175
void unregister_cut_type(const std::string &cut_id_)
Unregister a cut factory.
Definition: cut_manager.h:67
void _create_cut(cut_entry_type &cut_entry_)
bool has_print_report() const
Check if print report is available.
i_cut & grab(const std::string &a_cut_name)
Return a mutable reference to a cut given its name.
void _load_cut(const std::string &cut_name_, const std::string &cut_id_, const datatools::properties &cut_config_)