| 590 | } |
| 591 | |
| 592 | void 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 | |
| 618 | void ConfigObject::DumpModifiedAttributes(const std::function<void(const ConfigObject::Ptr&, const String&, const Value&)>& callback) |
| 619 | { |
nothing calls this directly
no test coverage detected