[Kde-bindings] permanent URIs

Richard Dale Richard_Dale at tipitina.demon.co.uk
Wed Dec 10 21:23:06 UTC 2003


On Wednesday 10 December 2003 03:02, Ashley Winters wrote:
> Howdy folks,
>
> I've come scurrying out from behind the rocks to float an idea past
> you. If you have a long memory, you know I'm auto-generating some
> RDF/XML voodoo to completely specify the API of KDE. Since every method
> in KDE will have a URI, I'd like a permanent place to house the
> resulting data.
>
> For instance, here is an example (non-existant, as yet) URI that I am
> contemplating use of right now (it's a doozy):
>
> http://rdf.kde.org/kde/3.2/kdeui#KPushButton::addButton(const+QString&,+boo
>l)
>
> Some sample XML from /kde/3.2/kdeui would look like so:
>
> <!ENTITY kdeui "http://rdf.kde.org/kde/3.2/kdeui#">
> <!ENTITY qt "http://rdf.kde.org/qt/3.2.3/qt#">
>
> <Class rdf:about="&kdeui;KPushButton" cpp:name="KPushButton">
>   <scope rdf:resource="&kdeui;"/>
'kdeui' is a scope here, even though it is just a library name rather than a 
namespace. Currently the C++ KDE classes which aren't in a namespace are in 
KDE:: for perl and ruby with any initial 'K' removed from the classname. So 
should that change to KDEUI:: for the classes in scope kdeui?

>   <base rdf:parseType="Collection">
>     <rdf:Description>
>       <access rdf:resource="&public;"/>
>       <type rdf:resource="&qt;QWidget"/>
>     </rdf:Description>
>   </base>
> </Class>
> <Function
>  rdf:about="&kdeui;KPushButton::addButton(const+QString&,+bool)"
>  cpp:name="addButton">
>   <access rdf:resource="&public;"/>
>   <scope rdf:resource="&kdeui;KPushButton"/>
>
>   <!-- type means the type of a pointer to this function.
>        All functions with the same type can be called the same way -->
>   <type
> rdf:resource="&kdeui;QPushButton*+(KPushButton::*)(const+QString&,+bool
>)"/>
>
>   <!-- The function-type has no knowledge of parameter names
>        or default values. Since PerlQt-4 will support calling
>        methods like $pb->addButton(-text => "Okey Dokie"), we
>        need to elaborate on what arguments can be passed here -->
So the argument names will be available in the Smoke v2 runtime (essential for 
Objective-C and Smalltalk bindings), even though they're not part of the URI?

>   <arguments rdf:parseType="Collection">
>     <!-- the type of these arguments is already known from <type> -->
>     <rdf:Description cpp:name="text" />
>     <rdf:Description cpp:name="noexpand">
>       <default rdf:resource="&false;" />
>     </rdf:Description>
>   </arguments>
> </Function>
>
> That concludes today's RDF exposition. Is my idea of rdf.kde.org too
> much? Would it be worth proposing once I come up with some
> library-specific XML files and a version of smoke to use them? :)
I can't find any books on rdf in my local book shops, if I could read O'Rielly 
'Practical RDF' it might give me some idea - I haven't quite 'got it' yet. 
Maybe there could be a service that would be useful to programmers who use 
the C++ api - it isn't only useful to just bindings. So some sort of 
interesting application of the rdf for C++ programmers like online 
documentation/wiki, that would make them interested?

Can a wild card search be made on the rdf defined api, such as 'return all the 
set* method names for this list of classes'? 

-- Richard



More information about the Kde-bindings mailing list