Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | Protected Member Functions | List of all members
geomtools::shape_factory Class Reference

The factory of shapes. More...

#include <bayeux/geomtools/shape_factory.h>

Inheritance diagram for geomtools::shape_factory:
datatools::i_tree_dumpable

Public Member Functions

 shape_factory ()
 Default constructor. More...
 
virtual ~shape_factory ()
 Destructor. More...
 
const i_object_3d::handle_dict_typeget_shapes () const
 Return a reference to a non mutable dictionary of shapes. More...
 
i_object_3dcreate (const std::string &name_, const std::string &type_id_, const datatools::properties &config_, bool store_=true)
 Create a new 3D object and return the reference to it. More...
 
i_object_3dcreate_ptr (const std::string &name_, const std::string &type_id_, const datatools::properties &config_)
 Create a new 3D object and return the pointer to it. More...
 
bool has (const std::string &name_, const std::string &type_id_="") const
 Check if a shape with given name and optional type exists. More...
 
const i_object_3dget (const std::string &name_) const
 Get a reference to the const shape given its name. More...
 
void keys (std::vector< std::string > &keys_) const
 Build the list of shapes' names. More...
 
datatools::logger::priority get_logging_priority () const
 Return the logging priority. More...
 
void set_logging_priority (datatools::logger::priority)
 Set the logging priority. More...
 
bool is_initialized () const
 Check initialization flag. More...
 
void initialize_simple ()
 Simple initialization. More...
 
void initialize (const datatools::properties &config_)
 Initialization. More...
 
void reset ()
 Reset. More...
 
void load (const std::string &shapes_def_file_)
 Load a shapes definition file. More...
 
void load_list (const std::string &list_file_)
 Load a file that contains a list of shapes definition filenames : More...
 
void parse_shapes (const datatools::properties &defs_)
 Parse a container of properties and extract a set of shapes from it. 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
 

Protected Member Functions

void _at_init ()
 Initialization action. More...
 
i_object_3d_create (const std::string &name_, const std::string &type_id_, const datatools::properties &config_, bool store_)
 Create a new 3D object and return the pointer to it. More...
 

Additional Inherited Members

- 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 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 factory of shapes.

Constructor & Destructor Documentation

◆ shape_factory()

geomtools::shape_factory::shape_factory ( )

Default constructor.

◆ ~shape_factory()

virtual geomtools::shape_factory::~shape_factory ( )
virtual

Destructor.

Member Function Documentation

◆ _at_init()

void geomtools::shape_factory::_at_init ( )
protected

Initialization action.

◆ _create()

i_object_3d* geomtools::shape_factory::_create ( const std::string &  name_,
const std::string &  type_id_,
const datatools::properties config_,
bool  store_ 
)
protected

Create a new 3D object and return the pointer to it.

◆ create()

i_object_3d& geomtools::shape_factory::create ( const std::string &  name_,
const std::string &  type_id_,
const datatools::properties config_,
bool  store_ = true 
)

Create a new 3D object and return the reference to it.

◆ create_ptr()

i_object_3d* geomtools::shape_factory::create_ptr ( const std::string &  name_,
const std::string &  type_id_,
const datatools::properties config_ 
)

Create a new 3D object and return the pointer to it.

◆ get()

const i_object_3d& geomtools::shape_factory::get ( const std::string &  name_) const

Get a reference to the const shape given its name.

◆ get_logging_priority()

datatools::logger::priority geomtools::shape_factory::get_logging_priority ( ) const

Return the logging priority.

◆ get_shapes()

const i_object_3d::handle_dict_type& geomtools::shape_factory::get_shapes ( ) const

Return a reference to a non mutable dictionary of shapes.

◆ has()

bool geomtools::shape_factory::has ( const std::string &  name_,
const std::string &  type_id_ = "" 
) const

Check if a shape with given name and optional type exists.

◆ initialize()

void geomtools::shape_factory::initialize ( const datatools::properties config_)

Initialization.

◆ initialize_simple()

void geomtools::shape_factory::initialize_simple ( )

Simple initialization.

◆ is_initialized()

bool geomtools::shape_factory::is_initialized ( ) const

Check initialization flag.

◆ keys()

void geomtools::shape_factory::keys ( std::vector< std::string > &  keys_) const

Build the list of shapes' names.

◆ load()

void geomtools::shape_factory::load ( const std::string &  shapes_def_file_)

Load a shapes definition file.

◆ load_list()

void geomtools::shape_factory::load_list ( const std::string &  list_file_)

Load a file that contains a list of shapes definition filenames :

◆ parse_shapes()

void geomtools::shape_factory::parse_shapes ( const datatools::properties defs_)

Parse a container of properties and extract a set of shapes from it.

◆ reset()

void geomtools::shape_factory::reset ( )

Reset.

◆ set_logging_priority()

void geomtools::shape_factory::set_logging_priority ( datatools::logger::priority  )

Set the logging priority.

◆ tree_dump()

virtual void geomtools::shape_factory::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: