Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cuts::i_binary_cut Class Reference

The abstract base class for binary cuts. More...

#include <bayeux/cuts/i_binary_cut.h>

Inheritance diagram for cuts::i_binary_cut:
cuts::i_cut datatools::i_tree_dumpable cuts::and_cut cuts::exclude_cut cuts::nand_cut cuts::nor_cut cuts::or_cut cuts::xnor_cut cuts::xor_cut

Public Member Functions

void set_cut_1 (cut_handle_type &)
 
void set_cut_2 (cut_handle_type &)
 
void set_cuts (cut_handle_type &, cut_handle_type &)
 
 i_binary_cut (datatools::logger::priority a_logging_priority=datatools::logger::PRIO_FATAL)
 Constructor. More...
 
virtual ~i_binary_cut ()
 Destructor. More...
 
virtual void initialize (const datatools::properties &, datatools::service_manager &, cuts::cut_handle_dict_type &)
 Initialization. More...
 
virtual void export_to_config (datatools::properties &config_, uint32_t flags_=i_cut::EXPORT_CONFIG_DEFAULT, const std::string &prefix_="") const
 Export to a container of properties. More...
 
virtual void reset ()
 Reset. More...
 
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. More...
 
- Public Member Functions inherited from cuts::i_cut
bool is_debug () const
 Check if logging priority is at least at debug level. More...
 
bool has_name () const
 Check if the name of the cut is set. More...
 
void set_name (const std::string &a_name)
 Set the name of the cut. More...
 
const std::string & get_name () const
 Return the name of the cut. More...
 
bool has_description () const
 Check if the description of the cut is set. More...
 
const std::string & get_description () const
 Return the description of the cut. More...
 
void set_description (const std::string &a_description)
 Set the description of the cut. More...
 
bool has_version () const
 Check if the version of the cut is set. More...
 
const std::string & get_version () const
 Return the version of the cut. More...
 
void set_version (const std::string &a_version)
 Return the version of the cut. More...
 
bool is_initialized () const
 Check initialization status. More...
 
bool has_user_data () const
 Check if some user data is referenced. More...
 
template<class T >
void set_user_data (const T &obj_)
 Set user data. More...
 
template<class T >
bool is_user_data () const
 Check user data type. More...
 
template<class T >
const T & get_user_data () const
 Get user data of given type. More...
 
template<class T >
void register_supported_user_data_type ()
 Register user data type is supported. More...
 
template<class T >
void unregister_supported_user_data_type ()
 Unregister user data type is supported. More...
 
template<class T >
bool is_user_data_type_supported () const
 Check if data type is supported. More...
 
bool is_user_data_type_supported (const std::type_info &tinfo_) const
 Check if a data type is supported. More...
 
void reset_user_data ()
 Clear the referenced user data. More...
 
