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

Method AddExtraDependency

lib/icinga/dependency.cpp:57–61  ·  view source on GitHub ↗

* Add a dependency to this DependencyCycleChecker that will be considered by AssertNoCycle() in addition to * dependencies already registered to the checkables. This allows checking if additional dependencies would cause * a cycle before actually registering them to the checkables. * * @param dependency Dependency to additionally consider during the cycle search. */

Source from the content-addressed store, hash-verified

55 * @param dependency Dependency to additionally consider during the cycle search.
56 */
57 void AddExtraDependency(Dependency::Ptr dependency)
58 {
59 auto& node = m_Nodes[dependency->GetChild()];
60 node.ExtraDependencies.emplace_back(std::move(dependency));
61 }
62
63 /**
64 * Searches the dependency graph for cycles and throws an exception if one is found.

Callers 1

Calls 1

GetChildMethod · 0.45

Tested by

no test coverage detected