Diana Software
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
QGlobalReaderDispatcher Class Reference

Class that returns a pointer to the reader matching the given input filename. More...

Inheritance diagram for QGlobalReaderDispatcher:
QNamed

Public Member Functions

 ~QGlobalReaderDispatcher ()
 
QGlobalReaderGetReader (const std::string &filename, QError &err)
 get reader More...
 
void SetCurrentReaderFilename (const std::string &filename)
 
void Clear ()
 
- 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)
 

Static Public Member Functions

static QGlobalReaderDispatcherGetInstance ()
 

Private Member Functions

 QGlobalReaderDispatcher ()
 

Private Attributes

std::map< std::string, QGlobalReader * > fReaders
 
QGlobalReaderfLastReader
 
std::string fCurrentReaderFilename
 

Friends

class Diana::QSequence
 

Detailed Description

Class that returns a pointer to the reader matching the given input filename.

Author
Marco Vignati

the GetReader methods ask to the QGeneralFactory for all the QGlobalReader registered
then return a pointer to the reader matching the extension of the given input filename.
If such a reader has previously been created it just returns a reference to it, otherwise
this class will take care of creating the right QGlobalReader and try to open the new input file.

Definition at line 24 of file QGlobalReaderDispatcher.hh.

Constructor & Destructor Documentation

◆ ~QGlobalReaderDispatcher()

QGlobalReaderDispatcher::~QGlobalReaderDispatcher ( )

Definition at line 106 of file QGlobalReaderDispatcher.cc.

References Clear().

◆ QGlobalReaderDispatcher()

QGlobalReaderDispatcher::QGlobalReaderDispatcher ( )
private

Definition at line 16 of file QGlobalReaderDispatcher.cc.

References fCurrentReaderFilename, and fLastReader.

Member Function Documentation

◆ Clear()

void QGlobalReaderDispatcher::Clear ( )

◆ GetInstance()

QGlobalReaderDispatcher & QGlobalReaderDispatcher::GetInstance ( )
static

◆ GetReader()

QGlobalReader * QGlobalReaderDispatcher::GetReader ( const std::string &  filename,
QError err 
)

◆ SetCurrentReaderFilename()

void QGlobalReaderDispatcher::SetCurrentReaderFilename ( const std::string &  filename)
inline

Definition at line 37 of file QGlobalReaderDispatcher.hh.

References fCurrentReaderFilename.

Referenced by QReader::NotifyOpenNewFile().

Friends And Related Function Documentation

◆ Diana::QSequence

friend class Diana::QSequence
friend

Definition at line 44 of file QGlobalReaderDispatcher.hh.

Member Data Documentation

◆ fCurrentReaderFilename

std::string QGlobalReaderDispatcher::fCurrentReaderFilename
private

◆ fLastReader

QGlobalReader* QGlobalReaderDispatcher::fLastReader
private

Definition at line 42 of file QGlobalReaderDispatcher.hh.

Referenced by Clear(), GetReader(), and QGlobalReaderDispatcher().

◆ fReaders

std::map<std::string, QGlobalReader*> QGlobalReaderDispatcher::fReaders
private

Definition at line 41 of file QGlobalReaderDispatcher.hh.

Referenced by Clear(), and GetReader().


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