MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetTypeName

Method GetTypeName

lib/base/value.cpp:216–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216String 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
245Type::Ptr Value::GetReflectionType() const
246{

Callers 15

operator+Method · 0.45
operator-Method · 0.45
operator*Method · 0.45
operator/Method · 0.45
operator%Method · 0.45
operator^Method · 0.45
operator&Method · 0.45
operator|Method · 0.45
operator<<Method · 0.45
operator>>Method · 0.45
operator<Method · 0.45
operator>Method · 0.45

Calls 2

GetReflectionTypeMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected