Meta-Programming Revisited
Web Services and GUI Generation
Cornelius Schumacher and Tobias K¨
- nig
The KDE Project
KDE Developer Conference 2005 – p.1
Meta-Programming Revisited Web Services and GUI Generation - - PowerPoint PPT Presentation
Meta-Programming Revisited Web Services and GUI Generation Cornelius Schumacher and Tobias K onig The KDE Project KDE Developer Conference 2005 p.1 Overview Whats happened so far? The "kode" project kxml_compiler
Cornelius Schumacher and Tobias K¨
The KDE Project
KDE Developer Conference 2005 – p.1
KDE Developer Conference 2005 – p.2
KDE Developer Conference 2005 – p.3
Code Base XML Data Generators schema parser kxml_compiler libkode kode
KDE Developer Conference 2005 – p.4
kxforms kxforms parser kung wscl parser kwsdl_compiler wsdl parser kxml_compiler kode schema parser libkode Web Services GUI Code Base XML Data Generators
KDE Developer Conference 2005 – p.5
KDE Developer Conference 2005 – p.6
KODE::Function writer( "writeElement", "QString" ); KODE::Code code; code += "QString xml;"; QString tag = "<" + element−>name; QValueList<Attribute *>::ConstIterator it3; for( it3 = element−>attributes.begin(); it3 != element−>attributes.end(); ++it3 ) { tag += " " + (*it3)−>name + "=\\\"\" + " + (*it3)−>name + "() + \"\\\""; } if ( element−>isEmpty ) { tag += "/"; } tag += ">\\n"; code += "xml += indent() + \"" + tag + "\";";
KDE Developer Conference 2005 – p.7
KDE Developer Conference 2005 – p.8
Usage: kode [Qt−options] [KDE−options] [options] [filename] −c, −−create−class Create class −d, −−create−dialog Create dialog −−create−kioslave Create kioslave −−create−main Create main function template −y, −−codify Create generator code for given source −−add−property Add property to class −−inplace Change file in place −−author−email <name> Add author with given email address −−project <name> Name of project −−gpl Use GPL as license −−lgpl Use LGPL as license −−classname <name> Name of class −−filename <name> Name of file −−namespace <name> Namespace −−warning Create warning about code generation −−qt−exception Add Qt exception to GPL −−singleton Create a singleton class −−protocol kioslave protocol Arguments: filename Source code file name Options:
KDE Developer Conference 2005 – p.9
KDE Developer Conference 2005 – p.10
KDE Developer Conference 2005 – p.11
KDE Developer Conference 2005 – p.12
KDE Developer Conference 2005 – p.13
KDE Developer Conference 2005 – p.14
KDE Developer Conference 2005 – p.15
KDE Developer Conference 2005 – p.16
KDE Developer Conference 2005 – p.17
KDE Developer Conference 2005 – p.18
KDE Developer Conference 2005 – p.19
KDE Developer Conference 2005 – p.20
KDE Developer Conference 2005 – p.21
KDE Developer Conference 2005 – p.22
KDE Developer Conference 2005 – p.23
KDE Developer Conference 2005 – p.24
KDE Developer Conference 2005 – p.25
<kxforms> <form ref="category"> <xf:input ref="@name"> <xf:label>Name</xf:label> </xf:input> <list> <xf:label>Item</xf:label> <itemclass ref="category"> <itemlabel>Category <arg ref="@name"/></itemlabel> </itemclass> <itemclass ref="feature"> <itemlabel> Feature <arg ref="summary" truncate="20"/> </itemlabel> </itemclass> </list> </form> (...) </kxforms>
KDE Developer Conference 2005 – p.26
KDE Developer Conference 2005 – p.27
<features> <category name="KDE PIM (Personal Information Management)" > <category name="KMail" > <feature status="inprogress" target="3.5" > <summary>Client side IMAP filtering.</summary> <responsible email="adam@kde.org" name="Till Adam" /> <responsible email="sanders@kde.org" name="Don Sanders" /> </feature> </category> </category> </features>
KDE Developer Conference 2005 – p.28
KDE Developer Conference 2005 – p.29
KDE Developer Conference 2005 – p.30
KDE Developer Conference 2005 – p.31
KDE Developer Conference 2005 – p.32
KDE Developer Conference 2005 – p.33
KDE Developer Conference 2005 – p.34