Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Types | Public Member Functions | Static Public Member Functions | List of all members
mctools::signal::signal_shape_builder Class Reference

A signal shape builder/factory. More...

#include <bayeux/mctools/signal/signal_shape_builder.h>

Inheritance diagram for mctools::signal::signal_shape_builder:
datatools::i_tree_dumpable

Public Types

typedef datatools::factory_register< mygsl::i_unary_functionfreg_type
 
- 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

 signal_shape_builder ()
 Default constructor. More...
 
 ~signal_shape_builder ()
 Destructor. More...
 
datatools::logger::priority get_logging_priority () const
 Return the logging priority. More...
 
void set_logging_priority (const datatools::logger::priority)
 Set the logging priority. More...
 
bool has_category () const
 Check if a category of signal is set. More...
 
void set_category (const std::string &)
 Set the category of signals. More...
 
void reset_category ()
 Reset the category of signals. More...
 
const std::string & get_category () const
 Return the category of signals. More...
 
void add_registered_shape_type_id (const std::string &)
 Add registered shape type identifier. More...
 
bool has_registered_shape_type_id (const std::string &) const
 Check if a registered shape type identifier exists. More...
 
bool has_service_mgr () const
 Check if the handle to an external service manager is set. More...
 
void set_service_mgr (const datatools::service_manager &)
 Set the handle to an external service manager. More...
 
const datatools::service_managerget_service_mgr () const
 Return the handle to an external service manager. More...
 
bool is_initialized () const
 Check initialization. More...
 
void initialize_simple ()
 Initialize the signal builder. More...
 
void initialize (const datatools::properties &config_)
 Initialize the signal builder from a set of configuration properties. More...
 
void reset ()
 Reset the signal. More...
 
const mygsl::i_unary_functioncreate_signal_shape (const std::string &key_, const std::string &shape_type_id_, const datatools::properties &shape_params_)
 Instantiate a functor. More...
 
bool has_functor_factory (const std::string &shape_type_id_) const
 Check if a functor factory exists. More...
 
bool has_reference_functor (const std::string &key_) const
 Check if a reference functor with given key exists. More...
 
const mygsl::i_unary_functionget_reference_functor (const std::string &key_) const
 Return a const reference to a reference functor. More...
 
void load_reference_functors_from_file (const std::string &filename_)
 Load definition file for reference functors. More...
 
void add_reference_functor (const std::string &key_, const std::string &shape_type_id_, const datatools::properties &shape_params_)
 Create a new reference functor. More...
 
bool has_functor (const std::string &key_) const
 Check if an user functor with given key exists. More...
 
mygsl::i_unary_functiongrab_functor (const std::string &key_)
 Return a mutable reference to an user functor. More...
 
const mygsl::i_unary_functionget_functor (const std::string &key_) const
 Return a const reference to an user functor. More...
 
mygsl::const_unary_function_handle_type get_functor_handle (const std::string &key_) const
 Return a handle to a const user functor. More...
 
void clear_functor (const std::string &key_)
 Remove an user functor with given key. More...
 
void clear_functors ()
 Remove all user functors. More...
 
const mygsl::unary_function_dict_typeget_functors () const
 Return the dictionnary of functors. More...
 
void build_list_of_reference_functors (std::set< std::string > &) const
 Build the list of reference functors. More...
 
void build_list_of_functors (std::set< std::string > &) const
 Build the list of user functors. More...
 
virtual void tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
 Smart print. 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
 

Static Public Member Functions

static const std::string & reference_functor_prefix ()
 
- 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 signal shape builder/factory.

Member Typedef Documentation

◆ freg_type

Constructor & Destructor Documentation

◆ signal_shape_builder()

mctools::signal::signal_shape_builder::signal_shape_builder ( )

Default constructor.

◆ ~signal_shape_builder()

mctools::signal::signal_shape_builder::~signal_shape_builder ( )

Destructor.

Member Function Documentation

◆ add_reference_functor()

void mctools::signal::signal_shape_builder::add_reference_functor ( const std::string &  key_,
const std::string &  shape_type_id_,
const datatools::properties shape_params_ 
)

Create a new reference functor.

◆ add_registered_shape_type_id()

void mctools::signal::signal_shape_builder::add_registered_shape_type_id ( const std::string &  )

Add registered shape type identifier.

◆ build_list_of_functors()

void mctools::signal::signal_shape_builder::build_list_of_functors ( std::set< std::string > &  ) const

