QGlobalReader Class Reference

List of all members.

Detailed Description

Abstract class for global readers.

Author:
Marco Vignati
Global readers are managed by the QGlobalReaderDispatcher class that
takes care of file opening and closing when it is necessary.

Global readers have to prepend an "L" to their names as they are
loadable plugins. In the implementation file the following macro
not followed by semicolon have to be used in order to generate the
code needed by the QGeneralFactory:

 REGISTER_GLOBAL_READER(clazz, ext)
 
where clazz is the clazz name without "" and ext is the file extension
that identifies the file types that this reader can manage.
Exemplum for the text file reader LMyGlobalReader:
 REGISTER_GLOBAL_READER(LMyGlobalReader,".txt")
 


Public Member Functions

 QGlobalReader (const std::string &name)
 constructor
virtual ~QGlobalReader ()
 destructor
virtual const QObjectGetQObject (const std::string &name) const
 Get QObject, owned by this reader - leave it undeclared if you can't implement it.
virtual const TObject * GetTObject (const std::string &name) const
 Get TObject, owned by this reader - leave it undeclared if you can't implement it.
virtual double GetDouble (const std::string &name) const
 Get double, leave it undeclared if you can't implement it.
virtual int GetInt (const std::string &name) const
 Get int, leave it undeclared if you can't implement it.
virtual float GetFloat (const std::string &name) const
 Get float, leave it undeclared if you can't implement it.
virtual bool GetBool (const std::string &name) const
 Get bool, leave it undeclared if you can't implement it.
virtual std::string GetString (const std::string &name) const
 Get string, leave it undeclared if you can't implement it.

Protected Member Functions

virtual QError Open (const std::string &filename, const std::string &opt="")=0
 Open file, called by QGlobalReaderDispatcher.
virtual QError Close ()=0
 Close file, called by QGlobalReaderDispatcher.

Friends

class QGlobalReaderDispatcher


The documentation for this class was generated from the following files:
Generated on Fri Mar 6 13:40:43 2009 for CUORE Software by  doxygen 1.5.1