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

Method GetRef

lib/base/dictionary.cpp:76–82  ·  view source on GitHub ↗

* Retrieves a value's address from a dictionary. * * @param key The key whose value's address should be retrieved. * @returns nullptr if the key was not found. */

Source from the content-addressed store, hash-verified

74 * @returns nullptr if the key was not found.
75 */
76const Value * Dictionary::GetRef(const String& key) const
77{
78 std::shared_lock<std::shared_timed_mutex> lock (m_DataMutex);
79 auto it (m_Data.find(key));
80
81 return it == m_Data.end() ? nullptr : &it->second;
82}
83
84/**
85 * Sets a value in the dictionary.

Callers 1

GetConstMethod · 0.80

Calls 2

findMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected