PACK WOC  $VERSION$
phpout.h
Go to the documentation of this file.
1 // Copyright (C) 2009-2011 by Konrad Rosenbaum <konrad@silmor.de>
2 // protected under the GNU GPL version 3 or at your option any newer.
3 // See COPYING.GPL file that comes with this distribution.
4 //
5 
6 #ifndef WOC_PHPOUT_H
7 #define WOC_PHPOUT_H
8 
9 #include <QFile>
10 
11 #include "processor.h"
12 
13 class QDomElement;
14 
15 class WocPHPOut;
16 class WocPHPClass;
17 class WocPHPTable;
18 class WocPHPTransaction;
21 
23 class WocPHPOut:public WocOutput
24 {
25  public:
27  WocPHPOut(const QDomElement&);
28 
29  virtual ~WocPHPOut()=0;
30  protected:
32  virtual void finalize();
34  virtual void newClass(const WocClass&);
36  virtual void newTable(const WocTable&);
38  virtual void newTransaction(const WocTransaction&);
39 
40  friend class WocPHPClass;
41  friend class WocPHPTable;
42  friend class WocPHPTransaction;
45 
49 
51  void addLoad(QString classname,QString filename);
53  void addStaticLoad(QString classname,QString filename);
54 
58 
60  QString classPrefix(){return "WO";}
62  QString className(const WocClass&c){return "WO"+c.name();}
64  QString abstractClassName(const WocClass&c){return "WO"+c.name()+QString(c.isAbstract(m_lang)?"Abstract":"");}
65 
67  QString trnClassName(const WocTransaction&t){return "WTr"+t.name();}
68 };
69 
72 {
73  public:
75  WocPHPServerOut(const QDomElement&);
76 };
77 
80 {
81  public:
83  WocPHPClientOut(const QDomElement&);
84 };
85 
86 #endif
WocPHPTransaction * ptrans
Definition: phpout.h:57
WocPHPClientOut(const QDomElement &)
initializes the output object
Definition: phpout.cpp:32
void addLoad(QString classname, QString filename)
helper: adds a loader line for a class to autoload.php
Definition: phpout.cpp:89
QString className(const WocClass &c)
helper: return the PHP-class-name of a WocClass
Definition: phpout.h:62
virtual ~WocPHPOut()=0
Definition: phpout.cpp:21
stores the internal representation of a database table and its abstraction class
Definition: proctable.h:19
WocPHPOut(const QDomElement &)
initializes the output object
Definition: phpout.cpp:41
base class of all output generators
Definition: processor.h:35
Abstract base class for generating output for PHP.
Definition: phpout.h:23
virtual void newTransaction(const WocTransaction &)
creates a transaction
Definition: phpout.cpp:95
WocPHPServerOut(const QDomElement &)
initializes the output object
Definition: phpout.cpp:23
generates output for a PHP server side
Definition: phpctrans.h:13
generates output for a PHP server side
Definition: phpstrans.h:13
WocPHPTable * ptable
Definition: phpout.h:56
generates output for a PHP server side
Definition: phptrans.h:13
QString classPrefix()
helper: returns the class prefix
Definition: phpout.h:60
QFile m_transact
Definition: phpout.h:48
QFile m_loader
Definition: phpout.h:48
specialization that creates a PHP server
Definition: phpout.h:71
QString name() const
returns the name of the transaction
Definition: proctrans.h:25
void addStaticLoad(QString classname, QString filename)
helper: adds an immediate loader line for a class to autoload.php
Definition: phpout.cpp:82
QString m_transbase
Definition: phpout.h:47
virtual void newTable(const WocTable &)
creates a table
Definition: phpout.cpp:105
virtual void finalize()
writes any last words after parsing finished
Definition: phpout.cpp:70
QString trnClassName(const WocTransaction &t)
helper: returns the PHP-class-name for a WocTransaction
Definition: phpout.h:67
QString m_fileext
Definition: phpout.h:46
specialization that creates a PHP client
Definition: phpout.h:79
generates output for a PHP server side
Definition: phpclass.h:16
internal representation of a transaction
Definition: proctrans.h:16
QFile m_schema
Definition: phpout.h:48
QString m_basedir
Definition: phpout.h:46
QString abstractClassName(const WocClass &c)
helper: return the PHP-class-name of a WocClass plus Abstract if it is abstract
Definition: phpout.h:64
QString m_lang
Definition: phpout.h:47
generates output for a PHP server side
Definition: phpdb.h:12
WocPHPClass * pclass
Definition: phpout.h:55
virtual void newClass(const WocClass &)
creates a class
Definition: phpout.cpp:100
QString name() const
returns the class name
Definition: procclass.h:36
stores a communication class including serialization and deserialization information ...
Definition: procclass.h:26
QString m_subdir
Definition: phpout.h:46
bool isAbstract(QString) const
returns whether the class is abstract in the requested language (needs to be customized); it is autom...
Definition: procclass.cpp:267