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

Method CustomVariableValuesAccessor

lib/livestatus/commandstable.cpp:100–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100Value CommandsTable::CustomVariableValuesAccessor(const Value& row)
101{
102 Command::Ptr command = static_cast<Command::Ptr>(row);
103
104 if (!command)
105 return Empty;
106
107 Dictionary::Ptr vars = command->GetVars();
108
109 ArrayData keys;
110
111 if (vars) {
112 ObjectLock xlock(vars);
113 for (const auto& kv : vars) {
114 keys.push_back(kv.second);
115 }
116 }
117
118 return new Array(std::move(keys));
119}
120
121Value CommandsTable::CustomVariablesAccessor(const Value& row)
122{

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected