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

Method GetFieldByName

lib/base/namespace.cpp:153–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153Value Namespace::GetFieldByName(const String& field, bool, const DebugInfo& debugInfo) const
154{
155 auto lock (ReadLockUnlessFrozen());
156
157 auto nsVal = m_Data.find(field);
158
159 if (nsVal != m_Data.end())
160 return nsVal->second.Val;
161 else
162 return GetPrototypeField(const_cast<Namespace *>(this), field, false, debugInfo); /* Ignore indexer not found errors similar to the Dictionary class. */
163}
164
165void Namespace::SetFieldByName(const String& field, const Value& value, const DebugInfo& debugInfo)
166{

Callers

nothing calls this directly

Calls 2

findMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected