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

Function PackDictionary

lib/base/object-packer.cpp:156–167  ·  view source on GitHub ↗

* Append the given dictionary */

Source from the content-addressed store, hash-verified

154 * Append the given dictionary
155 */
156static inline void PackDictionary(const Dictionary::Ptr& dict, std::string& builder)
157{
158 ObjectLock olock(dict);
159
160 builder += '\6';
161 PackUInt64BE(dict->GetLength(), builder);
162
163 for (const Dictionary::Pair& kv : dict) {
164 PackString(kv.first, builder);
165 PackAny(kv.second, builder);
166 }
167}
168
169/**
170 * Append any JSON-encodable value

Callers 1

PackAnyFunction · 0.85

Calls 4

PackUInt64BEFunction · 0.85
PackStringFunction · 0.85
PackAnyFunction · 0.85
GetLengthMethod · 0.45

Tested by

no test coverage detected