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

Method PrintValue

lib/cli/objectlistutility.cpp:113–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void ObjectListUtility::PrintValue(std::ostream& fp, const Value& val)
114{
115 if (val.IsObjectType<Array>()) {
116 PrintArray(fp, val);
117 return;
118 }
119
120 if (val.IsString()) {
121 fp << "\"" << Convert::ToString(val) << "\"";
122 return;
123 }
124
125 if (val.IsEmpty()) {
126 fp << "null";
127 return;
128 }
129
130 fp << Convert::ToString(val);
131}
132
133void ObjectListUtility::PrintArray(std::ostream& fp, const Array::Ptr& arr)
134{

Callers

nothing calls this directly

Calls 2

IsStringMethod · 0.80
IsEmptyMethod · 0.45

Tested by

no test coverage detected