#ifndef GATS_DICTIONARY_H #define GATS_DICTIONARY_H #include "gats/object.h" #include "gats/string.h" #include namespace Gats { class List; class Dictionary : public Gats::Object, public Bu::Hash { public: Dictionary(); virtual ~Dictionary(); virtual Type getType() const { return typeDictionary; } virtual void write( Bu::Stream &rOut ) const; virtual void read( Bu::Stream &rIn, char cType ); void insert( const Bu::FString &sKey, const char *s ); void insert( const Bu::FString &sKey, const Bu::FString &s ); void insert( const Bu::FString &sKey, char i ); void insert( const Bu::FString &sKey, unsigned char i ); void insert( const Bu::FString &sKey, signed char i ); void insert( const Bu::FString &sKey, unsigned short i ); void insert( const Bu::FString &sKey, signed short i ); void insert( const Bu::FString &sKey, unsigned int i ); void insert( const Bu::FString &sKey, signed int i ); void insert( const Bu::FString &sKey, unsigned long i ); void insert( const Bu::FString &sKey, signed long i ); void insert( const Bu::FString &sKey, unsigned long long i ); void insert( const Bu::FString &sKey, signed long long i ); //void insert( const Bu::FString &sKey, bool b ); void insert( const Bu::FString &sKey, float d ); void insert( const Bu::FString &sKey, double d ); using Bu::Hash::insert; bool getBool( const Bu::FString &sKey ); int64_t getInt( const Bu::FString &sKey ); double getFloat( const Bu::FString &sKey ); Bu::FString getStr( const Bu::FString &sKey ); Gats::List *getList( const Bu::FString &sKey ); Gats::Dictionary *getDict( const Bu::FString &sKey ); bool getBool( const Bu::FString &sKey ) const; int64_t getInt( const Bu::FString &sKey ) const; double getFloat( const Bu::FString &sKey ) const; Bu::FString getStr( const Bu::FString &sKey ) const; Gats::List *getList( const Bu::FString &sKey ) const; Gats::Dictionary *getDict( const Bu::FString &sKey ) const; }; }; namespace Bu { template<> uint32_t __calcHashCode( const Gats::String &s ); }; Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Dictionary &d ); #endif