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

Method CustomVariableNamesAccessor

lib/livestatus/commandstable.cpp:79–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79Value CommandsTable::CustomVariableNamesAccessor(const Value& row)
80{
81 Command::Ptr command = static_cast<Command::Ptr>(row);
82
83 if (!command)
84 return Empty;
85
86 Dictionary::Ptr vars = command->GetVars();
87
88 ArrayData keys;
89
90 if (vars) {
91 ObjectLock xlock(vars);
92 for (const auto& kv : vars) {
93 keys.push_back(kv.first);
94 }
95 }
96
97 return new Array(std::move(keys));
98}
99
100Value CommandsTable::CustomVariableValuesAccessor(const Value& row)
101{

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected