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

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

Inheritance diagram for QGlobalWriterDispatcher:
QNamed

Public Member Functions

 ~QGlobalWriterDispatcher ()
 
QGlobalWriterGetWriter (const std::string &filename, QError &err)
 get writer More...
 
void SetCurrentWriterFilename (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 QGlobalWriterDispatcherGetInstance ()
 

Private Member Functions

 QGlobalWriterDispatcher ()
 

Private Attributes

std::map< std::string, QGlobalWriter * > fWriters
 
QGlobalWriterfLastWriter
 
std::string fCurrentWriterFilename
 

Friends

class Diana::QSequence
 

Detailed Description

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

Author
Marco Vignati

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

Definition at line 26 of file QGlobalWriterDispatcher.hh.

Constructor & Destructor Documentation

◆ ~QGlobalWriterDispatcher()

QGlobalWriterDispatcher::~QGlobalWriterDispatcher ( )

Definition at line 99 of file QGlobalWriterDispatcher.cc.

References Clear().

◆ QGlobalWriterDispatcher()

QGlobalWriterDispatcher::QGlobalWriterDispatcher ( )
private

Definition at line 16 of file QGlobalWriterDispatcher.cc.

References fCurrentWriterFilename, and fLastWriter.

Member Function Documentation

◆ Clear()

void QGlobalWriterDispatcher::Clear ( )

◆ GetInstance()

QGlobalWriterDispatcher & QGlobalWriterDispatcher::GetInstance ( )
static

◆ GetWriter()

QGlobalWriter * QGlobalWriterDispatcher::GetWriter ( const std::string &  filename,
QError err 
)

◆ SetCurrentWriterFilename()

void QGlobalWriterDispatcher::SetCurrentWriterFilename ( const std::string &  filename)
inline

Definition at line 39 of file QGlobalWriterDispatcher.hh.

References fCurrentWriterFilename.

Friends And Related Function Documentation

◆ Diana::QSequence

friend class Diana::QSequence
friend

Definition at line 46 of file QGlobalWriterDispatcher.hh.

Member Data Documentation

◆ fCurrentWriterFilename

std::string QGlobalWriterDispatcher::fCurrentWriterFilename
private

◆ fLastWriter

QGlobalWriter* QGlobalWriterDispatcher::fLastWriter
private

Definition at line 44 of file QGlobalWriterDispatcher.hh.

Referenced by Clear(), GetWriter(), and QGlobalWriterDispatcher().

◆ fWriters

std::map<std::string, QGlobalWriter*> QGlobalWriterDispatcher::fWriters
private

Definition at line 43 of file QGlobalWriterDispatcher.hh.

Referenced by Clear(), and GetWriter().


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