diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-11-15 20:59:11 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-11-15 20:59:11 +0000 |
commit | 862c485d46f3f8e992a9ca9fea40fb33f0b43959 (patch) | |
tree | 118e251b2867ed41e0825a573838160357b0eed5 /cs-dotnet/src/gatsobject.cs | |
parent | b9b5a5fc16e21387b3350260d2139b293bbcd2b0 (diff) | |
download | libgats-862c485d46f3f8e992a9ca9fea40fb33f0b43959.tar.gz libgats-862c485d46f3f8e992a9ca9fea40fb33f0b43959.tar.bz2 libgats-862c485d46f3f8e992a9ca9fea40fb33f0b43959.tar.xz libgats-862c485d46f3f8e992a9ca9fea40fb33f0b43959.zip |
Dictionaries are implemented now. Everything tests out against python.
The next step is the packet stream interface.
Diffstat (limited to '')
-rw-r--r-- | cs-dotnet/src/gatsobject.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cs-dotnet/src/gatsobject.cs b/cs-dotnet/src/gatsobject.cs index 5e76a6c..792db6a 100644 --- a/cs-dotnet/src/gatsobject.cs +++ b/cs-dotnet/src/gatsobject.cs | |||
@@ -13,37 +13,37 @@ namespace Com.Xagasoft.Gats | |||
13 | if( b == -1 ) | 13 | if( b == -1 ) |
14 | throw new GatsException( GatsException.Type.PrematureEnd ); | 14 | throw new GatsException( GatsException.Type.PrematureEnd ); |
15 | char type = (char)b; | 15 | char type = (char)b; |
16 | GatsObject goRet = null; | 16 | GatsObject ret = null; |
17 | switch( type ) | 17 | switch( type ) |
18 | { | 18 | { |
19 | case 'i': | 19 | case 'i': |
20 | goRet = new GatsInteger(); | 20 | ret = new GatsInteger(); |
21 | break; | 21 | break; |
22 | 22 | ||
23 | case 's': | 23 | case 's': |
24 | goRet = new GatsString(); | 24 | ret = new GatsString(); |
25 | break; | 25 | break; |
26 | 26 | ||
27 | case '0': | 27 | case '0': |
28 | case '1': | 28 | case '1': |
29 | goRet = new GatsBoolean(); | 29 | ret = new GatsBoolean(); |
30 | break; | 30 | break; |
31 | 31 | ||
32 | case 'l': | 32 | case 'l': |
33 | goRet = new GatsList(); | 33 | ret = new GatsList(); |
34 | break; | 34 | break; |
35 | 35 | ||
36 | case 'd': | 36 | case 'd': |
37 | // goRet = new GatsDictionary(); | 37 | ret = new GatsDictionary(); |
38 | break; | 38 | break; |
39 | 39 | ||
40 | case 'f': | 40 | case 'f': |
41 | case 'F': | 41 | case 'F': |
42 | goRet = new GatsFloat(); | 42 | ret = new GatsFloat(); |
43 | break; | 43 | break; |
44 | 44 | ||
45 | case 'n': | 45 | case 'n': |
46 | goRet = new GatsNull(); | 46 | ret = new GatsNull(); |
47 | break; | 47 | break; |
48 | 48 | ||
49 | case 'e': | 49 | case 'e': |
@@ -53,9 +53,9 @@ namespace Com.Xagasoft.Gats | |||
53 | throw new GatsException( GatsException.Type.InvalidType ); | 53 | throw new GatsException( GatsException.Type.InvalidType ); |
54 | } | 54 | } |
55 | 55 | ||
56 | goRet.Read( s, type ); | 56 | ret.Read( s, type ); |
57 | 57 | ||
58 | return goRet; | 58 | return ret; |
59 | } | 59 | } |
60 | } | 60 | } |
61 | } | 61 | } |