Build the list of user functors.

◆ build_list_of_reference_functors()

void mctools::signal::signal_shape_builder::build_list_of_reference_functors ( std::set< std::string > &  ) const

Build the list of reference functors.

◆ clear_functor()

void mctools::signal::signal_shape_builder::clear_functor ( const std::string &  key_)

Remove an user functor with given key.

◆ clear_functors()

void mctools::signal::signal_shape_builder::clear_functors ( )

Remove all user functors.

◆ create_signal_shape()

const mygsl::i_unary_function& mctools::signal::signal_shape_builder::create_signal_shape ( const std::string &  key_,
const std::string &  shape_type_id_,
const datatools::properties shape_params_ 
)

Instantiate a functor.

◆ get_category()

const std::string& mctools::signal::signal_shape_builder::get_category ( ) const

Return the category of signals.

◆ get_functor()

const mygsl::i_unary_function& mctools::signal::signal_shape_builder::get_functor ( const std::string &  key_) const

Return a const reference to an user functor.

◆ get_functor_handle()

mygsl::const_unary_function_handle_type mctools::signal::signal_shape_builder::get_functor_handle ( const std::string &  key_) const

Return a handle to a const user functor.

◆ get_functors()

const mygsl::unary_function_dict_type& mctools::signal::signal_shape_builder::get_functors ( ) const

Return the dictionnary of functors.

◆ get_logging_priority()

datatools::logger::priority mctools::signal::signal_shape_builder::get_logging_priority ( ) const

Return the logging priority.

◆ get_reference_functor()

const mygsl::i_unary_function& mctools::signal::signal_shape_builder::get_reference_functor ( const std::string &  key_) const

Return a const reference to a reference functor.

◆ get_service_mgr()

const datatools::service_manager& mctools::signal::signal_shape_builder::get_service_mgr ( ) const

Return the handle to an external service manager.

◆ grab_functor()

mygsl::i_unary_function& mctools::signal::signal_shape_builder::grab_functor ( const std::string &  key_)

Return a mutable reference to an user functor.

◆ has_category()

bool mctools::signal::signal_shape_builder::has_category ( ) const

Check if a category of signal is set.

◆ has_functor()

bool mctools::signal::signal_shape_builder::has_functor ( const std::string &  key_) const

Check if an user functor with given key exists.

◆ has_functor_factory()

bool mctools::signal::signal_shape_builder::has_functor_factory ( const std::string &  shape_type_id_) const

Check if a functor factory exists.

◆ has_reference_functor()

bool mctools::signal::signal_shape_builder::has_reference_functor ( const std::string &  key_) const

Check if a reference functor with given key exists.

◆ has_registered_shape_type_id()

bool mctools::signal::signal_shape_builder::has_registered_shape_type_id ( const std::string &  ) const

Check if a registered shape type identifier exists.

◆ has_service_mgr()

bool mctools::signal::signal_shape_builder::has_service_mgr ( ) const

Check if the handle to an external service manager is set.

◆ initialize()

void mctools::signal::signal_shape_builder::initialize ( const datatools::properties config_)

Initialize the signal builder from a set of configuration properties.

◆ initialize_simple()

void mctools::signal::signal_shape_builder::initialize_simple ( )

Initialize the signal builder.

◆ is_initialized()

bool mctools::signal::signal_shape_builder::is_initialized ( ) const

Check initialization.

◆ load_reference_functors_from_file()

void mctools::signal::signal_shape_builder::load_reference_functors_from_file ( const std::string &  filename_)

Load definition file for reference functors.

◆ reference_functor_prefix()

static const std::string& mctools::signal::signal_shape_builder::reference_functor_prefix ( )
static

◆ reset()

void mctools::signal::signal_shape_builder::reset ( )

Reset the signal.

◆ reset_category()

void mctools::signal::signal_shape_builder::reset_category ( )

Reset the category of signals.

◆ set_category()

void mctools::signal::signal_shape_builder::set_category ( const std::string &  )

Set the category of signals.

◆ set_logging_priority()

void mctools::signal::signal_shape_builder::set_logging_priority ( const datatools::logger::priority  )

Set the logging priority.

◆ set_service_mgr()

void mctools::signal::signal_shape_builder::set_service_mgr ( const datatools::service_manager )

Set the handle to an external service manager.

◆ tree_dump()

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

Smart print.

Reimplemented from datatools::i_tree_dumpable.


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