Revision dfa3ef8...

Go back to digest for 17th July 2011

Features in KDE Base

Sebastian Trueg committed changes in [kde-runtime] /services/storage/lib:

New resource generator script to create wrapper classes for SimpleResource.

In contrast to the existing resource generator which creates sub-classes
of Nepomuk::Resource it will create a hierarchy of wrapper classes which
take a SimpleResource as parameter. This might look weird at first glance
but is the only way to solve the multiple inheritance problem we had
with Nepomuk::Resource: since the sub-classes would use methods from
SimpleResource the compiler would not be able to figure out which
SimpleResource parent class to use as more than one parent classes are
derived from SimpleResource.

The syntax is simple:

Nepomuk::SimpleResource res;
Nepomuk::NAO::Tag(&res).setPrefLabel(QLatin1String("label"));

The script does not provide any visibility settings as the old one does
since it creates header-only code.

File Changes

Added 1 files
  • nepomuk/services/storage/lib/nepomuk-simpleresource-rcgen.py
Modified 1 files
  • nepomuk/services/storage/lib/CMakeLists.txt
2 files changed in total