OPAL (Object Oriented Parallel Accelerator Library)
2024.2
OPAL
optimizer
Util
SDDSParser
include.hpp
Go to the documentation of this file.
1
//
2
// Struct include
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 INCLUDE_HPP_
18
#define INCLUDE_HPP_
19
20
#include <array>
21
#include <iostream>
22
#include <list>
23
#include <ostream>
24
#include <string_view>
25
#include <utility>
26
27
namespace
SDDS
{
28
struct
include
{
29
enum class
attributes
{
30
FILENAME
,
31
INCLUDE
32
};
33
34
template
<attributes A>
35
struct
complainUnsupported
{
36
static
bool
apply
() {
37
constexpr
std::array<std::pair<attributes, std::string_view>, 2> unsupportedAttributeNames = {{
38
{
attributes::FILENAME
,
"filename"
},
39
{
attributes::INCLUDE
,
"include"
}
40
}};
41
42
for
(
const
auto
& item : unsupportedAttributeNames) {
43
if
(item.first == A) {
44
std::cerr << item.second <<
" not supported yet"
<< std::endl;
45
return
false
;
46
}
47
}
48
49
return
true
;
50
}
51
};
52
};
53
54
struct
includeList
: std::list<include> {};
55
56
inline
std::ostream&
operator<<
(std::ostream& out,
const
include
&) {
57
return
out;
58
}
59
}
60
61
#endif
/* INCLUDE_HPP_ */
SDDS
Definition
SDDSParser.h:33
SDDS::operator<<
std::ostream & operator<<(std::ostream &out, const array &)
Definition
array.hpp:72
SDDS::include
Definition
include.hpp:28
SDDS::include::attributes
attributes
Definition
include.hpp:29
SDDS::include::attributes::INCLUDE
@ INCLUDE
SDDS::include::attributes::FILENAME
@ FILENAME
SDDS::include::complainUnsupported
Definition
include.hpp:35
SDDS::include::complainUnsupported::apply
static bool apply()
Definition
include.hpp:36
SDDS::includeList
Definition
include.hpp:54
Generated on Wed Sep 30 2026 07:14:50 for OPAL (Object Oriented Parallel Accelerator Library) by
1.9.8