Abstract base class for Qt client and server output. More...
#include <qtout.h>
Public Types | |
enum | FileType { Header, Source } |
types of files generated More... | |
enum | InOut { In, Out } |
Public Member Functions | |
WocQtOut (QDomElement &) | |
creates a Qt output object from the corresponding XML tag that specifies what kind of output is desired. | |
~WocQtOut ()=0 | |
deletes the output object | |
void | addIfaceHeaderPrefix (const QString &s) |
adds data to the prefix section of the interface class header, this is for include's and forward declarations | |
void | addIfaceHeaderClass (const QString &s) |
adds data to the class body of the interface class header, this is for method declarations | |
void | addIfaceImpl (const QString &) |
adds code to the implementation file of the interface class | |
QString | qttype (const WocClass &, QString, bool dolist=true) |
helper: generate a proper Qt type for a property | |
QString | qttype (const WocTransaction &, QString, InOut) |
helper: generate a proper QT type for a transaction variable | |
QString | qtobjtype (const WocTransaction &, QString, InOut) |
helper: generate a proper QT type for a transaction variable, WO* only | |
void | addFile (QString basename) |
helper: adds a file to the project file | |
void | addFile (FileType kind, QString fname) |
helper: adds a file to the project file | |
void | addProjectLine (QString) |
helper: add a line to the project file | |
void | addPostIface (QString) |
helper: adds a line after the class definition of the interface class | |
QString | ifaceClassName () const |
helper: returns the class name of the interface class | |
void | addScriptInit (QString s) |
helper: adds a line to the script initializer; this is ignored if scripting is inactive | |
bool | doGenerateScripting () const |
helper: returns true if sub-classes are supposed to create scripting code | |
QString | namePrefix () const |
returns the class name prefix configured for this output | |
QString | languageSpec () const |
returns the language output spec | |
QString | baseDir () const |
returns the base directory of the project | |
QString | subDir () const |
returns the sub directory relative to the project where to store files | |
QString | destinationPath () const |
returns the complete path for files, baseDir()+subDir() | |
QString | transactionBase () const |
returns the base class of all transactions | |
Protected Member Functions | |
virtual void | finalize () |
overloaded slot, called when parsing is finished | |
virtual void | newClass (const WocClass &) |
overloaded slot, called for each new class | |
virtual void | newTable (const WocTable &) |
overloaded slot, called for each new table | |
virtual void | newTransaction (const WocTransaction &) |
overloaded slot, called for each new transaction | |
Protected Attributes | |
QString | m_lang |
WocQtClass * | qclass |
WocQtTable * | qtable |
WocQtTransaction * | qtrans |
Private Member Functions | |
void | initScripting () |
internal: init the scripting env | |
void | initVersionH () |
internal: generate the static header for version info | |
Private Attributes | |
QString | m_basedir |
QString | m_subdir |
QString | m_prefix |
QString | m_transbase |
QString | m_postiface |
QString | m_scriptcode |
bool | m_clean |
bool | m_genscript |
MFile | m_pri |
MFile | m_iface |
MFile | m_ifacecpp |
MFile | m_hdr |
QString | m_iface_prefix |
QString | m_iface_class |
Abstract base class for Qt client and server output.
This class controls the main include files and uses helpers to generate transactions, classes and tables.
It generates the interface class, a .pri-file and an include-all file.
enum WocQtOut::FileType |
enum WocQtOut::InOut |
WocQtOut::WocQtOut | ( | QDomElement & | el | ) | [explicit] |
creates a Qt output object from the corresponding XML tag that specifies what kind of output is desired.
WocQtOut::~WocQtOut | ( | ) | [pure virtual] |
deletes the output object
void WocQtOut::addFile | ( | QString | basename | ) |
helper: adds a file to the project file
basename | the class name to add |
void WocQtOut::addFile | ( | WocQtOut::FileType | ft, | |
QString | fname | |||
) |
helper: adds a file to the project file
fname | the file name to add | |
kind | the type of file |
void WocQtOut::addIfaceHeaderClass | ( | const QString & | s | ) | [inline] |
adds data to the class body of the interface class header, this is for method declarations
void WocQtOut::addIfaceHeaderPrefix | ( | const QString & | s | ) | [inline] |
adds data to the prefix section of the interface class header, this is for include's and forward declarations
void WocQtOut::addIfaceImpl | ( | const QString & | s | ) |
adds code to the implementation file of the interface class
void WocQtOut::addPostIface | ( | QString | s | ) |
helper: adds a line after the class definition of the interface class
void WocQtOut::addProjectLine | ( | QString | ln | ) |
helper: add a line to the project file
void WocQtOut::addScriptInit | ( | QString | s | ) | [inline] |
helper: adds a line to the script initializer; this is ignored if scripting is inactive
QString WocQtOut::baseDir | ( | ) | const [inline] |
returns the base directory of the project
QString WocQtOut::destinationPath | ( | ) | const [inline] |
returns the complete path for files, baseDir()+subDir()
bool WocQtOut::doGenerateScripting | ( | ) | const [inline] |
helper: returns true if sub-classes are supposed to create scripting code
void WocQtOut::finalize | ( | ) | [protected, virtual] |
overloaded slot, called when parsing is finished
Implements WocOutput.
QString WocQtOut::ifaceClassName | ( | ) | const [inline] |
helper: returns the class name of the interface class
void WocQtOut::initScripting | ( | ) | [private] |
internal: init the scripting env
void WocQtOut::initVersionH | ( | ) | [private] |
internal: generate the static header for version info
QString WocQtOut::languageSpec | ( | ) | const [inline] |
returns the language output spec
QString WocQtOut::namePrefix | ( | ) | const [inline] |
returns the class name prefix configured for this output
void WocQtOut::newClass | ( | const WocClass & | cls | ) | [protected, virtual] |
overloaded slot, called for each new class
Implements WocOutput.
void WocQtOut::newTable | ( | const WocTable & | tbl | ) | [protected, virtual] |
overloaded slot, called for each new table
Implements WocOutput.
void WocQtOut::newTransaction | ( | const WocTransaction & | trn | ) | [protected, virtual] |
overloaded slot, called for each new transaction
Implements WocOutput.
QString WocQtOut::qtobjtype | ( | const WocTransaction & | trn, | |
QString | v, | |||
InOut | io | |||
) |
helper: generate a proper QT type for a transaction variable, WO* only
QString WocQtOut::qttype | ( | const WocTransaction & | trn, | |
QString | v, | |||
InOut | io | |||
) |
helper: generate a proper QT type for a transaction variable
QString WocQtOut::qttype | ( | const WocClass & | cls, | |
QString | p, | |||
bool | dolist = true | |||
) |
helper: generate a proper Qt type for a property
QString WocQtOut::subDir | ( | ) | const [inline] |
returns the sub directory relative to the project where to store files
QString WocQtOut::transactionBase | ( | ) | const [inline] |
returns the base class of all transactions
QString WocQtOut::m_basedir [private] |
bool WocQtOut::m_clean [private] |
bool WocQtOut::m_genscript [private] |
MFile WocQtOut::m_hdr [private] |
MFile WocQtOut::m_iface [private] |
QString WocQtOut::m_iface_class [private] |
QString WocQtOut::m_iface_prefix [private] |
MFile WocQtOut::m_ifacecpp [private] |
QString WocQtOut::m_lang [protected] |
QString WocQtOut::m_postiface [private] |
QString WocQtOut::m_prefix [private] |
MFile WocQtOut::m_pri [private] |
QString WocQtOut::m_scriptcode [private] |
QString WocQtOut::m_subdir [private] |
QString WocQtOut::m_transbase [private] |
WocQtClass* WocQtOut::qclass [protected] |
WocQtTable* WocQtOut::qtable [protected] |
WocQtTransaction* WocQtOut::qtrans [protected] |