Bayeux
3.4.1
Core Foundation library for SuperNEMO
bayeux
datatools
types.h
Go to the documentation of this file.
1
/* Author(s): Francois Mauger <mauger@lpccaen.in2p3.fr>
3
* Creation date: 2013-03-20
4
* Last modified: 2014-06-23
5
*/
6
7
#ifndef DATATOOLS_TYPES_H
8
#define DATATOOLS_TYPES_H
9
10
// Standard library:
11
#include <string>
12
13
namespace
datatools
{
14
16
// Note (2014/06/23 FM): we should have used the
17
// datatools::bit_mask::bitXX values here, with:
18
// TYPE_NONE = 0x0,
19
// TYPE_BOOLEAN = datatools::bit_mask::bit00,
20
// TYPE_INTEGER = datatools::bit_mask::bit01,
21
// TYPE_REAL = datatools::bit_mask::bit02,
22
// TYPE_STRING = datatools::bit_mask::bit03,
23
// However, this is not compatible with the original values
24
// below.
25
// Any change would imply some modification of the datatools::properties
26
// serialization method and version.
27
// We do not change it for now.
28
enum
basic_type
{
29
TYPE_NONE
= 0x0,
30
TYPE_BOOLEAN
= 0x1,
31
TYPE_INTEGER
= 0x2,
32
TYPE_REAL
= 0x3,
33
TYPE_STRING
= 0x4,
34
TYPE_ANY
= 0xFFFFFFFF
35
};
36
38
enum
data_type
{
39
DATA_NONE
= 0x0,
40
DATA_SCALAR
= 0x1,
41
DATA_ARRAY
= 0x2,
42
DATA_ANY
=
DATA_SCALAR
|
DATA_ARRAY
43
};
44
46
const
std::string
get_label_from_type
(
int
type_);
47
49
int
get_type_from_label
(
const
std::string & label_);
50
51
}
// end of namespace datatools
52
53
#endif // DATATOOLS_TYPES_H
54
55
// Local Variables: --
56
// mode: c++ --
57
// c-file-style: "gnu" --
58
// tab-width: 2 --
59
// End: --
datatools::DATA_NONE
Not defined.
Definition:
types.h:39
datatools::TYPE_ANY
Any type.
Definition:
types.h:34
datatools::get_label_from_type
const std::string get_label_from_type(int type_)
Return the label associated to a data type.
datatools::DATA_SCALAR
Data is a scalar.
Definition:
types.h:40
datatools::TYPE_INTEGER
Integer data.
Definition:
types.h:31
datatools::TYPE_REAL
Real data (should be 0x4 to use it as a mask)
Definition:
types.h:32
datatools::TYPE_STRING
Character string data (should be 0x8 to use it as a mask)
Definition:
types.h:33
datatools::TYPE_NONE
Not defined.
Definition:
types.h:29
datatools::basic_type
basic_type
Basic type identifier.
Definition:
types.h:28
datatools::get_type_from_label
int get_type_from_label(const std::string &label_)
Return the data type associated to a label.
datatools::data_type
data_type
Data type.
Definition:
types.h:38
datatools::DATA_ARRAY
Data is an array (or vector)
Definition:
types.h:41
datatools::DATA_ANY
Data can be both.
Definition:
types.h:42
datatools
The Bayeux/datatools library top-level namespace.
Definition:
algo.h:13
datatools::TYPE_BOOLEAN
Boolean data.
Definition:
types.h:30
Generated by
1.8.15