36class 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);
59bool Category::isNull() const
64Category 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;
74Category::Category() : d(new CategoryPrivate)
79Category::Category( const Category& other) : d(0)
84Category::Category( const TQString& category, const TQString& domain) : d(new CategoryPrivate)
87 d->category = category;
100Category& Category::operator=( const Category& other)
112bool Category::operator==( const Category &other) const
114 return *d == *other.d;
117TQString Category::category() const
119 return !d->isNull ? d->category : TQString();
122TQString Category::domain() const
124 return !d->isNull ? d->domain : TQString();
|