MURE
Loading...
Searching...
No Matches
SerpentOutputReader.hxx
Go to the documentation of this file.
1/*
2 This file is part of MURE,
3 Copyright (C) 2007-2021 MURE developers.
4
5 MURE is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 MURE is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with MURE. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef SERPENTOUTPUTREADER_HXX
20#define SERPENTOUTPUTREADER_HXX
21#include <libValErr/ValErr.hxx>
22#include <string>
23#include <vector>
24#include <map>
25#include <utility>
26#include <sstream>
27#include <fstream>
28
29//#include "Mock.h"
30#include "MUREGlobal.hxx"
31#include "MiscFunction.hxx"
32
33using namespace std;
34
36
43namespace Serpent
44{
45
47
72{
73 public:
74 OutputReader();
75 virtual ~OutputReader();
76 virtual void Read(const string &fileName);
77 bool isFileRead() const;
78 virtual void Clear() = 0;
79 virtual string Print() = 0;
80 virtual void Write(const string &fileName);
82 private:
84 typedef map < string, bool > Permitions;
88
89 protected:
90 static const char COMMENT_CHAR = '%';
91 bool IsWhite(const string &line) const;
92 char GetSeparator() const;
93 bool HasPermision(const string &rowName) const;
94 void AddAllowedRow(const string &rowName);
95 void AddForbiddenRow(const string &rowName);
96 void AllowRowsByDefault();
98 void SetSeparator(char separator);
99
100 virtual void ParseBlock(const string &block) = 0;
101 vector < string > GetPermittedRowNames() const;
102};
103
104}
105
106
107#endif // SERPENTOUTPUTREADER_HXX
Header file for vector operation, Regression and FindFitParameters functions.
Definition SerpentOutputReader.hxx:72
virtual void Read(const string &fileName)
Definition SerpentOutputReader.cxx:117
void AllowRowsByDefault()
sets default perrmision to read rows to true
Definition SerpentOutputReader.cxx:99
map< string, bool > Permitions
Definition SerpentOutputReader.hxx:84
virtual string Print()=0
virtual void Clear()=0
OutputReader()
constructor
Definition SerpentOutputReader.cxx:29
void SetSeparator(char separator)
sets separator
Definition SerpentOutputReader.cxx:57
virtual ~OutputReader()
destructor
Definition SerpentOutputReader.cxx:36
char GetSeparator() const
resturns sepeparator (white space or semiclon)
Definition SerpentOutputReader.cxx:51
virtual void ParseBlock(const string &block)=0
static const char COMMENT_CHAR
Definition SerpentOutputReader.hxx:90
bool isFileRead() const
returns if file was read
Definition SerpentOutputReader.cxx:111
bool fDefaultPermission
Definition SerpentOutputReader.hxx:86
Permitions fPermissions
Definition SerpentOutputReader.hxx:85
void ForbiddRowsByDefault()
sets default perrmision to read rows to false
Definition SerpentOutputReader.cxx:105
bool HasPermision(const string &rowName) const
returns true if row name(heading) is added to allowe rows
Definition SerpentOutputReader.cxx:77
bool fFileReadSuccessfully
Definition SerpentOutputReader.hxx:87
bool IsWhite(const string &line) const
resturns true if line conststs of only white spaces
Definition SerpentOutputReader.cxx:42
vector< string > GetPermittedRowNames() const
gets all rows which can be read
Definition SerpentOutputReader.cxx:63
virtual void Write(const string &fileName)
writes data using Print method into new result file (for multi-run)
Definition SerpentOutputReader.cxx:130
void AddForbiddenRow(const string &rowName)
adds row head to rows which are NOT allowed to be read
Definition SerpentOutputReader.cxx:93
char fSeparator
Definition SerpentOutputReader.hxx:83
void AddAllowedRow(const string &rowName)
adds row head to rows which are allowed to be read
Definition SerpentOutputReader.cxx:87
virtual OutputReader * GetNewInstance()=0
the namespace use to couple MURE and Serpent
the namespace of the Standard C++

MURE Project, documentation generated by Doxygen 1.9.7 - Fri Jan 19 2024