feat: Add application, lifecycle, and render controllers for service orchestration

This commit is contained in:
2026-01-04 13:38:11 +00:00
parent a720e4a446
commit 5421f7945d
7 changed files with 274 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
#include "lifecycle_controller.hpp"
#include "../logging/logger.hpp"
namespace sdl3cpp::controllers {
LifecycleController::LifecycleController(di::ServiceRegistry& registry)
: registry_(registry) {
logging::TraceGuard trace;
}
LifecycleController::~LifecycleController() {
logging::TraceGuard trace;
}
void LifecycleController::InitializeAll() {
logging::TraceGuard trace;
logging::Logger::GetInstance().Info("Initializing all services");
// ServiceRegistry handles initialization order based on dependencies
registry_.InitializeAll();
logging::Logger::GetInstance().Info("All services initialized");
}
void LifecycleController::ShutdownAll() noexcept {
logging::TraceGuard trace;
logging::Logger::GetInstance().Info("Shutting down all services");
// ServiceRegistry handles shutdown in reverse dependency order
registry_.ShutdownAll();
logging::Logger::GetInstance().Info("All services shutdown");
}
} // namespace sdl3cpp::controllers