MURE
Loading...
Searching...
No Matches
SerpentVolumeCalcOutputReader.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 SERPENTVOLUMECALCOUTPUTREADER_HXX
20#define SERPENTVOLUMECALCOUTPUTREADER_HXX
21#include <map>
22#include <string>
23
25#include "libValErr/ValErr.hxx"
26
28
34namespace Serpent
35{
36
38
45{
46 public:
48 ~VolumeCalcOutputReader() override;
49 ValErr_t GetVolume(const string &materialName);
50 void Clear() override;
51 string Print() override;
53
54 private:
55 static const char LEFT_BRACKET = '(';
56 static const char RIGHT_BRACKET = ')';
57 static const string SKIPPED_PHRASE;
58 static const unsigned VALUE_INDEX = 2;
59 static const unsigned ERROR_INDEX = 4;
60 typedef map < string, ValErr_t *> Table;
62 //string CleanNumberString(const string &text) const;
63
64 protected:
65 bool IsRead(const string &block) const;
66 void ParseBlock(const string &block) override;
67};
68
69
70}
71
72#endif // SERPENTVOLUMECALCOUTPUTREADER_HXX
Definition SerpentOutputReader.hxx:72
Define a reader class.
Definition SerpentVolumeCalcOutputReader.hxx:45
VolumeCalcOutputReader * GetNewInstance() override
get new instance (I think the method should be erased)
Definition SerpentVolumeCalcOutputReader.cxx:119
static const unsigned ERROR_INDEX
Definition SerpentVolumeCalcOutputReader.hxx:59
map< string, ValErr_t * > Table
Definition SerpentVolumeCalcOutputReader.hxx:60
bool IsRead(const string &block) const
is file already read
Definition SerpentVolumeCalcOutputReader.cxx:94
void ParseBlock(const string &block) override
parse block
Definition SerpentVolumeCalcOutputReader.cxx:56
static const string SKIPPED_PHRASE
Definition SerpentVolumeCalcOutputReader.hxx:57
static const unsigned VALUE_INDEX
Definition SerpentVolumeCalcOutputReader.hxx:58
static const char RIGHT_BRACKET
Definition SerpentVolumeCalcOutputReader.hxx:56
Table * fData
Definition SerpentVolumeCalcOutputReader.hxx:61
VolumeCalcOutputReader()
constructor
Definition SerpentVolumeCalcOutputReader.cxx:31
~VolumeCalcOutputReader() override
deconstructor
Definition SerpentVolumeCalcOutputReader.cxx:39
string Print() override
Printing method used for debugging.
Definition SerpentVolumeCalcOutputReader.cxx:109
static const char LEFT_BRACKET
Definition SerpentVolumeCalcOutputReader.hxx:55
ValErr_t GetVolume(const string &materialName)
return volume for given material
Definition SerpentVolumeCalcOutputReader.cxx:101
void Clear() override
clear data
Definition SerpentVolumeCalcOutputReader.cxx:50
the namespace use to couple MURE and Serpent

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