| 214 | } |
| 215 | |
| 216 | String Value::GetTypeName() const |
| 217 | { |
| 218 | Type::Ptr t; |
| 219 | |
| 220 | switch (GetType()) { |
| 221 | case ValueEmpty: |
| 222 | return "Empty"; |
| 223 | case ValueNumber: |
| 224 | return "Number"; |
| 225 | case ValueBoolean: |
| 226 | return "Boolean"; |
| 227 | case ValueString: |
| 228 | return "String"; |
| 229 | case ValueObject: |
| 230 | t = boost::get<Object::Ptr>(m_Value)->GetReflectionType(); |
| 231 | if (!t) { |
| 232 | if (IsObjectType<Array>()) |
| 233 | return "Array"; |
| 234 | else if (IsObjectType<Dictionary>()) |
| 235 | return "Dictionary"; |
| 236 | else |
| 237 | return "Object"; |
| 238 | } else |
| 239 | return t->GetName(); |
| 240 | default: |
| 241 | return "Invalid"; |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | Type::Ptr Value::GetReflectionType() const |
| 246 | { |
no test coverage detected