PACK WOC  $VERSION$
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
WocQtOut Class Referenceabstract

Abstract base class for Qt client and server output. More...

#include <qtout.h>

Inheritance diagram for WocQtOut:
WocOutput WocQtClientOut WocQtServerOut

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. More...
 
 ~WocQtOut ()=0
 deletes the output object More...
 
void addIfaceHeaderPrefix (const QString &s)
 adds data to the prefix section of the interface class header, this is for #include's and forward declarations More...
 
void addIfaceHeaderClass (const QString &s)
 adds data to the class body of the interface class header, this is for method declarations More...
 
void addIfaceImpl (const QString &)
 adds code to the implementation file of the interface class More...
 
QString qttype (const WocClass &, QString, bool dolist=true)
 helper: generate a proper Qt type for a property More...
 
QString qttype (const WocTransaction &, QString, InOut)
 helper: generate a proper QT type for a transaction variable More...
 
QString qtobjtype (const WocTransaction &, QString, InOut)
 helper: generate a proper QT type for a transaction variable, WO* only More...
 
void addFile (QString basename)
 helper: adds a file to the project file More...
 
void addFile (FileType kind, QString fname)
 helper: adds a file to the project file More...
 
void addProjectLine (QString)
 helper: add a line to the project file More...
 
void addPostIface (QString)
 helper: adds a line after the class definition of the interface class More...
 
QString ifaceClassName () const
 helper: returns the class name of the interface class More...
 
QString namePrefix () const
 returns the class name prefix configured for this output More...
 
QString sharedPrefix () const
 returns the class name prefix for shared or unshared classes More...
 
QString languageSpec () const
 returns the language output spec More...
 
QString baseDir () const
 returns the base directory of the project More...
 
QString subDir () const
 returns the sub directory relative to the project where to store files More...
 
QString destinationPath () const
 returns the complete path for files, baseDir()+subDir() More...
 
QString transactionBase () const
 returns the base class of all transactions More...
 
QByteArray exportLines () const
 returns some lines of code to define an export symbol More...
 
QString exportSymbol () const
 returns the name of the preprocessor symbol used for export More...
 
- Public Member Functions inherited from WocOutput
 WocOutput ()
 the constructor should set up and initialize the environment of the generator More...
 
virtual ~WocOutput ()
 currently there is no guarantee that the destructor is ever called. More...
 

Protected Member Functions

virtual void finalize ()
 overloaded slot, called when parsing is finished More...
 
virtual void newClass (const WocClass &)
 overloaded slot, called for each new class More...
 
virtual void newTable (const WocTable &)
 overloaded slot, called for each new table More...
 
virtual void newTransaction (const WocTransaction &)
 overloaded slot, called for each new transaction More...
 

Protected Attributes

QString m_lang
 
WocQtClassqclass
 
WocQtTableqtable
 
WocQtTransactionqtrans
 

Private Member Functions

void initVersionH ()
 internal: generate the static header for version info More...
 

Private Attributes

QString m_basedir
 
QString m_subdir
 
QString m_prefix
 
QString m_cprefix
 
QString m_transbase
 
QString m_postiface
 
QString m_exportsym
 
bool m_clean
 
bool m_export
 
MFile m_pri
 
MFile m_iface
 
MFile m_ifacecpp
 
MFile m_hdr
 
QString m_iface_prefix
 
QString m_iface_class
 

Additional Inherited Members

- Signals inherited from WocOutput
void errorFound ()
 
- Protected Slots inherited from WocOutput

Detailed Description

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.

Member Enumeration Documentation

types of files generated

Enumerator
Header 
Source 
Enumerator
In 
Out 

Constructor & Destructor Documentation

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

Member Function Documentation

void WocQtOut::addFile ( QString  basename)

helper: adds a file to the project file

Parameters
basenamethe class name to add
void WocQtOut::addFile ( WocQtOut::FileType  ft,
QString  fname 
)

helper: adds a file to the project file

Parameters
fnamethe file name to add
kindthe 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

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()

QByteArray WocQtOut::exportLines ( ) const

returns some lines of code to define an export symbol

QString WocQtOut::exportSymbol ( ) const

returns the name of the preprocessor symbol used for export

void WocQtOut::finalize ( )
protectedvirtual

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::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)
protectedvirtual

overloaded slot, called for each new class

Implements WocOutput.

void WocQtOut::newTable ( const WocTable tbl)
protectedvirtual

overloaded slot, called for each new table

Implements WocOutput.

void WocQtOut::newTransaction ( const WocTransaction trn)
protectedvirtual

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 WocClass cls,
QString  p,
bool  dolist = true 
)

helper: generate a proper Qt type for a property

QString WocQtOut::qttype ( const WocTransaction trn,
QString  v,
InOut  io 
)

helper: generate a proper QT type for a transaction variable

QString WocQtOut::sharedPrefix ( ) const
inline

returns the class name prefix for shared or unshared classes

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

Member Data Documentation

QString WocQtOut::m_basedir
private
bool WocQtOut::m_clean
private
QString WocQtOut::m_cprefix
private
bool WocQtOut::m_export
private
QString WocQtOut::m_exportsym
mutableprivate
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_subdir
private
QString WocQtOut::m_transbase
private
WocQtClass* WocQtOut::qclass
protected
WocQtTable* WocQtOut::qtable
protected
WocQtTransaction* WocQtOut::qtrans
protected

The documentation for this class was generated from the following files: