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

Factory of functors. More...

#include <bayeux/mygsl/functor_factory.h>

Inheritance diagram for mygsl::functor_factory:
datatools::i_tree_dumpable

Public Types

enum  construct_flags { CONSTRUCT_NONE = 0, CONSTRUCT_NO_PRELOAD = 0x1, CONSTRUCT_FACTORY_VERBOSE = 0x2 }
 construct flags 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...
 

Public Member Functions

bool is_locked () const
 Check lock flag. More...
 
void lock ()
 Lock the factory. More...
 
void unlock ()
 Unlock the factory. More...
 
 functor_factory ()
 Default constructor. More...
 
 functor_factory (uint32_t flags_)
 Constructor. More...
 
virtual ~functor_factory ()
 Destructor. More...
 
void create (unary_function_handle_type &handle_, const std::string &functor_id_)
 Create a functor without initialization. More...
 
void create (unary_function_handle_type &handle_, const std::string &functor_id_, const datatools::properties &functor_config_)
 Create a functor. More...
 
void create (unary_function_handle_type &handle_, const std::string &functor_id_, const datatools::properties &functor_config_, unary_function_dict_type &functors_)
 Create a functor. More...
 
virtual void tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
 Smart dump. 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

i_unary_function_allocate (const std::string &functor_id_)
 
virtual void _at_lock ()
 
virtual void _at_unlock ()
 
void _basic_construct (uint32_t flags_)
 
void _basic_destroy ()
 

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

Factory of functors.

Member Enumeration Documentation

◆ construct_flags

construct flags

Enumerator
CONSTRUCT_NONE 

No flags.

CONSTRUCT_NO_PRELOAD 

Do not preload factories from system register.

CONSTRUCT_FACTORY_VERBOSE 

Activate verbosity of the embedded factory.

Constructor & Destructor Documentation

◆ functor_factory() [1/2]

mygsl::functor_factory::functor_factory ( )

Default constructor.

◆ functor_factory() [2/2]

mygsl::functor_factory::functor_factory ( uint32_t  flags_)

Constructor.

◆ ~functor_factory()

virtual mygsl::functor_factory::~functor_factory ( )
virtual

Destructor.

Member Function Documentation

◆ _allocate()

i_unary_function* mygsl::functor_factory::_allocate ( const std::string &  functor_id_)
protected

◆ _at_lock()

virtual void mygsl::functor_factory::_at_lock ( )
protectedvirtual

◆ _at_unlock()

virtual void mygsl::functor_factory::_at_unlock ( )
protectedvirtual

◆ _basic_construct()

void mygsl::functor_factory::_basic_construct ( uint32_t  flags_)
protected

◆ _basic_destroy()

void mygsl::functor_factory::_basic_destroy ( )
protected

◆ create() [1/3]

void mygsl::functor_factory::create ( unary_function_handle_type handle_,
const std::string &  functor_id_ 
)

Create a functor without initialization.

◆ create() [2/3]

void mygsl::functor_factory::create ( unary_function_handle_type handle_,
const std::string &  functor_id_,
const datatools::properties functor_config_ 
)

Create a functor.

◆ create() [3/3]

void mygsl::functor_factory::create ( unary_function_handle_type handle_,
const std::string &  functor_id_,
const datatools::properties functor_config_,
unary_function_dict_type functors_ 
)

Create a functor.

◆ is_locked()

bool mygsl::functor_factory::is_locked ( ) const

Check lock flag.

◆ lock()

void mygsl::functor_factory::lock ( )

Lock the factory.

◆ tree_dump()

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

Smart dump.

Reimplemented from datatools::i_tree_dumpable.

◆ unlock()

void mygsl::functor_factory::unlock ( )

Unlock the factory.


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