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

Function SerializeInternal

lib/base/serializer.cpp:270–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270static Value SerializeInternal(const Value& value, int attributeTypes, SerializeStack& stack, bool dryRun)
271{
272 if (!value.IsObject())
273 return dryRun ? Empty : value;
274
275 Object::Ptr input = value;
276
277 Array::Ptr array = dynamic_pointer_cast<Array>(input);
278
279 if (array)
280 return SerializeArray(array, attributeTypes, stack, dryRun);
281
282 Dictionary::Ptr dict = dynamic_pointer_cast<Dictionary>(input);
283
284 if (dict)
285 return SerializeDictionary(dict, attributeTypes, stack, dryRun);
286
287 Namespace::Ptr ns = dynamic_pointer_cast<Namespace>(input);
288
289 if (ns)
290 return SerializeNamespace(ns, attributeTypes, stack, dryRun);
291
292 return SerializeObject(input, attributeTypes, stack, dryRun);
293}
294
295void icinga::AssertNoCircularReferences(const Value& value)
296{

Callers 6

SerializeArrayFunction · 0.85
SerializeDictionaryFunction · 0.85
SerializeNamespaceFunction · 0.85
SerializeObjectFunction · 0.85
SerializeMethod · 0.85

Calls 5

SerializeArrayFunction · 0.85
SerializeDictionaryFunction · 0.85
SerializeNamespaceFunction · 0.85
SerializeObjectFunction · 0.85
IsObjectMethod · 0.80

Tested by

no test coverage detected