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

Method Get

lib/base/dictionary.cpp:38–48  ·  view source on GitHub ↗

* Retrieves a value from a dictionary. * * @param key The key whose value should be retrieved. * @returns The value of an empty value if the key was not found. */

Source from the content-addressed store, hash-verified

36 * @returns The value of an empty value if the key was not found.
37 */
38Value Dictionary::Get(const String& key) const
39{
40 std::shared_lock<std::shared_timed_mutex> lock (m_DataMutex);
41
42 auto it = m_Data.find(key);
43
44 if (it == m_Data.end())
45 return Empty;
46
47 return it->second;
48}
49
50/**
51 * Retrieves a value from a dictionary.

Callers

nothing calls this directly

Calls 2

findMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected