OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
description.hpp
Go to the documentation of this file.
1//
2// Struct description
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 DESCRIPTION_HPP_
18#define DESCRIPTION_HPP_
19
20#include "ast.hpp"
21#include "error_handler.hpp"
22#include "skipper.hpp"
23
24#include <optional>
25
26namespace SDDS {
27 struct description {
28 std::optional<std::string> text_m;
29 std::optional<std::string> content_m;
30 };
31
32 inline std::ostream& operator<<(std::ostream& out, const description& desc) {
33 if (desc.text_m) out << "text = " << *desc.text_m << ", ";
34 if (desc.content_m) out << "content = " << *desc.content_m;
35 return out;
36 }
37} // namespace SDDS
38
39// Description parsing is now handled by SimpleParser
40#endif /* DESCRIPTION_HPP_ */
std::optional< std::string > content_m
std::optional< std::string > text_m
std::ostream & operator<<(std::ostream &out, const array &)
Definition array.hpp:87