diff -r 000000000000 -r 22955004d512 attribute.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/attribute.h Fri Nov 09 12:07:22 2007 +0000 @@ -0,0 +1,49 @@ +#ifndef ATTRIBUTE_H +#define ATTRIBUTE_H + +#include + +#include "xmlobj.h" + + +/*! \brief A key and a list of values +*/ + +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(); +protected: + QString key; + QString value; +}; + +/*! \brief A table containing a list of keys and each of these keys has + a list of default values. The keys and the values for each key are + unique. +*/ +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(); + +protected: + QStringList keys; + QList values; +}; + + + +#endif +