diff -r 22955004d512 -r 96c8e6860e0c attribute.h --- a/attribute.h Fri Nov 09 12:07:22 2007 +0000 +++ b/attribute.h Tue Dec 04 12:32:56 2007 +0000 @@ -5,21 +5,25 @@ #include "xmlobj.h" +class AttributeTable; -/*! \brief A key and a list of values +/*! \brief A key and a value */ class Attribute:public XMLObj { public: Attribute(); - virtual void setKey (const QString &k); - virtual QString getKey (); - virtual void setValue (const QString &v); - virtual QString getValue(); - virtual QString getDataXML(); + void setKey (const QString &k); + QString getKey (); + void setValue (const QString &v); + QString getValue(); + void setTable (AttributeTable *at); + AttributeTable* getTable(); + QString getDataXML(); protected: QString key; QString value; + AttributeTable *table; }; /*! \brief A table containing a list of keys and each of these keys has @@ -29,14 +33,15 @@ class AttributeTable:public XMLObj{ public: AttributeTable(); - virtual ~AttributeTable(); - virtual void clear(); - virtual void addKey (const QString &k); //!< Adds a key to the table - virtual void removeKey (const QString &k); //!< Removes key and its default values - virtual void addValue (const QString &k, const QString &v); //!< Adds key and value - virtual QStringList getKeys (); - virtual QStringList getValues(const QString &k); - virtual QString getDataXML(); + ~AttributeTable(); + void clear(); + void addKey (const QString &k); //!< Adds a key to the table + void removeKey (const QString &k); //!< Removes key and its default values + int countKeys(); //!< Return number of keys + void addValue (const QString &k, const QString &v); //!< Adds key and value + QStringList getKeys (); + QStringList getValues(const QString &k); + QString getDataXML(); protected: QStringList keys;