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

Method UnregisterObject

lib/base/configtype.cpp:50–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void ConfigType::UnregisterObject(const ConfigObject::Ptr& object)
51{
52 String name = object->GetName();
53
54 {
55 std::unique_lock<decltype(m_Mutex)> lock (m_Mutex);
56
57 m_ObjectMap.erase(name);
58 m_ObjectVector.erase(std::remove(m_ObjectVector.begin(), m_ObjectVector.end(), object), m_ObjectVector.end());
59 }
60}
61
62std::vector<ConfigObject::Ptr> ConfigType::GetObjects() const
63{

Callers 1

UnregisterMethod · 0.80

Calls 4

GetNameMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected