Peano
Loading...
Searching...
No Matches
PeanoTextPatchFileReader.h
Go to the documentation of this file.
1#pragma once
2
3
4
5#include <string>
6#include <vector>
7
8#include "../data/PatchData.h"
9#include "PatchFileReader.h"
10
11
14
15
16#include "tarch/logging/Log.h"
17
18
19namespace convert {
20 namespace input {
21 class PeanoTextPatchFileReader;
22 }
23}
24
25
47 private:
49
50 const std::string _file;
51
52 void parsePatch( int dataSetCounter, int treeNumber, const std::vector<std::string>& patchDescription );
53 void parseVariablesDeclaration( int dataSetCounter, const std::vector<std::string>& patchDescription, const std::string& name, convert::data::PeanoDataType type );
54
55 void addDataToPatch( int dataSetCounter, const std::string& variableName, double* offset, double* size, int treeNumber, const std::vector< std::string >& textData );
56
58
60 std::vector< convert::data::DataSet > _data;
61 public:
70PeanoTextPatchFileReader(const std::string &file);
71 virtual ~PeanoTextPatchFileReader() override;
72
73 virtual void parse() override;
74
78 virtual std::vector< convert::data::DataSet > getData() const override;
79};
80
void addDataToPatch(int dataSetCounter, const std::string &variableName, double *offset, double *size, int treeNumber, const std::vector< std::string > &textData)
std::vector< convert::data::DataSet > _data
void parsePatch(int dataSetCounter, int treeNumber, const std::vector< std::string > &patchDescription)
void parseVariablesDeclaration(int dataSetCounter, const std::vector< std::string > &patchDescription, const std::string &name, convert::data::PeanoDataType type)
virtual std::vector< convert::data::DataSet > getData() const override
A file can hold a series of datasets.
PeanoTextPatchFileReader(const std::string &file)
Read in one file.
Log Device.
Definition Log.h:516