virtual void initialize_simple ()
 Naked initialization method (default implementation,. More...
 
virtual void initialize_standalone (const datatools::properties &a_config)
 Initialization method through a container of configuration properties (default implementation,. More...
 
virtual void initialize_with_service_only (const datatools::properties &a_config, datatools::service_manager &a_service_manager)
 
virtual void initialize_without_service (const datatools::properties &a_config, cut_handle_dict_type &a_cut_dictionary)
 
virtual int process ()
 
int operator() ()
 Function interface for the selection method. More...
 
 i_cut (datatools::logger::priority p=datatools::logger::PRIO_FATAL)
 Constructor. More...
 
virtual ~i_cut ()
 Destructor. More...
 
void print (std::ostream &a_out=std::clog) const
 Print shortcut. More...
 
void set_logging_priority (datatools::logger::priority p)
 Set the logging priority threshold. More...
 
datatools::logger::priority get_logging_priority () const
 Get the logging priority threshold. More...
 
size_t get_number_of_accepted_entries () const
 Return the number of entries accepted by the cut. More...
 
size_t get_number_of_rejected_entries () const
 Return the number of entries rejected by the cut. More...
 
size_t get_number_of_processed_entries () const
 Return the total number of entries processed by the cut. More...
 
void reset_counters ()
 Reset the embedded counters. More...
 
bool is_activated_counters () const
 Check the flag to activate counters. More...
 
void set_activated_counters (bool)
 Set the flag to activate statistics. More...
 
virtual std::string get_type_id () const =0
 Return the unique type identifier associated to the class of the cut object. 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 _install_cuts (const datatools::properties &a_configuration, cuts::cut_handle_dict_type &a_cut_dict)
 
virtual void _at_set_user_data ()
 Hook executed when user data is set. More...
 
virtual void _at_reset_user_data ()
 Hook executed when user data is reset. More...
 
void _reset_cuts ()
 
- Protected Member Functions inherited from cuts::i_cut
virtual int _accept ()=0
 The main selection method (pure virtual, invoked by the. More...
 
void _set_user_data (const boost::shared_ptr< i_referenced_data > &hd_)
 Set user data by shared pointer. More...
 
void _common_initialize (const datatools::properties &a_config)
 Common initialization of all cuts. More...
 
void _import_user_data_from (const i_cut &)
 Import user data from another cut. More...
 
void _export_user_data_to (i_cut &) const
 Export user data to another cut. More...
 
void _set_name (const std::string &a_name)
 Set the cut name. More...
 
void _set_initialized (bool a_initialized)
 Set the initialization flag. More...
 
virtual void _prepare_cut ()
 Hook invoked before the main selection method. More...
 
virtual int _finish_cut (int a_selection_status)
 Hook invoked after the main selection method. More...
 
virtual void _increment_counters (int a_selection_status)
 Increment statistics counters. More...
 
void _reset ()
 Reset the cut. More...
 
void _set_defaults ()
 Set default attributes values. More...
 

Protected Attributes

cut_handle_type _handle_1
 
cut_handle_type _handle_2
 
- Protected Attributes inherited from cuts::i_cut
datatools::logger::priority _logging
 Logging priority threshold. More...
 
std::string _name
 The name of the cut. More...
 
std::string _description
 The description of the cut. More...
 
std::string _version
 The version of the cut. More...
 
std::set< const std::type_info * > _supported_types_
 The set of supported user data types. More...
 

Additional Inherited Members

- Public Types inherited from cuts::i_cut
enum  export_config_flags {
  EXPORT_CONFIG_CLEAR = datatools::bit_mask::bit00, EXPORT_CONFIG_NAME = datatools::bit_mask::bit01, EXPORT_CONFIG_DESCRIPTION = datatools::bit_mask::bit02, EXPORT_CONFIG_VERSION = datatools::bit_mask::bit03,
  EXPORT_CONFIG_LOGGING_PRIORITY = datatools::bit_mask::bit04, EXPORT_CONFIG_DEFAULT, EXPORT_CONFIG_LAST = EXPORT_CONFIG_LOGGING_PRIORITY
}
 Flags for export to a container of properties. More...
 
- 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...
 
- Static Public Member Functions inherited from cuts::i_cut
static void common_ocd (datatools::object_configuration_description &ocd_)
 Basic OCD support shared by all inherited modules. More...
 
- 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

The abstract base class for binary cuts.

Constructor & Destructor Documentation

◆ i_binary_cut()

cuts::i_binary_cut::i_binary_cut ( datatools::logger::priority  a_logging_priority = datatools::logger::PRIO_FATAL)

Constructor.

◆ ~i_binary_cut()

virtual cuts::i_binary_cut::~i_binary_cut ( )
virtual

Destructor.

Member Function Documentation

◆ _at_reset_user_data()

virtual void cuts::i_binary_cut::_at_reset_user_data ( )
protectedvirtual

Hook executed when user data is reset.

Reimplemented from cuts::i_cut.

◆ _at_set_user_data()

virtual void cuts::i_binary_cut::_at_set_user_data ( )
protectedvirtual

Hook executed when user data is set.

Reimplemented from cuts::i_cut.

◆ _install_cuts()

void cuts::i_binary_cut::_install_cuts ( const datatools::properties a_configuration,
cuts::cut_handle_dict_type a_cut_dict 
)
protected

◆ _reset_cuts()

void cuts::i_binary_cut::_reset_cuts ( )
protected

◆ export_to_config()

virtual void cuts::i_binary_cut::export_to_config ( datatools::properties config_,
uint32_t  flags_ = i_cut::EXPORT_CONFIG_DEFAULT,
const std::string &  prefix_ = "" 
) const
virtual

Export to a container of properties.

Reimplemented from cuts::i_cut.

◆ initialize()

virtual void cuts::i_binary_cut::initialize ( const datatools::properties ,
datatools::service_manager ,
cuts::cut_handle_dict_type  
)
virtual

Initialization.

Implements cuts::i_cut.

◆ reset()

virtual void cuts::i_binary_cut::reset ( )
virtual

Reset.

Implements cuts::i_cut.

◆ set_cut_1()

void cuts::i_binary_cut::set_cut_1 ( cut_handle_type )

◆ set_cut_2()

void cuts::i_binary_cut::set_cut_2 ( cut_handle_type )

◆ set_cuts()

void cuts::i_binary_cut::set_cuts ( cut_handle_type ,
cut_handle_type  
)

◆ tree_dump()

virtual void cuts::i_binary_cut::tree_dump ( std::ostream &  a_out = std::clog,
const std::string &  a_title = "",
const std::string &  a_indent = "",
bool  a_inherit = false 
) const
virtual

Smart print.

Reimplemented from cuts::i_cut.

Member Data Documentation

◆ _handle_1

cut_handle_type cuts::i_binary_cut::_handle_1
protected

◆ _handle_2

cut_handle_type cuts::i_binary_cut::_handle_2
protected

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