OPAL (Object Oriented Parallel Accelerator Library)
2024.2
OPAL
optimizer
Util
SDDSParser
associate.hpp
Go to the documentation of this file.
1
//
2
// Struct associate
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 ASSOCIATE_HPP_
18
#define ASSOCIATE_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
associate
{
29
enum class
attributes
{
30
NAME
,
31
FILENAME
,
32
PATH
,
33
DESCRIPTION
,
34
CONTENTS
,
35
SDDS
,
36
ASSOCIATE
37
};
38
39
template
<attributes A>
40
struct
complainUnsupported
{
41
static
bool
apply
() {
42
constexpr
std::array<std::pair<attributes, std::string_view>, 7> unsupportedAttributeNames = {{
43
{
attributes::NAME
,
"name"
},
44
{
attributes::FILENAME
,
"filename"
},
45
{
attributes::PATH
,
"path"
},
46
{
attributes::DESCRIPTION
,
"description"
},
47
{
attributes::CONTENTS
,
"contents"
},
48
{
attributes::SDDS
,
"sdds"
},
49
{
attributes::ASSOCIATE
,
"associate"
}
50
}};
51
52
for
(
const
auto
& item : unsupportedAttributeNames) {
53
if
(item.first == A) {
54
std::cerr << item.second <<
" not supported yet"
<< std::endl;
55
return
false
;
56
}
57
}
58
59
return
true
;
60
}
61
};
62
};
63
64
struct
associateList
: std::list<associate> {};
65
66
inline
std::ostream&
operator<<
(std::ostream& out,
const
associate
&) {
67
return
out;
68
}
69
}
70
71
#endif
/* ASSOCIATE_HPP_ */
SDDS
Definition
SDDSParser.h:33
SDDS::operator<<
std::ostream & operator<<(std::ostream &out, const array &)
Definition
array.hpp:72
SDDS::associate
Definition
associate.hpp:28
SDDS::associate::attributes
attributes
Definition
associate.hpp:29
SDDS::associate::attributes::DESCRIPTION
@ DESCRIPTION
SDDS::associate::attributes::FILENAME
@ FILENAME
SDDS::associate::attributes::PATH
@ PATH
SDDS::associate::attributes::SDDS
@ SDDS
SDDS::associate::attributes::CONTENTS
@ CONTENTS
SDDS::associate::attributes::ASSOCIATE
@ ASSOCIATE
SDDS::associate::attributes::NAME
@ NAME
SDDS::associate::complainUnsupported
Definition
associate.hpp:40
SDDS::associate::complainUnsupported::apply
static bool apply()
Definition
associate.hpp:41
SDDS::associateList
Definition
associate.hpp:64
Generated on Wed Sep 30 2026 07:14:50 for OPAL (Object Oriented Parallel Accelerator Library) by
1.9.8