#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, int64_t i ); void insert( const Bu::FString &sKey, bool b ); void insert( const Bu::FString &sKey, double d ); void insert( const Bu::FString &sKey, const Bu::FString &s ); 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 ); }; }; namespace Bu { template<> uint32_t __calcHashCode( const Gats::String &s ); }; #endif