QGlobalWriter Class Reference

List of all members.

Detailed Description

Abstract class for global writers.

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

Global writers 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_WRITER(clazz, ext)
 
where clazz is the clazz name without "" and ext is the file extension
that identifies the file types that this writer can manage.
Exemplum for the text file writer LMyGlobalWriter:
 REGISTER_GLOBAL_WRITER(LMyGlobalWriter,".txt")
 


Public Member Functions

 QGlobalWriter (const std::string &name)
 constructor
virtual ~QGlobalWriter ()
 destructor
virtual void SetQObject (const std::string &name, const QObject *obj)
 Set QObject, owned by the caller, - leave it undeclared if you can't implement it.
virtual void SetTObject (const std::string &name, TObject *obj)
 Set TObject, owned by the caller, - leave it undeclared if you can't implement it.
virtual void SetDouble (const std::string &name, double obj)
 Set double, leave it undeclared if you can't implement it.
virtual void SetInt (const std::string &name, int obj)
 Set int, leave it undeclared if you can't implement it.
virtual void SetFloat (const std::string &name, float obj)
 Set float, leave it undeclared if you can't implement it.
virtual void SetBool (const std::string &name, bool obj)
 Set bol, leave it undeclared if you can't implement it.
virtual void SetString (const std::string &name, const std::string &obj)
 Set 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 QGlobalWriterDispatcher.
virtual QError Close ()=0
 Close file, called by QGlobalWriterDispatcher.

Friends

class QGlobalWriterDispatcher


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