OPALX (Object Oriented Parallel Accelerator Library for Exascal)
master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
ast.hpp
Go to the documentation of this file.
1
//
2
// Namespace ast
3
//
4
// Copyright (c) 2015, Christof Metzger-Kraus, Helmholtz-Zentrum Berlin
5
// All rights reserved
6
//
7
// This file is part of OPAL.
8
//
9
// OPAL is free software: you can redistribute it and/or modify
10
// it under the terms of the GNU General Public License as published by
11
// the Free Software Foundation, either version 3 of the License, or
12
// (at your option) any later version.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
16
//
17
#ifndef AST_HPP_
18
#define AST_HPP_
19
20
#include <string>
21
#include <variant>
22
#include <vector>
23
24
namespace
SDDS
{
25
namespace
ast {
26
enum
datatype
{
FLOAT
,
DOUBLE
,
SHORT
,
LONG
,
CHARACTER
,
STRING
};
27
28
enum
datamode
{
ASCII
,
BINARY
};
29
30
enum
endianess
{
BIGENDIAN
,
LITTLEENDIAN
};
31
32
struct
nil
{};
33
34
typedef
std::variant<float, double, short, long, char, std::string>
variant_t
;
35
36
typedef
std::vector<variant_t>
columnData_t
;
37
38
inline
std::string
getDataTypeString
(
datatype
type) {
39
switch
(type) {
40
case
FLOAT
:
41
return
"float"
;
42
case
DOUBLE
:
43
return
"double"
;
44
case
SHORT
:
45
return
"short"
;
46
case
LONG
:
47
return
"long"
;
48
case
CHARACTER
:
49
return
"char"
;
50
case
STRING
:
51
return
"string"
;
52
default
:
53
return
"unknown"
;
54
}
55
}
56
57
}
// namespace ast
58
59
namespace
parser {
60
// String parsing is now handled by ValueParser
61
}
62
}
// namespace SDDS
63
64
#endif
// AST_HPP_
SDDS::ast::getDataTypeString
std::string getDataTypeString(datatype type)
Definition
ast.hpp:38
SDDS::ast::endianess
endianess
Definition
ast.hpp:30
SDDS::ast::BIGENDIAN
@ BIGENDIAN
Definition
ast.hpp:30
SDDS::ast::LITTLEENDIAN
@ LITTLEENDIAN
Definition
ast.hpp:30
SDDS::ast::datamode
datamode
Definition
ast.hpp:28
SDDS::ast::ASCII
@ ASCII
Definition
ast.hpp:28
SDDS::ast::BINARY
@ BINARY
Definition
ast.hpp:28
SDDS::ast::columnData_t
std::vector< variant_t > columnData_t
Definition
ast.hpp:36
SDDS::ast::datatype
datatype
Definition
ast.hpp:26
SDDS::ast::STRING
@ STRING
Definition
ast.hpp:26
SDDS::ast::DOUBLE
@ DOUBLE
Definition
ast.hpp:26
SDDS::ast::LONG
@ LONG
Definition
ast.hpp:26
SDDS::ast::FLOAT
@ FLOAT
Definition
ast.hpp:26
SDDS::ast::CHARACTER
@ CHARACTER
Definition
ast.hpp:26
SDDS::ast::SHORT
@ SHORT
Definition
ast.hpp:26
SDDS::ast::variant_t
std::variant< float, double, short, long, char, std::string > variant_t
Definition
ast.hpp:34
SDDS::ast::nil
Definition
ast.hpp:32
SDDS
Definition
SDDSParser.h:40
src
Utilities
SDDSParser
ast.hpp
Generated on Mon Jun 1 2026 10:40:53 for OPALX (Object Oriented Parallel Accelerator Library for Exascal) by
1.9.8