Bayeux  3.4.1
Core Foundation library for SuperNEMO
vg_tools.h
Go to the documentation of this file.
1 // -*- mode: c++ ; -*-
3 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
4  * Creation date: 2010-02-12
5  * Last modified: 2012-05-28
6  *
7  * License:
8  *
9  * Description:
10  *
11  * History:
12  *
13  */
14 
15 #ifndef GENVTX_DETAIL_VG_TOOLS_H
16 #define GENVTX_DETAIL_VG_TOOLS_H 1
17 
18 // Standard library:
19 #include <iostream>
20 #include <string>
21 #include <map>
22 
23 // Third party:
24 // - Bayeux/datatools:
25 #include <datatools/handle.h>
26 #include <datatools/bit_mask.h>
27 #include <datatools/properties.h>
28 
29 namespace genvtx {
30 
32 
34 
35  class vg_tools
36  {
37  public:
38  static const std::string SHAPE_REF_NONE;
39  static const std::string SHAPE_REF_PLAIN;
40  static const std::string SHAPE_REF_GETTER;
41  };
42 
43  class manager;
44 
46  {
47  public:
48 
50  {
54  };
55 
56  public:
57 
58  const datatools::properties & get_vg_config () const;
59 
61 
62  void set_vg_config (const datatools::properties &);
63 
64  const std::string & get_vg_name () const;
65 
66  void set_vg_name (const std::string &);
67 
68  const std::string & get_vg_id () const;
69 
70  void set_ptr (i_vertex_generator *);
71 
72  void set_vg_id (const std::string &);
73 
74  bool has_manager () const;
75 
77 
78  void reset_manager ();
79 
80  void set_blank ();
81 
82  void set_created ();
83 
84  void set_initialized ();
85 
86  void set_uninitialized ();
87 
88  bool is_created () const;
89 
90  bool is_initialized () const;
91 
93  vg_entry_type ();
94 
96  bool has_vg () const;
97 
98  const i_vertex_generator & get_vg () const;
99 
101 
102  const vg_handle_type & get_vg_handle () const;
103 
105 
107 
108  virtual void tree_dump (std::ostream & out_ = std::clog,
109  const std::string & title_ = "",
110  const std::string & indent_ = "",
111  bool inherit_ = false) const;
112 
113 
114  private:
115 
116 
117  std::string _vg_name_;
118  std::string _vg_id_;
119  datatools::properties _vg_config_;
120  uint32_t _vg_status_;
121  vg_handle_type _vg_handle_;
122  ::genvtx::manager * _manager_;
123  };
124 
125  typedef std::map<std::string, vg_entry_type> vg_dict_type;
126 
127 } // end of namespace genvtx
128 
129 #endif // GENVTX_DETAIL_VG_TOOLS_H
datatools::handle< i_vertex_generator > vg_handle_type
Definition: vg_tools.h:31
void set_manager(genvtx::manager &)
bool is_created() const
Top-level namespace of the Bayeux/genvtx module library.
Definition: box_model_vg.h:32
Definition: vg_tools.h:53
static const uint32_t bit01
Definition: bit_mask.h:28
void set_created()
vg_entry_type()
Constructor.
Definition: vg_tools.h:35
Vertex generator manager.
Definition: manager.h:81
const i_vertex_generator & get_vg() const
i_vertex_generator & grab_vg()
const std::string & get_vg_name() const
const vg_handle_type & get_vg_handle() const
const std::string & get_vg_id() const
vg_handle_type & grab_initialized_vg_handle()
static const std::string SHAPE_REF_GETTER
Definition: vg_tools.h:40
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
void reset_manager()
Definition: vg_tools.h:52
void set_blank()
static const std::string SHAPE_REF_NONE
Definition: vg_tools.h:38
const datatools::properties & get_vg_config() const
The base interface class for all vertex generator classes.
Definition: i_vertex_generator.h:59
bool has_manager() const
void set_vg_id(const std::string &)
status_type
Definition: vg_tools.h:49
vg_handle_type & grab_vg_handle()
void set_initialized()
void set_vg_name(const std::string &)
static const uint32_t bit00
Definition: bit_mask.h:27
void set_ptr(i_vertex_generator *)
std::map< std::string, vg_entry_type > vg_dict_type
Definition: vg_tools.h:125
bool is_initialized() const
static const std::string SHAPE_REF_PLAIN
Definition: vg_tools.h:39
datatools::properties & grab_vg_config()
Definition: vg_tools.h:51
void set_uninitialized()
void set_vg_config(const datatools::properties &)
bool has_vg() const
Check is the vg is referenced in the embedded handle.
A dictionary of arbitrary properties.
Definition: properties.h:125
Definition: vg_tools.h:45