Diana Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
LASCIIGlobalReader Class Reference

global reader for txt files More...

Inheritance diagram for LASCIIGlobalReader:
QGlobalReader QNamed

Public Member Functions

 LASCIIGlobalReader ()
 
 ~LASCIIGlobalReader ()
 
QError Open (const std::string &filename, const std::string &opt="")
 Open file, called by QGlobalReaderDispatcher. More...
 
QError Close ()
 Close file, called by QGlobalReaderDispatcher. More...
 
const Diana::QObject * GetQObject (const std::string &name, const std::string &className, QError &err) const
 
- Public Member Functions inherited from QGlobalReader
 QGlobalReader (const std::string &name)
 constructor More...
 
virtual ~QGlobalReader ()
 destructor More...
 
template<class Q >
const Q * Get (const std::string &name, QError &err) const
 Get QObject, owned by this reader. More...
 
template<class Q >
const Q * Get (const Diana::QGlobalLabel &label, QError &err) const
 Get QObject, owned by this reader. More...
 
- Public Member Functions inherited from QNamed
 QNamed ()
 
 QNamed (const std::string &Name)
 
virtual ~QNamed ()
 
const std::string & GetName () const
 
void SetName (const std::string &name)
 

Private Member Functions

const Diana::QObject * GetQObject (const std::string &name, QError &err) const
 
double GetDouble (const std::string &name, QError &err) const
 
int GetInt (const std::string &name, QError &err) const
 
float GetFloat (const std::string &name, QError &err) const
 
bool GetBool (const std::string &name, QError &err) const
 
std::string GetString (const std::string &name, QError &err) const
 

Private Attributes

std::string fFileName
 
std::map< std::string, Diana::QObject * > * fQObjectCache
 
QASCIIfFile
 

Additional Inherited Members

- Protected Member Functions inherited from QGlobalReader
virtual const Diana::QObject * GetQObject (const Diana::QGlobalLabel &label, const std::string &className, QError &err) const
 

Detailed Description

global reader for txt files

Author
Laura Kogler

Definition at line 18 of file LASCIIGlobalReader.hh.

Constructor & Destructor Documentation

◆ LASCIIGlobalReader()

LASCIIGlobalReader::LASCIIGlobalReader ( )

Definition at line 17 of file LASCIIGlobalReader.cc.

◆ ~LASCIIGlobalReader()

LASCIIGlobalReader::~LASCIIGlobalReader ( )

Definition at line 22 of file LASCIIGlobalReader.cc.

References Close(), and fQObjectCache.

Member Function Documentation

◆ Close()

QError LASCIIGlobalReader::Close ( )
virtual

Close file, called by QGlobalReaderDispatcher.

Implements QGlobalReader.

Definition at line 43 of file LASCIIGlobalReader.cc.

References err, fFile, and QERR_SUCCESS.

Referenced by ~LASCIIGlobalReader().

◆ GetBool()

bool LASCIIGlobalReader::GetBool ( const std::string &  name,
QError err 
) const
private

◆ GetDouble()

double LASCIIGlobalReader::GetDouble ( const std::string &  name,
QError err 
) const
private

◆ GetFloat()

float LASCIIGlobalReader::GetFloat ( const std::string &  name,
QError err 
) const
private

◆ GetInt()

int LASCIIGlobalReader::GetInt ( const std::string &  name,
QError err 
) const
private

◆ GetQObject() [1/2]

const QObject * LASCIIGlobalReader::GetQObject ( const std::string &  name,
const std::string &  className,
QError err 
) const
virtual

Reimplemented from QGlobalReader.

Definition at line 51 of file LASCIIGlobalReader.cc.

References err, GetBool(), GetDouble(), GetFloat(), GetInt(), and GetString().

◆ GetQObject() [2/2]

const QObject * LASCIIGlobalReader::GetQObject ( const std::string &  name,
QError err 
) const
private

◆ GetString()

std::string LASCIIGlobalReader::GetString ( const std::string &  name,
QError err 
) const
private

◆ Open()

QError LASCIIGlobalReader::Open ( const std::string &  filename,
const std::string &  opt = "" 
)
virtual

Open file, called by QGlobalReaderDispatcher.

Implements QGlobalReader.

Definition at line 28 of file LASCIIGlobalReader.cc.

References err, QASCII::Exists(), fFile, QNamed::GetName(), QERR_CANNOT_OPEN_FILE, and QERR_SUCCESS.

Member Data Documentation

◆ fFile

QASCII* LASCIIGlobalReader::fFile
private

Definition at line 47 of file LASCIIGlobalReader.hh.

Referenced by Close(), GetBool(), GetDouble(), GetFloat(), GetInt(), GetQObject(), GetString(), and Open().

◆ fFileName

std::string LASCIIGlobalReader::fFileName
private

Definition at line 45 of file LASCIIGlobalReader.hh.

◆ fQObjectCache

std::map<std::string, Diana::QObject*>* LASCIIGlobalReader::fQObjectCache
private

Definition at line 46 of file LASCIIGlobalReader.hh.

Referenced by GetQObject(), and ~LASCIIGlobalReader().


The documentation for this class was generated from the following files: