MURE
|
#include <SerpentOutputReader.hxx>
Public Member Functions | |
OutputReader () | |
constructor | |
virtual | ~OutputReader () |
destructor | |
virtual void | Read (const string &fileName) |
bool | isFileRead () const |
returns if file was read | |
virtual void | Clear ()=0 |
virtual string | Print ()=0 |
virtual void | Write (const string &fileName) |
writes data using Print method into new result file (for multi-run) | |
virtual OutputReader * | GetNewInstance ()=0 |
Protected Member Functions | |
bool | IsWhite (const string &line) const |
resturns true if line conststs of only white spaces | |
char | GetSeparator () const |
resturns sepeparator (white space or semiclon) | |
bool | HasPermision (const string &rowName) const |
returns true if row name(heading) is added to allowe rows | |
void | AddAllowedRow (const string &rowName) |
adds row head to rows which are allowed to be read | |
void | AddForbiddenRow (const string &rowName) |
adds row head to rows which are NOT allowed to be read | |
void | AllowRowsByDefault () |
sets default perrmision to read rows to true | |
void | ForbiddRowsByDefault () |
sets default perrmision to read rows to false | |
void | SetSeparator (char separator) |
sets separator | |
virtual void | ParseBlock (const string &block)=0 |
vector< string > | GetPermittedRowNames () const |
gets all rows which can be read | |
Static Protected Attributes | |
static const char | COMMENT_CHAR = '%' |
Private Types | |
typedef map< string, bool > | Permitions |
Private Attributes | |
char | fSeparator |
Permitions | fPermissions |
bool | fDefaultPermission |
bool | fFileReadSuccessfully |
Defines an abstract reader class.
Serpent result and detector files are formated with matlab synthax. For example: name1 = [1, 2, 3 ...]; name2 = [1, 2, 3 ...]; ...
Volume stimation files are formated with serpent synthax. For example: testmat1 0 9.99353E+05 % (0.001)
In this class some common rules of dealing with this files are defined.
Allways data is segregated into rows. Allways each row starts with its name. (which can mean different things, however it is allways unique indexing variable)
This class is trying to take adventage of this similarities.
|
private |
Serpent::OutputReader::OutputReader | ( | ) |
constructor
|
virtual |
destructor
|
protected |
adds row head to rows which are allowed to be read
|
protected |
adds row head to rows which are NOT allowed to be read
|
protected |
sets default perrmision to read rows to true
|
pure virtual |
Implemented in Serpent::DetectorOutputReader, Serpent::ResultOutputReader, and Serpent::VolumeCalcOutputReader.
|
protected |
sets default perrmision to read rows to false
|
pure virtual |
Implemented in Serpent::DetectorOutputReader, Serpent::ResultOutputReader, and Serpent::VolumeCalcOutputReader.
|
protected |
gets all rows which can be read
|
protected |
resturns sepeparator (white space or semiclon)
|
protected |
returns true if row name(heading) is added to allowe rows
bool Serpent::OutputReader::isFileRead | ( | ) | const |
returns if file was read
|
protected |
resturns true if line conststs of only white spaces
|
protectedpure virtual |
Implemented in Serpent::DetectorOutputReader, Serpent::ResultOutputReader, and Serpent::VolumeCalcOutputReader.
|
pure virtual |
Implemented in Serpent::DetectorOutputReader, Serpent::ResultOutputReader, and Serpent::VolumeCalcOutputReader.
|
virtual |
Reimplemented in Serpent::DetectorOutputReader, and Serpent::ResultOutputReader.
|
protected |
sets separator
|
virtual |
writes data using Print method into new result file (for multi-run)
|
staticprotected |
|
private |
|
private |
|
private |
|
private |