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

Function DictionaryKeys

lib/base/dictionary-script.cpp:68–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68static Array::Ptr DictionaryKeys()
69{
70 ScriptFrame *vframe = ScriptFrame::GetCurrentFrame();
71 Dictionary::Ptr self = static_cast<Dictionary::Ptr>(vframe->Self);
72 REQUIRE_NOT_NULL(self);
73
74 ArrayData keys;
75 ObjectLock olock(self);
76 for (const Dictionary::Pair& kv : self) {
77 keys.push_back(kv.first);
78 }
79 return new Array(std::move(keys));
80}
81
82static Array::Ptr DictionaryValues()
83{

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected