Global writers are managed by the QGlobalWriterDispatcher class that
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
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 |