OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
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 "ast.hpp"
21#include "error_handler.hpp"
22#include "skipper.hpp"
23
24#include <list>
25
26namespace SDDS {
27 struct associate {
29
30 template <attributes A>
32 static bool apply() {
33 std::string attributeString;
34 switch (A) {
35 case NAME:
36 attributeString = "name";
37 break;
38 case FILENAME:
39 attributeString = "filename";
40 break;
41 case PATH:
42 attributeString = "path";
43 break;
44 case DESCRIPTION:
45 attributeString = "description";
46 break;
47 case CONTENTS:
48 attributeString = "contents";
49 break;
50 case SDDS:
51 attributeString = "sdds";
52 break;
53 case ASSOCIATE:
54 attributeString = "associate";
55 break;
56 default:
57 return true;
58 }
59 std::cerr << attributeString << " not supported yet" << std::endl;
60 return false;
61 }
62 };
63 };
64
65 struct associateList : std::list<associate> {};
66
67 inline std::ostream& operator<<(std::ostream& out, const associate&) { return out; }
68} // namespace SDDS
69
70// Associate parsing is now handled by SimpleParser
71#endif /* ASSOCIATE_HPP_ */
std::ostream & operator<<(std::ostream &out, const array &)
Definition array.hpp:87