Bayeux  3.4.1
Core Foundation library for SuperNEMO
multiple_items_model.h
Go to the documentation of this file.
1 /* Author (s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2010-02-20
4  * Last modified: 2014-05-19
5  *
6  * License:
7  *
8  * Description:
9  *
10  * A model that hosts several objects (items) in a box mother shape
11  *
12  * History:
13  *
14  */
15 
16 #ifndef GEOMTOOLS_MULTIPLE_ITEMS_MODEL_H
17 #define GEOMTOOLS_MULTIPLE_ITEMS_MODEL_H 1
18 
19 // Standard library:
20 #include <string>
21 
22 // Third party:
23 // - Bayeux/datatools:
24 #include <datatools/properties.h>
25 
26 // This project:
29 #include <geomtools/box.h>
30 
31 namespace geomtools {
32 
34  class multiple_items_model : public i_boxed_model
35  {
36  public:
37 
38  MWIM & grab_internals ();
39 
40  const MWIM & get_internals () const;
41 
42  virtual const geomtools::box & get_box () const;
43 
44  const box & get_solid () const;
45 
46  const std::string & get_material_name () const;
47 
48  void set_material_name (const std::string &);
49 
50  virtual std::string get_model_id () const;
51 
54 
56  virtual ~multiple_items_model ();
57 
59  virtual void tree_dump (std::ostream & out_ = std::clog,
60  const std::string & title_ = "",
61  const std::string & indent_ = "",
62  bool inherit_ = false) const;
63 
64  protected:
65 
67  virtual void _at_construct (const std::string & label_,
68  const datatools::properties & config_,
69  models_col_type * models_ = 0);
70 
71  private:
72 
73  std::string _material_name_;
74  box _solid_;
75  MWIM _internals_;
76 
77  // registration interface :
79 
80  };
81 
82 } // end of namespace geomtools
83 
84 #endif // GEOMTOOLS_MULTIPLE_ITEMS_MODEL_H
85 
86 /*
87 ** Local Variables: --
88 ** mode: c++ --
89 ** c-file-style: "gnu" --
90 ** tab-width: 2 --
91 ** End: --
92 */
virtual void _at_construct(const std::string &label_, const datatools::properties &config_, models_col_type *models_=0)
Construction.
const box & get_solid() const
virtual ~multiple_items_model()
Destructor.
void set_material_name(const std::string &)
The 3D shape model for a box.
Definition: box.h:44
A geometry model implementing a simple box with several daughter volumes.
Definition: multiple_items_model.h:34
virtual std::string get_model_id() const
Handler for internal items.
Definition: model_with_internal_items_tools.h:37
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
multiple_items_model()
Default constructor.
std::map< std::string, i_model * > models_col_type
Type alias for dictionary of geometry model plain handles.
Definition: model_tools.h:29
virtual const geomtools::box & get_box() const
const MWIM & get_internals() const
const std::string & get_material_name() const
#define GEOMTOOLS_MODEL_REGISTRATION_INTERFACE(ModelClassName)
Definition: model_macros.h:30
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39
A dictionary of arbitrary properties.
Definition: properties.h:125