#ifndef GATS_DICTIONARY_H #define GATS_DICTIONARY_H #include "gats-qt/object.h" #include "gats-qt/string.h" #include namespace Gats { class List; class Dictionary : public Gats::Object, public QHash { Q_OBJECT; public: Dictionary(); virtual ~Dictionary(); virtual Object *clone() const; virtual Type getType() const { return typeDictionary; } virtual void write( QIODevice &rOut ) const; virtual void read( QIODevice &rIn, char cType ); void insert( const QByteArray &sKey, const char *s ); void insert( const QByteArray &sKey, const QByteArray &s ); void insert( const QByteArray &sKey, char i ); void insert( const QByteArray &sKey, unsigned char i ); void insert( const QByteArray &sKey, signed char i ); void insert( const QByteArray &sKey, unsigned short i ); void insert( const QByteArray &sKey, signed short i ); void insert( const QByteArray &sKey, unsigned int i ); void insert( const QByteArray &sKey, signed int i ); void insert( const QByteArray &sKey, unsigned long i ); void insert( const QByteArray &sKey, signed long i ); void insert( const QByteArray &sKey, unsigned long long i ); void insert( const QByteArray &sKey, signed long long i ); //void insert( const QByteArray &sKey, bool b ); void insert( const QByteArray &sKey, float d ); void insert( const QByteArray &sKey, double d ); using QHash::insert; void insertBool( const QByteArray &sKey, bool b ); void insertInt( const QByteArray &sKey, int64_t i ); void insertFloat( const QByteArray &sKey, double d ); void insertStr( const QByteArray &sKey, const QByteArray &s ); void insertList( const QByteArray &sKey, Gats::List *pL ); void insertDict( const QByteArray &sKey, Gats::Dictionary *pD ); Gats::List *insertList( const QByteArray &sKey ); Gats::Dictionary *insertDict( const QByteArray &sKey ); bool valueBool( const QByteArray &sKey ); int64_t valueInt( const QByteArray &sKey ); double valueFloat( const QByteArray &sKey ); QByteArray valueStr( const QByteArray &sKey ); Gats::List *valueList( const QByteArray &sKey ); Gats::Dictionary *valueDict( const QByteArray &sKey ); bool valueBool( const QByteArray &sKey ) const; int64_t valueInt( const QByteArray &sKey ) const; double valueFloat( const QByteArray &sKey ) const; QByteArray valueStr( const QByteArray &sKey ) const; Gats::List *valueList( const QByteArray &sKey ) const; Gats::Dictionary *valueDict( const QByteArray &sKey ) const; }; }; //Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Dictionary &d ); #endif