![]() |
Diana Software
|
Class that returns a pointer to the writer matching the given input filename. More...
Public Member Functions | |
| ~QGlobalWriterDispatcher () | |
| QGlobalWriter * | GetWriter (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 QGlobalWriterDispatcher & | GetInstance () |
Private Member Functions | |
| QGlobalWriterDispatcher () | |
Private Attributes | |
| std::map< std::string, QGlobalWriter * > | fWriters |
| QGlobalWriter * | fLastWriter |
| std::string | fCurrentWriterFilename |
Friends | |
| class | Diana::QSequence |
Class that returns a pointer to the writer matching the given input filename.
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.
| QGlobalWriterDispatcher::~QGlobalWriterDispatcher | ( | ) |
Definition at line 99 of file QGlobalWriterDispatcher.cc.
References Clear().
|
private |
Definition at line 16 of file QGlobalWriterDispatcher.cc.
References fCurrentWriterFilename, and fLastWriter.
| void QGlobalWriterDispatcher::Clear | ( | ) |
Definition at line 105 of file QGlobalWriterDispatcher.cc.
References QGlobalWriter::Close(), fLastWriter, and fWriters.
Referenced by ~QGlobalWriterDispatcher(), and QSequence::~QSequence().
|
static |
Definition at line 9 of file QGlobalWriterDispatcher.cc.
Referenced by QFileWriter::Init(), QRootFileWriterBase::Open(), GlobalHandle< Q >::StoreOnFile(), and QSequence::~QSequence().
| QGlobalWriter * QGlobalWriterDispatcher::GetWriter | ( | const std::string & | filename, |
| QError & | err | ||
| ) |
get writer
Definition at line 22 of file QGlobalWriterDispatcher.cc.
References QGlobalRWFactory::CreateGlobalWriter(), err, fCurrentWriterFilename, fLastWriter, fWriters, QGlobalRWFactory::GetInstance(), QGlobalRWFactory::GetListOfGlobalWriters(), QNamed::GetName(), QMessageHandler::Info(), QGlobalRWFactory::LoadPlugin(), QGlobalWriter::Open(), Q_CURRENT_WRITER, QERR_CANNOT_OPEN_FILE, and QERR_SUCCESS.
Referenced by QRootFileWriterBase::Open(), and GlobalHandle< Q >::StoreOnFile().
|
inline |
Definition at line 39 of file QGlobalWriterDispatcher.hh.
References fCurrentWriterFilename.
|
friend |
Definition at line 46 of file QGlobalWriterDispatcher.hh.
|
private |
Definition at line 45 of file QGlobalWriterDispatcher.hh.
Referenced by GetWriter(), QGlobalWriterDispatcher(), and SetCurrentWriterFilename().
|
private |
Definition at line 44 of file QGlobalWriterDispatcher.hh.
Referenced by Clear(), GetWriter(), and QGlobalWriterDispatcher().
|
private |
Definition at line 43 of file QGlobalWriterDispatcher.hh.
Referenced by Clear(), and GetWriter().