mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-24 13:44:58 +00:00
ROADMAP.md
This commit is contained in:
40
src/services/impl/frame_workflow_step_registrar.hpp
Normal file
40
src/services/impl/frame_workflow_step_registrar.hpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include "../interfaces/i_logger.hpp"
|
||||
#include "../interfaces/i_workflow_step_registry.hpp"
|
||||
#include "../interfaces/workflow_definition.hpp"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace sdl3cpp::services {
|
||||
class IAudioService;
|
||||
class IInputService;
|
||||
class IPhysicsService;
|
||||
class IRenderCoordinatorService;
|
||||
class ISceneService;
|
||||
}
|
||||
|
||||
namespace sdl3cpp::services::impl {
|
||||
|
||||
class FrameWorkflowStepRegistrar {
|
||||
public:
|
||||
FrameWorkflowStepRegistrar(std::shared_ptr<ILogger> logger,
|
||||
std::shared_ptr<IAudioService> audioService,
|
||||
std::shared_ptr<IInputService> inputService,
|
||||
std::shared_ptr<IPhysicsService> physicsService,
|
||||
std::shared_ptr<ISceneService> sceneService,
|
||||
std::shared_ptr<IRenderCoordinatorService> renderService);
|
||||
|
||||
void RegisterUsedSteps(const WorkflowDefinition& workflow,
|
||||
const std::shared_ptr<IWorkflowStepRegistry>& registry) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<ILogger> logger_;
|
||||
std::shared_ptr<IAudioService> audioService_;
|
||||
std::shared_ptr<IInputService> inputService_;
|
||||
std::shared_ptr<IPhysicsService> physicsService_;
|
||||
std::shared_ptr<ISceneService> sceneService_;
|
||||
std::shared_ptr<IRenderCoordinatorService> renderService_;
|
||||
};
|
||||
|
||||
} // namespace sdl3cpp::services::impl
|
||||
27
src/services/impl/workflow_frame_gui_step.cpp
Normal file
27
src/services/impl/workflow_frame_gui_step.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "workflow_frame_gui_step.hpp"
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
namespace sdl3cpp::services::impl {
|
||||
|
||||
WorkflowFrameGuiStep::WorkflowFrameGuiStep(std::shared_ptr<IInputService> inputService,
|
||||
std::shared_ptr<ILogger> logger)
|
||||
: inputService_(std::move(inputService)),
|
||||
logger_(std::move(logger)) {}
|
||||
|
||||
std::string WorkflowFrameGuiStep::GetPluginId() const {
|
||||
return "frame.gui";
|
||||
}
|
||||
|
||||
void WorkflowFrameGuiStep::Execute(const WorkflowStepDefinition&,
|
||||
WorkflowContext&) {
|
||||
if (!inputService_) {
|
||||
throw std::runtime_error("frame.gui requires an IInputService");
|
||||
}
|
||||
inputService_->UpdateGuiInput();
|
||||
if (logger_) {
|
||||
logger_->Trace("WorkflowFrameGuiStep", "Execute", "", "GUI input dispatched");
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace sdl3cpp::services::impl
|
||||
Reference in New Issue
Block a user