OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
file.hpp
Go to the documentation of this file.
1//
2// Struct file
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 FILE_HPP_
18#define FILE_HPP_
19
20#include "array.hpp"
21#include "associate.hpp"
22#include "ast.hpp"
23#include "column.hpp"
24#include "data.hpp"
25#include "description.hpp"
26#include "error_handler.hpp"
27#include "include.hpp"
28#include "parameter.hpp"
29#include "skipper.hpp"
30#include "version.hpp"
31
32#include <optional>
33
34namespace SDDS {
53
54 inline std::ostream& operator<<(std::ostream& out, const file& fh) {
55 out << fh.sddsVersion_m << "\n";
56 if (fh.sddsDescription_m) out << *fh.sddsDescription_m << "\n";
57 for (const parameter& param : fh.sddsParameters_m) {
58 out << param << "\n";
59 }
60 for (const column& col : fh.sddsColumns_m) {
61 out << col << "\n";
62 }
63 out << fh.sddsData_m << "\n";
64
65 // if (fh.sddsAssociates_m) out << *fh.sddsAssociates_m << "\n";
66 // if (fh.sddsArrays_m) out << *fh.sddsArrays_m << "\n";
67 // if (fh.sddsIncludes_m) out << *fh.sddsIncludes_m << "\n";
68
69 out << std::endl;
70
71 return out;
72 }
73} // namespace SDDS
74
75// File parsing is now handled by SimpleParser
76#endif /* FILE_HPP_ */
std::ostream & operator<<(std::ostream &out, const array &)
Definition array.hpp:87
version sddsVersion_m
Definition file.hpp:36
std::optional< description > sddsDescription_m
Definition file.hpp:37
columnList sddsColumns_m
Definition file.hpp:39
arrayList sddsArrays_m
Definition file.hpp:42
data sddsData_m
Definition file.hpp:40
includeList sddsIncludes_m
Definition file.hpp:43
void clear()
Definition file.hpp:45
parameterList sddsParameters_m
Definition file.hpp:38
associateList sddsAssociates_m
Definition file.hpp:41