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

Method AddDependency

lib/base/dependencygraph.cpp:11–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9DependencyGraph::DependencyMap DependencyGraph::m_Dependencies;
10
11void DependencyGraph::AddDependency(ConfigObject* child, ConfigObject* parent)
12{
13 std::unique_lock<std::mutex> lock(m_Mutex);
14 if (auto [it, inserted] = m_Dependencies.insert(Edge(parent, child)); !inserted) {
15 m_Dependencies.modify(it, [](Edge& e) { e.count++; });
16 }
17}
18
19void DependencyGraph::RemoveDependency(ConfigObject* child, ConfigObject* parent)
20{

Callers 2

RegisterDependencyFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45

Calls 2

EdgeClass · 0.85
insertMethod · 0.45

Tested by

no test coverage detected