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

Method StopObjects

lib/base/configobject.cpp:592–616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590}
591
592void ConfigObject::StopObjects()
593{
594 std::vector<Type::Ptr> types = Type::GetAllTypes();
595
596 std::sort(types.begin(), types.end(), [](const Type::Ptr& a, const Type::Ptr& b) {
597 if (a->GetActivationPriority() > b->GetActivationPriority())
598 return true;
599 return false;
600 });
601
602 for (const Type::Ptr& type : types) {
603 auto *dtype = dynamic_cast<ConfigType *>(type.get());
604
605 if (!dtype)
606 continue;
607
608 for (const ConfigObject::Ptr& object : dtype->GetObjects()) {
609#ifdef I2_DEBUG
610 Log(LogDebug, "ConfigObject")
611 << "Deactivate() called for config object '" << object->GetName() << "' with type '" << type->GetName() << "'.";
612#endif /* I2_DEBUG */
613 object->Deactivate();
614 }
615 }
616}
617
618void ConfigObject::DumpModifiedAttributes(const std::function<void(const ConfigObject::Ptr&, const String&, const Value&)>& callback)
619{

Callers

nothing calls this directly

Calls 8

LogClass · 0.85
GetActivationPriorityMethod · 0.80
DeactivateMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45
GetObjectsMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected