diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-11-01 17:19:44 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-11-01 17:19:44 +0000 |
commit | 76e1ecfabd1f831bc1810aeae65c0faf61d80cee (patch) | |
tree | 50e5f7c8acd7ed30ee19e54c592c12a2a4f69b07 /src/object.cpp | |
parent | 8093111697385c1f9e8f72e2a7f8e12c924670e2 (diff) | |
download | libgats-76e1ecfabd1f831bc1810aeae65c0faf61d80cee.tar.gz libgats-76e1ecfabd1f831bc1810aeae65c0faf61d80cee.tar.bz2 libgats-76e1ecfabd1f831bc1810aeae65c0faf61d80cee.tar.xz libgats-76e1ecfabd1f831bc1810aeae65c0faf61d80cee.zip |
Maybe more minor fixes?
Diffstat (limited to 'src/object.cpp')
-rw-r--r-- | src/object.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/object.cpp b/src/object.cpp index f5148ad..1908904 100644 --- a/src/object.cpp +++ b/src/object.cpp | |||
@@ -89,3 +89,33 @@ Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Object &obj ) | |||
89 | } | 89 | } |
90 | } | 90 | } |
91 | 91 | ||
92 | Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Type &t ) | ||
93 | { | ||
94 | switch( t ) | ||
95 | { | ||
96 | case Gats::typeDictionary: return f << "dictionary"; | ||
97 | case Gats::typeList: return f << "list"; | ||
98 | case Gats::typeString: return f << "string"; | ||
99 | case Gats::typeInteger: return f << "integer"; | ||
100 | case Gats::typeFloat: return f << "float"; | ||
101 | case Gats::typeBoolean: return f << "boolean"; | ||
102 | } | ||
103 | |||
104 | return f << "***unknown***"; | ||
105 | } | ||
106 | |||
107 | const char *Gats::typeToStr( Gats::Type t ) | ||
108 | { | ||
109 | switch( t ) | ||
110 | { | ||
111 | case Gats::typeDictionary: return "dictionary"; | ||
112 | case Gats::typeList: return "list"; | ||
113 | case Gats::typeString: return "string"; | ||
114 | case Gats::typeInteger: return "integer"; | ||
115 | case Gats::typeFloat: return "float"; | ||
116 | case Gats::typeBoolean: return "boolean"; | ||
117 | } | ||
118 | |||
119 | return "***unknown***"; | ||
120 | } | ||
121 | |||