aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-01-20 18:16:38 +0000
committerMike Buland <eichlan@xagasoft.com>2011-01-20 18:16:38 +0000
commit7292af7c475c61920987ec498144a3fd1e90f1e8 (patch)
tree4bc09eea26fb13915395642311f0617f1c0bff4e
parent4a6e25854a3b70c8d7a526a22a78760b97118669 (diff)
downloadlibgats-7292af7c475c61920987ec498144a3fd1e90f1e8.tar.gz
libgats-7292af7c475c61920987ec498144a3fd1e90f1e8.tar.bz2
libgats-7292af7c475c61920987ec498144a3fd1e90f1e8.tar.xz
libgats-7292af7c475c61920987ec498144a3fd1e90f1e8.zip
Updated with new Bu::String.
Diffstat (limited to '')
-rw-r--r--src/dictionary.cpp58
-rw-r--r--src/dictionary.h56
-rw-r--r--src/float.h4
-rw-r--r--src/list.cpp4
-rw-r--r--src/list.h6
-rw-r--r--src/string.cpp14
-rw-r--r--src/string.h6
-rw-r--r--src/unit/basic.unit8
-rw-r--r--src/unit/io.unit6
9 files changed, 81 insertions, 81 deletions
diff --git a/src/dictionary.cpp b/src/dictionary.cpp
index 4430e73..aaba7b8 100644
--- a/src/dictionary.cpp
+++ b/src/dictionary.cpp
@@ -11,7 +11,7 @@
11template<> 11template<>
12uint32_t Bu::__calcHashCode<Gats::String>( const Gats::String &s ) 12uint32_t Bu::__calcHashCode<Gats::String>( const Gats::String &s )
13{ 13{
14 return __calcHashCode( dynamic_cast<const Bu::FString &>(s) ); 14 return __calcHashCode( dynamic_cast<const Bu::String &>(s) );
15} 15}
16 16
17Gats::Dictionary::Dictionary() 17Gats::Dictionary::Dictionary()
@@ -56,119 +56,119 @@ void Gats::Dictionary::read( Bu::Stream &rIn, char cType )
56 } 56 }
57} 57}
58 58
59void Gats::Dictionary::insert( const Bu::FString &sKey, char i ) 59void Gats::Dictionary::insert( const Bu::String &sKey, char i )
60{ 60{
61 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert( 61 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert(
62 sKey, new Gats::Integer( i ) 62 sKey, new Gats::Integer( i )
63 ); 63 );
64} 64}
65 65
66void Gats::Dictionary::insert( const Bu::FString &sKey, unsigned char i ) 66void Gats::Dictionary::insert( const Bu::String &sKey, unsigned char i )
67{ 67{
68 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert( 68 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert(
69 sKey, new Gats::Integer( i ) 69 sKey, new Gats::Integer( i )
70 ); 70 );
71} 71}
72 72
73void Gats::Dictionary::insert( const Bu::FString &sKey, signed char i ) 73void Gats::Dictionary::insert( const Bu::String &sKey, signed char i )
74{ 74{
75 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert( 75 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert(
76 sKey, new Gats::Integer( i ) 76 sKey, new Gats::Integer( i )
77 ); 77 );
78} 78}
79 79
80void Gats::Dictionary::insert( const Bu::FString &sKey, unsigned short i ) 80void Gats::Dictionary::insert( const Bu::String &sKey, unsigned short i )
81{ 81{
82 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert( 82 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert(
83 sKey, new Gats::Integer( i ) 83 sKey, new Gats::Integer( i )
84 ); 84 );
85} 85}
86 86
87void Gats::Dictionary::insert( const Bu::FString &sKey, signed short i ) 87void Gats::Dictionary::insert( const Bu::String &sKey, signed short i )
88{ 88{
89 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert( 89 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert(
90 sKey, new Gats::Integer( i ) 90 sKey, new Gats::Integer( i )
91 ); 91 );
92} 92}
93 93
94void Gats::Dictionary::insert( const Bu::FString &sKey, unsigned int i ) 94void Gats::Dictionary::insert( const Bu::String &sKey, unsigned int i )
95{ 95{
96 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert( 96 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert(
97 sKey, new Gats::Integer( i ) 97 sKey, new Gats::Integer( i )
98 ); 98 );
99} 99}
100 100
101void Gats::Dictionary::insert( const Bu::FString &sKey, signed int i ) 101void Gats::Dictionary::insert( const Bu::String &sKey, signed int i )
102{ 102{
103 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert( 103 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert(
104 sKey, new Gats::Integer( i ) 104 sKey, new Gats::Integer( i )
105 ); 105 );
106} 106}
107 107
108void Gats::Dictionary::insert( const Bu::FString &sKey, unsigned long i ) 108void Gats::Dictionary::insert( const Bu::String &sKey, unsigned long i )
109{ 109{
110 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert( 110 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert(
111 sKey, new Gats::Integer( i ) 111 sKey, new Gats::Integer( i )
112 ); 112 );
113} 113}
114 114
115void Gats::Dictionary::insert( const Bu::FString &sKey, signed long i ) 115void Gats::Dictionary::insert( const Bu::String &sKey, signed long i )
116{ 116{
117 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert( 117 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert(
118 sKey, new Gats::Integer( i ) 118 sKey, new Gats::Integer( i )
119 ); 119 );
120} 120}
121 121
122void Gats::Dictionary::insert( const Bu::FString &sKey, unsigned long long i ) 122void Gats::Dictionary::insert( const Bu::String &sKey, unsigned long long i )
123{ 123{
124 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert( 124 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert(
125 sKey, new Gats::Integer( i ) 125 sKey, new Gats::Integer( i )
126 ); 126 );
127} 127}
128 128
129void Gats::Dictionary::insert( const Bu::FString &sKey, signed long long i ) 129void Gats::Dictionary::insert( const Bu::String &sKey, signed long long i )
130{ 130{
131 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert( 131 ((Bu::Hash<Gats::String, Gats::Object *> *)this)->insert(
132 sKey, new Gats::Integer( i ) 132 sKey, new Gats::Integer( i )
133 ); 133 );
134} 134}
135/* 135/*
136void Gats::Dictionary::insert( const Bu::FString &sKey, bool b ) 136void Gats::Dictionary::insert( const Bu::String &sKey, bool b )
137{ 137{
138 Bu::Hash<Gats::String, Gats::Object *>::insert( 138 Bu::Hash<Gats::String, Gats::Object *>::insert(
139 sKey, new Gats::Boolean( b ) 139 sKey, new Gats::Boolean( b )
140 ); 140 );
141}*/ 141}*/
142 142
143void Gats::Dictionary::insert( const Bu::FString &sKey, float d ) 143void Gats::Dictionary::insert( const Bu::String &sKey, float d )
144{ 144{
145 Bu::Hash<Gats::String, Gats::Object *>::insert( 145 Bu::Hash<Gats::String, Gats::Object *>::insert(
146 sKey, new Gats::Float( d ) 146 sKey, new Gats::Float( d )
147 ); 147 );
148} 148}
149 149
150void Gats::Dictionary::insert( const Bu::FString &sKey, double d ) 150void Gats::Dictionary::insert( const Bu::String &sKey, double d )
151{ 151{
152 Bu::Hash<Gats::String, Gats::Object *>::insert( 152 Bu::Hash<Gats::String, Gats::Object *>::insert(
153 sKey, new Gats::Float( d ) 153 sKey, new Gats::Float( d )
154 ); 154 );
155} 155}
156 156
157void Gats::Dictionary::insert( const Bu::FString &sKey, const char *s ) 157void Gats::Dictionary::insert( const Bu::String &sKey, const char *s )
158{ 158{
159 Bu::Hash<Gats::String, Gats::Object *>::insert( 159 Bu::Hash<Gats::String, Gats::Object *>::insert(
160 sKey, new Gats::String( s ) 160 sKey, new Gats::String( s )
161 ); 161 );
162} 162}
163 163
164void Gats::Dictionary::insert( const Bu::FString &sKey, const Bu::FString &s ) 164void Gats::Dictionary::insert( const Bu::String &sKey, const Bu::String &s )
165{ 165{
166 Bu::Hash<Gats::String, Gats::Object *>::insert( 166 Bu::Hash<Gats::String, Gats::Object *>::insert(
167 sKey, new Gats::String( s ) 167 sKey, new Gats::String( s )
168 ); 168 );
169} 169}
170 170
171bool Gats::Dictionary::getBool( const Bu::FString &sKey ) 171bool Gats::Dictionary::getBool( const Bu::String &sKey )
172{ 172{
173 Gats::Boolean *pOb = dynamic_cast<Gats::Boolean *>( get( sKey ) ); 173 Gats::Boolean *pOb = dynamic_cast<Gats::Boolean *>( get( sKey ) );
174 if( !pOb ) 174 if( !pOb )
@@ -178,7 +178,7 @@ bool Gats::Dictionary::getBool( const Bu::FString &sKey )
178 return pOb->getValue(); 178 return pOb->getValue();
179} 179}
180 180
181int64_t Gats::Dictionary::getInt( const Bu::FString &sKey ) 181int64_t Gats::Dictionary::getInt( const Bu::String &sKey )
182{ 182{
183 Gats::Integer *pOb = dynamic_cast<Gats::Integer *>( get( sKey ) ); 183 Gats::Integer *pOb = dynamic_cast<Gats::Integer *>( get( sKey ) );
184 if( !pOb ) 184 if( !pOb )
@@ -188,7 +188,7 @@ int64_t Gats::Dictionary::getInt( const Bu::FString &sKey )
188 return pOb->getValue(); 188 return pOb->getValue();
189} 189}
190 190
191double Gats::Dictionary::getFloat( const Bu::FString &sKey ) 191double Gats::Dictionary::getFloat( const Bu::String &sKey )
192{ 192{
193 Gats::Float *pOb = dynamic_cast<Gats::Float *>( get( sKey ) ); 193 Gats::Float *pOb = dynamic_cast<Gats::Float *>( get( sKey ) );
194 if( !pOb ) 194 if( !pOb )
@@ -198,7 +198,7 @@ double Gats::Dictionary::getFloat( const Bu::FString &sKey )
198 return pOb->getValue(); 198 return pOb->getValue();
199} 199}
200 200
201Bu::FString Gats::Dictionary::getStr( const Bu::FString &sKey ) 201Bu::String Gats::Dictionary::getStr( const Bu::String &sKey )
202{ 202{
203 Gats::String *pOb = dynamic_cast<Gats::String *>( get( sKey ) ); 203 Gats::String *pOb = dynamic_cast<Gats::String *>( get( sKey ) );
204 if( !pOb ) 204 if( !pOb )
@@ -208,7 +208,7 @@ Bu::FString Gats::Dictionary::getStr( const Bu::FString &sKey )
208 return *pOb; 208 return *pOb;
209} 209}
210 210
211Gats::List *Gats::Dictionary::getList( const Bu::FString &sKey ) 211Gats::List *Gats::Dictionary::getList( const Bu::String &sKey )
212{ 212{
213 Gats::List *pOb = dynamic_cast<Gats::List *>( get( sKey ) ); 213 Gats::List *pOb = dynamic_cast<Gats::List *>( get( sKey ) );
214 if( !pOb ) 214 if( !pOb )
@@ -218,7 +218,7 @@ Gats::List *Gats::Dictionary::getList( const Bu::FString &sKey )
218 return pOb; 218 return pOb;
219} 219}
220 220
221Gats::Dictionary *Gats::Dictionary::getDict( const Bu::FString &sKey ) 221Gats::Dictionary *Gats::Dictionary::getDict( const Bu::String &sKey )
222{ 222{
223 Gats::Dictionary *pOb = dynamic_cast<Gats::Dictionary *>( get( sKey ) ); 223 Gats::Dictionary *pOb = dynamic_cast<Gats::Dictionary *>( get( sKey ) );
224 if( !pOb ) 224 if( !pOb )
@@ -228,7 +228,7 @@ Gats::Dictionary *Gats::Dictionary::getDict( const Bu::FString &sKey )
228 return pOb; 228 return pOb;
229} 229}
230 230
231bool Gats::Dictionary::getBool( const Bu::FString &sKey ) const 231bool Gats::Dictionary::getBool( const Bu::String &sKey ) const
232{ 232{
233 Gats::Boolean *pOb = dynamic_cast<Gats::Boolean *>( get( sKey ) ); 233 Gats::Boolean *pOb = dynamic_cast<Gats::Boolean *>( get( sKey ) );
234 if( !pOb ) 234 if( !pOb )
@@ -238,7 +238,7 @@ bool Gats::Dictionary::getBool( const Bu::FString &sKey ) const
238 return pOb->getValue(); 238 return pOb->getValue();
239} 239}
240 240
241int64_t Gats::Dictionary::getInt( const Bu::FString &sKey ) const 241int64_t Gats::Dictionary::getInt( const Bu::String &sKey ) const
242{ 242{
243 Gats::Integer *pOb = dynamic_cast<Gats::Integer *>( get( sKey ) ); 243 Gats::Integer *pOb = dynamic_cast<Gats::Integer *>( get( sKey ) );
244 if( !pOb ) 244 if( !pOb )
@@ -248,7 +248,7 @@ int64_t Gats::Dictionary::getInt( const Bu::FString &sKey ) const
248 return pOb->getValue(); 248 return pOb->getValue();
249} 249}
250 250
251double Gats::Dictionary::getFloat( const Bu::FString &sKey ) const 251double Gats::Dictionary::getFloat( const Bu::String &sKey ) const
252{ 252{
253 Gats::Float *pOb = dynamic_cast<Gats::Float *>( get( sKey ) ); 253 Gats::Float *pOb = dynamic_cast<Gats::Float *>( get( sKey ) );
254 if( !pOb ) 254 if( !pOb )
@@ -258,7 +258,7 @@ double Gats::Dictionary::getFloat( const Bu::FString &sKey ) const
258 return pOb->getValue(); 258 return pOb->getValue();
259} 259}
260 260
261Bu::FString Gats::Dictionary::getStr( const Bu::FString &sKey ) const 261Bu::String Gats::Dictionary::getStr( const Bu::String &sKey ) const
262{ 262{
263 Gats::String *pOb = dynamic_cast<Gats::String *>( get( sKey ) ); 263 Gats::String *pOb = dynamic_cast<Gats::String *>( get( sKey ) );
264 if( !pOb ) 264 if( !pOb )
@@ -268,7 +268,7 @@ Bu::FString Gats::Dictionary::getStr( const Bu::FString &sKey ) const
268 return *pOb; 268 return *pOb;
269} 269}
270 270
271Gats::List *Gats::Dictionary::getList( const Bu::FString &sKey ) const 271Gats::List *Gats::Dictionary::getList( const Bu::String &sKey ) const
272{ 272{
273 Gats::List *pOb = dynamic_cast<Gats::List *>( get( sKey ) ); 273 Gats::List *pOb = dynamic_cast<Gats::List *>( get( sKey ) );
274 if( !pOb ) 274 if( !pOb )
@@ -278,7 +278,7 @@ Gats::List *Gats::Dictionary::getList( const Bu::FString &sKey ) const
278 return pOb; 278 return pOb;
279} 279}
280 280
281Gats::Dictionary *Gats::Dictionary::getDict( const Bu::FString &sKey ) const 281Gats::Dictionary *Gats::Dictionary::getDict( const Bu::String &sKey ) const
282{ 282{
283 Gats::Dictionary *pOb = dynamic_cast<Gats::Dictionary *>( get( sKey ) ); 283 Gats::Dictionary *pOb = dynamic_cast<Gats::Dictionary *>( get( sKey ) );
284 if( !pOb ) 284 if( !pOb )
diff --git a/src/dictionary.h b/src/dictionary.h
index 1197a19..d421720 100644
--- a/src/dictionary.h
+++ b/src/dictionary.h
@@ -20,37 +20,37 @@ namespace Gats
20 virtual void write( Bu::Stream &rOut ) const; 20 virtual void write( Bu::Stream &rOut ) const;
21 virtual void read( Bu::Stream &rIn, char cType ); 21 virtual void read( Bu::Stream &rIn, char cType );
22 22
23 void insert( const Bu::FString &sKey, const char *s ); 23 void insert( const Bu::String &sKey, const char *s );
24 void insert( const Bu::FString &sKey, const Bu::FString &s ); 24 void insert( const Bu::String &sKey, const Bu::String &s );
25 void insert( const Bu::FString &sKey, char i ); 25 void insert( const Bu::String &sKey, char i );
26 void insert( const Bu::FString &sKey, unsigned char i ); 26 void insert( const Bu::String &sKey, unsigned char i );
27 void insert( const Bu::FString &sKey, signed char i ); 27 void insert( const Bu::String &sKey, signed char i );
28 void insert( const Bu::FString &sKey, unsigned short i ); 28 void insert( const Bu::String &sKey, unsigned short i );
29 void insert( const Bu::FString &sKey, signed short i ); 29 void insert( const Bu::String &sKey, signed short i );
30 void insert( const Bu::FString &sKey, unsigned int i ); 30 void insert( const Bu::String &sKey, unsigned int i );
31 void insert( const Bu::FString &sKey, signed int i ); 31 void insert( const Bu::String &sKey, signed int i );
32 void insert( const Bu::FString &sKey, unsigned long i ); 32 void insert( const Bu::String &sKey, unsigned long i );
33 void insert( const Bu::FString &sKey, signed long i ); 33 void insert( const Bu::String &sKey, signed long i );
34 void insert( const Bu::FString &sKey, unsigned long long i ); 34 void insert( const Bu::String &sKey, unsigned long long i );
35 void insert( const Bu::FString &sKey, signed long long i ); 35 void insert( const Bu::String &sKey, signed long long i );
36 //void insert( const Bu::FString &sKey, bool b ); 36 //void insert( const Bu::String &sKey, bool b );
37 void insert( const Bu::FString &sKey, float d ); 37 void insert( const Bu::String &sKey, float d );
38 void insert( const Bu::FString &sKey, double d ); 38 void insert( const Bu::String &sKey, double d );
39 using Bu::Hash<Gats::String, Gats::Object *>::insert; 39 using Bu::Hash<Gats::String, Gats::Object *>::insert;
40 40
41 bool getBool( const Bu::FString &sKey ); 41 bool getBool( const Bu::String &sKey );
42 int64_t getInt( const Bu::FString &sKey ); 42 int64_t getInt( const Bu::String &sKey );
43 double getFloat( const Bu::FString &sKey ); 43 double getFloat( const Bu::String &sKey );
44 Bu::FString getStr( const Bu::FString &sKey ); 44 Bu::String getStr( const Bu::String &sKey );
45 Gats::List *getList( const Bu::FString &sKey ); 45 Gats::List *getList( const Bu::String &sKey );
46 Gats::Dictionary *getDict( const Bu::FString &sKey ); 46 Gats::Dictionary *getDict( const Bu::String &sKey );
47 47
48 bool getBool( const Bu::FString &sKey ) const; 48 bool getBool( const Bu::String &sKey ) const;
49 int64_t getInt( const Bu::FString &sKey ) const; 49 int64_t getInt( const Bu::String &sKey ) const;
50 double getFloat( const Bu::FString &sKey ) const; 50 double getFloat( const Bu::String &sKey ) const;
51 Bu::FString getStr( const Bu::FString &sKey ) const; 51 Bu::String getStr( const Bu::String &sKey ) const;
52 Gats::List *getList( const Bu::FString &sKey ) const; 52 Gats::List *getList( const Bu::String &sKey ) const;
53 Gats::Dictionary *getDict( const Bu::FString &sKey ) const; 53 Gats::Dictionary *getDict( const Bu::String &sKey ) const;
54 }; 54 };
55}; 55};
56 56
diff --git a/src/float.h b/src/float.h
index f7a3ed3..ad02d28 100644
--- a/src/float.h
+++ b/src/float.h
@@ -3,7 +3,7 @@
3 3
4#include "gats/object.h" 4#include "gats/object.h"
5 5
6#include <bu/fstring.h> 6#include <bu/string.h>
7 7
8namespace Gats 8namespace Gats
9{ 9{
@@ -22,7 +22,7 @@ namespace Gats
22 22
23 private: 23 private:
24 double fVal; 24 double fVal;
25 mutable Bu::FString sWriteCache; 25 mutable Bu::String sWriteCache;
26 }; 26 };
27} 27}
28 28
diff --git a/src/list.cpp b/src/list.cpp
index 0e5f56f..02e2a8d 100644
--- a/src/list.cpp
+++ b/src/list.cpp
@@ -42,7 +42,7 @@ void Gats::List::append( const char *s )
42 Bu::List<Gats::Object *>::append( new Gats::String( s ) ); 42 Bu::List<Gats::Object *>::append( new Gats::String( s ) );
43} 43}
44 44
45void Gats::List::append( const Bu::FString &s ) 45void Gats::List::append( const Bu::String &s )
46{ 46{
47 Bu::List<Gats::Object *>::append( new Gats::String( s ) ); 47 Bu::List<Gats::Object *>::append( new Gats::String( s ) );
48} 48}
@@ -73,7 +73,7 @@ void Gats::List::prepend( const char *s )
73 Bu::List<Gats::Object *>::prepend( new Gats::String( s ) ); 73 Bu::List<Gats::Object *>::prepend( new Gats::String( s ) );
74} 74}
75 75
76void Gats::List::prepend( const Bu::FString &s ) 76void Gats::List::prepend( const Bu::String &s )
77{ 77{
78 Bu::List<Gats::Object *>::prepend( new Gats::String( s ) ); 78 Bu::List<Gats::Object *>::prepend( new Gats::String( s ) );
79} 79}
diff --git a/src/list.h b/src/list.h
index 69cb846..5c50fae 100644
--- a/src/list.h
+++ b/src/list.h
@@ -3,7 +3,7 @@
3 3
4#include "gats/object.h" 4#include "gats/object.h"
5#include <bu/list.h> 5#include <bu/list.h>
6#include <bu/fstring.h> 6#include <bu/string.h>
7 7
8namespace Gats 8namespace Gats
9{ 9{
@@ -19,7 +19,7 @@ namespace Gats
19 virtual void read( Bu::Stream &rIn, char cType ); 19 virtual void read( Bu::Stream &rIn, char cType );
20 20
21 void append( const char *s ); 21 void append( const char *s );
22 void append( const Bu::FString &s ); 22 void append( const Bu::String &s );
23 void append( int32_t i ); 23 void append( int32_t i );
24 void append( int64_t i ); 24 void append( int64_t i );
25 void append( bool b ); 25 void append( bool b );
@@ -27,7 +27,7 @@ namespace Gats
27 using Bu::List<Gats::Object *>::append; 27 using Bu::List<Gats::Object *>::append;
28 28
29 void prepend( const char *s ); 29 void prepend( const char *s );
30 void prepend( const Bu::FString &s ); 30 void prepend( const Bu::String &s );
31 void prepend( int32_t i ); 31 void prepend( int32_t i );
32 void prepend( int64_t i ); 32 void prepend( int64_t i );
33 void prepend( bool b ); 33 void prepend( bool b );
diff --git a/src/string.cpp b/src/string.cpp
index 2134a01..c4c156b 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -9,27 +9,27 @@ Gats::String::String()
9} 9}
10 10
11Gats::String::String( const char *s ) : 11Gats::String::String( const char *s ) :
12 Bu::FString( s ) 12 Bu::String( s )
13{ 13{
14} 14}
15 15
16Gats::String::String( const char *s, long iLength ) : 16Gats::String::String( const char *s, long iLength ) :
17 Bu::FString( s, iLength ) 17 Bu::String( s, iLength )
18{ 18{
19} 19}
20 20
21Gats::String::String( long iLength ) : 21Gats::String::String( long iLength ) :
22 Bu::FString( iLength ) 22 Bu::String( iLength )
23{ 23{
24} 24}
25 25
26Gats::String::String( const String &s ) : 26Gats::String::String( const String &s ) :
27 Bu::FString( s ) 27 Bu::String( s )
28{ 28{
29} 29}
30 30
31Gats::String::String( const Bu::FString &s ) : 31Gats::String::String( const Bu::String &s ) :
32 Bu::FString( s ) 32 Bu::String( s )
33{ 33{
34} 34}
35 35
@@ -55,6 +55,6 @@ void Gats::String::read( Bu::Stream &rIn, char cType )
55 55
56Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::String &s ) 56Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::String &s )
57{ 57{
58 return f << "(str) \"" << dynamic_cast<const Bu::FString &>(s) << "\""; 58 return f << "(str) \"" << dynamic_cast<const Bu::String &>(s) << "\"";
59} 59}
60 60
diff --git a/src/string.h b/src/string.h
index ea13517..f708e22 100644
--- a/src/string.h
+++ b/src/string.h
@@ -2,11 +2,11 @@
2#define GATS_STRING_H 2#define GATS_STRING_H
3 3
4#include "gats/object.h" 4#include "gats/object.h"
5#include <bu/fstring.h> 5#include <bu/string.h>
6 6
7namespace Gats 7namespace Gats
8{ 8{
9 class String : public Gats::Object, public Bu::FString 9 class String : public Gats::Object, public Bu::String
10 { 10 {
11 public: 11 public:
12 String(); 12 String();
@@ -14,7 +14,7 @@ namespace Gats
14 String( const char *s, long iLength ); 14 String( const char *s, long iLength );
15 String( long iLength ); 15 String( long iLength );
16 String( const String &s ); 16 String( const String &s );
17 String( const Bu::FString &s ); 17 String( const Bu::String &s );
18 virtual ~String(); 18 virtual ~String();
19 19
20 virtual Type getType() const { return typeString; } 20 virtual Type getType() const { return typeString; }
diff --git a/src/unit/basic.unit b/src/unit/basic.unit
index c27b70c..369e095 100644
--- a/src/unit/basic.unit
+++ b/src/unit/basic.unit
@@ -52,10 +52,10 @@ suite Basic
52 52
53 test string 53 test string
54 { 54 {
55 Bu::List<Bu::FString> lStrs; 55 Bu::List<Bu::String> lStrs;
56 Bu::MemBuf mb; 56 Bu::MemBuf mb;
57 57
58 lStrs.append( Bu::FString() ); 58 lStrs.append( Bu::String() );
59 Gats::String("").write( mb ); 59 Gats::String("").write( mb );
60 60
61 { 61 {
@@ -66,7 +66,7 @@ suite Basic
66 } 66 }
67 for( int j = 1; j <= (1<<16); j=j<<1 ) 67 for( int j = 1; j <= (1<<16); j=j<<1 )
68 { 68 {
69 Bu::FString s( j ); 69 Bu::String s( j );
70 for( int x = 0; x < j; x++ ) 70 for( int x = 0; x < j; x++ )
71 { 71 {
72 s[x] = (unsigned char)(random()%256); 72 s[x] = (unsigned char)(random()%256);
@@ -78,7 +78,7 @@ suite Basic
78 78
79 mb.setPos( 0 ); 79 mb.setPos( 0 );
80 80
81 for( Bu::List<Bu::FString>::iterator i = lStrs.begin(); i; i++ ) 81 for( Bu::List<Bu::String>::iterator i = lStrs.begin(); i; i++ )
82 { 82 {
83 Gats::Object *pObj = Gats::Object::read( mb ); 83 Gats::Object *pObj = Gats::Object::read( mb );
84 if( pObj->getType() != Gats::typeString ) 84 if( pObj->getType() != Gats::typeString )
diff --git a/src/unit/io.unit b/src/unit/io.unit
index 2cd8376..1a9747f 100644
--- a/src/unit/io.unit
+++ b/src/unit/io.unit
@@ -26,7 +26,7 @@ suite Basic
26{ 26{
27 test basic 27 test basic
28 { 28 {
29 Bu::FString sTmpFileName("temp-XXXXXXXXX"); 29 Bu::String sTmpFileName("temp-XXXXXXXXX");
30 Bu::File fIo = tempFile( sTmpFileName ); 30 Bu::File fIo = tempFile( sTmpFileName );
31 31
32 { 32 {
@@ -60,7 +60,7 @@ suite Basic
60 60
61 test spacers 61 test spacers
62 { 62 {
63 Bu::FString sTmpFileName("temp-XXXXXXXXX"); 63 Bu::String sTmpFileName("temp-XXXXXXXXX");
64 Bu::File fIo = tempFile( sTmpFileName ); 64 Bu::File fIo = tempFile( sTmpFileName );
65 65
66 { 66 {
@@ -94,7 +94,7 @@ suite Basic
94 94
95 test biggerSpacers 95 test biggerSpacers
96 { 96 {
97 Bu::FString sTmpFileName("temp-XXXXXXXXX"); 97 Bu::String sTmpFileName("temp-XXXXXXXXX");
98 Bu::File fIo = tempFile( sTmpFileName ); 98 Bu::File fIo = tempFile( sTmpFileName );
99 99
100 { 100 {