![]() |
Diana Software
|
Class that returns a pointer to the reader matching the given input filename. More...
Public Member Functions | |
| ~QGlobalReaderDispatcher () | |
| QGlobalReader * | GetReader (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 QGlobalReaderDispatcher & | GetInstance () |
Private Member Functions | |
| QGlobalReaderDispatcher () | |
Private Attributes | |
| std::map< std::string, QGlobalReader * > | fReaders |
| QGlobalReader * | fLastReader |
| std::string | fCurrentReaderFilename |
Friends | |
| class | Diana::QSequence |
Class that returns a pointer to the reader matching the given input filename.
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.
| QGlobalReaderDispatcher::~QGlobalReaderDispatcher | ( | ) |
Definition at line 106 of file QGlobalReaderDispatcher.cc.
References Clear().
|
private |
Definition at line 16 of file QGlobalReaderDispatcher.cc.
References fCurrentReaderFilename, and fLastReader.
| void QGlobalReaderDispatcher::Clear | ( | ) |
Definition at line 112 of file QGlobalReaderDispatcher.cc.
References fLastReader, and fReaders.
Referenced by QGFileHandler::ReopenFiles(), ~QGlobalReaderDispatcher(), and QSequence::~QSequence().
|
static |
Definition at line 9 of file QGlobalReaderDispatcher.cc.
Referenced by GlobalHandle< Q >::FillFromFile(), QReader::NotifyOpenNewFile(), QGFileHandler::ReopenFiles(), and QSequence::~QSequence().
| QGlobalReader * QGlobalReaderDispatcher::GetReader | ( | const std::string & | filename, |
| QError & | err | ||
| ) |
get reader
Definition at line 22 of file QGlobalReaderDispatcher.cc.
References QGlobalRWFactory::CreateGlobalReader(), err, fCurrentReaderFilename, fLastReader, fReaders, QGlobalRWFactory::GetInstance(), QGlobalRWFactory::GetListOfGlobalReaders(), QNamed::GetName(), QMessageHandler::Info(), QGlobalRWFactory::LoadPlugin(), QGlobalReader::Open(), Q_CURRENT_READER, QERR_CANNOT_OPEN_FILE, and QERR_SUCCESS.
Referenced by GlobalHandle< Q >::FillFromFile().
|
inline |
Definition at line 37 of file QGlobalReaderDispatcher.hh.
References fCurrentReaderFilename.
Referenced by QReader::NotifyOpenNewFile().
|
friend |
Definition at line 44 of file QGlobalReaderDispatcher.hh.
|
private |
Definition at line 43 of file QGlobalReaderDispatcher.hh.
Referenced by GetReader(), QGlobalReaderDispatcher(), and SetCurrentReaderFilename().
|
private |
Definition at line 42 of file QGlobalReaderDispatcher.hh.
Referenced by Clear(), GetReader(), and QGlobalReaderDispatcher().
|
private |
Definition at line 41 of file QGlobalReaderDispatcher.hh.
Referenced by Clear(), and GetReader().