KMetaData API comments

Sebastian Trüg strueg at
Mon May 7 17:18:08 BST 2007

> > I don't see why you cannot have the overloads that get/set your list
> > types in Resource itself?
> Because it is cleaner this way. The resource is a container for properties
> and a property can be a list of things or a simple thing.
> Additionally if we add provedance data in the future we would have to put
> that into Resource again, making it even more complicated. With an
> additional Variant (or better: PropertyValue) class the API is just
> cleaner.

Hi Simon,

ATM I am playing with the thought of removing the Variant API after all. You 
got me thinking. What do you think of this (Soprano::LiteralValue actually 
has the same problem as Variant has but that can be changed):

class Property
Soprano::LiteralValue value() const;
QList<Soprano::LiteralValue> values() const;

void setValue( const Soprano::LiteralValue& v );
void setValues( const QList<Soprano::LiteralValue>& vl );
void addValue( const Soprano::LiteralValue& v );

More information about the kde-core-devel mailing list