36 class Category::CategoryPrivate : public Shared
43 bool operator==( const CategoryPrivate &other) const
45 return (isNull && other.isNull) || (category == other.category && domain == other.domain);
48 static CategoryPrivate* copyOnWrite(CategoryPrivate* ep)
53 ep = new CategoryPrivate(*ep);
59 bool Category::isNull() const
64 Category Category::fromXML( const TQDomElement& e)
67 if (e.hasAttribute(TQString::fromLatin1( "domain")))
68 obj.d->domain = e.attribute(TQString::fromLatin1( "domain"));
69 obj.d->category = e.text();
70 obj.d->isNull = false;
74 Category::Category() : d(new CategoryPrivate)
79 Category::Category( const Category& other) : d(0)
84 Category::Category( const TQString& category, const TQString& domain) : d(new CategoryPrivate)
87 d->category = category;
100 Category& Category::operator=( const Category& other)
112 bool Category::operator==( const Category &other) const
114 return *d == *other.d;
117 TQString Category::category() const
119 return !d->isNull ? d->category : TQString();
122 TQString Category::domain() const
124 return !d->isNull ? d->domain : TQString();
|