diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-08-19 06:28:17 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-08-19 06:28:17 +0000 |
commit | 11b5a91c5884d496744911f261ed6c2b053b9940 (patch) | |
tree | 61ed65f187e0719f141d80d4e1e648aeff311024 /src/dictionary.cpp | |
parent | 9dc8cc535ef5fc4ea78f967fe285fe4424ff4458 (diff) | |
download | libgats-11b5a91c5884d496744911f261ed6c2b053b9940.tar.gz libgats-11b5a91c5884d496744911f261ed6c2b053b9940.tar.bz2 libgats-11b5a91c5884d496744911f261ed6c2b053b9940.tar.xz libgats-11b5a91c5884d496744911f261ed6c2b053b9940.zip |
Wow, it pretty much all works. the float format is a little funny, I treat it
as a string, with a string header and then string data that is then turned into
a float. It's pretty much how it's going to work, unless I come up with
something revolutionary.
Diffstat (limited to 'src/dictionary.cpp')
-rw-r--r-- | src/dictionary.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/dictionary.cpp b/src/dictionary.cpp index 2223c8b..1a9549f 100644 --- a/src/dictionary.cpp +++ b/src/dictionary.cpp | |||
@@ -77,9 +77,9 @@ void Gats::Dictionary::insert( const Bu::FString &sKey, bool b ) | |||
77 | 77 | ||
78 | void Gats::Dictionary::insert( const Bu::FString &sKey, double d ) | 78 | void Gats::Dictionary::insert( const Bu::FString &sKey, double d ) |
79 | { | 79 | { |
80 | // Bu::Hash<Gats::String, Gats::Object *>::insert( | 80 | Bu::Hash<Gats::String, Gats::Object *>::insert( |
81 | // sKey, new Gats::Float( d ) | 81 | sKey, new Gats::Float( d ) |
82 | // ); | 82 | ); |
83 | } | 83 | } |
84 | 84 | ||
85 | void Gats::Dictionary::insert( const Bu::FString &sKey, const char *s ) | 85 | void Gats::Dictionary::insert( const Bu::FString &sKey, const char *s ) |
@@ -117,14 +117,13 @@ int64_t Gats::Dictionary::getInt( const Bu::FString &sKey ) | |||
117 | } | 117 | } |
118 | 118 | ||
119 | double Gats::Dictionary::getFloat( const Bu::FString &sKey ) | 119 | double Gats::Dictionary::getFloat( const Bu::FString &sKey ) |
120 | {/* | 120 | { |
121 | Gats::Boolean *pOb = dynamic_cast<Gats::Boolean *>( get( sKey ) ); | 121 | Gats::Boolean *pOb = dynamic_cast<Gats::Boolean *>( get( sKey ) ); |
122 | if( pOb ) | 122 | if( pOb ) |
123 | throw Bu::ExceptionBase("Cannot cast item '%s' to bool.", | 123 | throw Bu::ExceptionBase("Cannot cast item '%s' to bool.", |
124 | sKey.getStr() ); | 124 | sKey.getStr() ); |
125 | 125 | ||
126 | return pOb->getValue();*/ | 126 | return pOb->getValue(); |
127 | return 0.0; | ||
128 | } | 127 | } |
129 | 128 | ||
130 | Bu::FString Gats::Dictionary::getStr( const Bu::FString &sKey ) | 129 | Bu::FString Gats::Dictionary::getStr( const Bu::FString &sKey ) |