Bayeux  3.4.1
Core Foundation library for SuperNEMO
variant_physical.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date : 2014-05-11
4  * Last modified : 2014-07-18
5  *
6  * Copyright (C) 2014 Francois Mauger <mauger@lpccaen.in2p3.fr>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or (at
11  * your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  *
23  *
24  * Description:
25  *
26  * The physical instance of a configuration variant.
27  *
28  */
29 
30 #ifndef DATATOOLS_CONFIGURATION_VARIANT_PHYSICAL_H
31 #define DATATOOLS_CONFIGURATION_VARIANT_PHYSICAL_H
32 
33 // Standard library:
34 #include <string>
35 
36 // This project (Bayeux/datatools)
37 #include <datatools/i_tree_dump.h>
40 
41 namespace datatools {
42 
43  namespace configuration {
44 
45  // Forward declaration:
46  class variant_model;
47 
50  {
51  public:
52 
54  virtual bool is_name_valid(const std::string & name_) const;
55 
58 
61 
63  void set(const std::string & name_,
64  const std::string & desc_,
65  const vm_handle_type & variant_model_handle_);
66 
68  const variant_model & get_model() const;
69 
71  const vm_handle_type & get_model_handle() const;
72 
74  virtual void tree_dump(std::ostream& out_ = std::clog,
75  const std::string& title_ = "",
76  const std::string& indent_ = "",
77  bool inherit_ = false) const;
78 
79  private:
80 
81  vm_handle_type _model_;
82 
83  };
84 
85  } // end of namespace configuration
86 
87 } // end of namespace datatools
88 
89 #endif // DATATOOLS_CONFIGURATION_VARIANT_PHYSICAL_H
90 
91 // Local Variables: --
92 // mode: c++ --
93 // c-file-style: "gnu" --
94 // tab-width: 2 --
95 // End: --
Physical variant physical.
Definition: variant_physical.h:49
Model of a configuration variant.
Definition: variant_model.h:59
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
virtual bool is_name_valid(const std::string &name_) const
Check if a name is valid.
void set(const std::string &name_, const std::string &desc_, const vm_handle_type &variant_model_handle_)
Set the physical.
The Bayeux/datatools library top-level namespace.
Definition: algo.h:13
const vm_handle_type & get_model_handle() const
Return the handle on the model of the variant.
A base class with useful attributes usable in many contexts.
Definition: enriched_base.h:52
const variant_model & get_model() const
Return the model of the variant.