Bayeux  3.4.1
Core Foundation library for SuperNEMO
data_layout.h
Go to the documentation of this file.
1 //
4 // Copyright (c) 2015 by François Mauger <mauger@lpccaen.in2p3.fr>
5 //
6 // This file is part of Datatools.
7 //
8 // Datatools 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
11 // (at your option) any later version.
12 //
13 // Datatools is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with Datatools. If not, see <http://www.gnu.org/licenses/>.
20 
21 #ifndef DATATOOLS_INTROSPECTION_DATA_LAYOUT_H
22 #define DATATOOLS_INTROSPECTION_DATA_LAYOUT_H
23 
24 // Standard library:
25 #include <string>
26 
27 #ifndef Q_MOC_RUN
29 #endif // Q_MOC_RUN
30 
31 namespace datatools {
32 
33  namespace introspection {
34 
43  enum data_layout {
48  };
49 
51  const std::string & to_string(data_layout);
52 
54  bool from_string(const std::string & label_, data_layout & layout_);
55 
57  bool is_valid(data_layout);
58 
60  bool is_scalar(data_layout);
61 
63  bool is_vector(data_layout);
64 
65  } // namespace introspection
66 
67 } // namespace datatools
68 
69 #ifndef Q_MOC_RUN
70 // Activate reflection layer:
72 #endif // Q_MOC_RUN
73 
74 #endif // DATATOOLS_INTROSPECTION_DATA_LAYOUT_H
75 
76 // Local Variables: --
77 // mode: c++ --
78 // c-file-style: "gnu" --
79 // tab-width: 2 --
80 // End: --
data_layout
Layout (scalar/vector) of the data.
Definition: data_layout.h:43
Vector data with fixed size.
Definition: data_layout.h:46
Vector data with free size.
Definition: data_layout.h:47
Scalar data.
Definition: data_layout.h:45
Invalid data layout.
Definition: data_layout.h:44
bool from_string(const std::string &label_, access_type &access_)
Convert a string to an access type.
bool is_scalar(data_layout)
Check if a data layout is scalar.
const std::string & to_string(access_type)
Convert an access type to a string.
bool is_valid(access_type t_)
Check the validity of an access type.
bool is_vector(data_layout)
Check if a data layout is vector.
The Bayeux/datatools library top-level namespace.
Definition: algo.h:13
#define DR_TYPE_INIT(Introspectable)
Definition: reflection_interface.h:165