ROADMAP.md

This commit is contained in:
2026-01-10 02:34:53 +00:00
parent d7e679e923
commit 6419871c79
12 changed files with 171 additions and 3 deletions

View File

@@ -63,8 +63,7 @@
"begin_frame": {
"main": [
[
{ "node": "catalog_scan", "type": "main", "index": 0 },
{ "node": "render_frame", "type": "main", "index": 0 }
{ "node": "catalog_scan", "type": "main", "index": 0 }
]
]
},
@@ -78,7 +77,8 @@
"gui_render": {
"main": [
[
{ "node": "audio_dispatch", "type": "main", "index": 0 }
{ "node": "audio_dispatch", "type": "main", "index": 0 },
{ "node": "render_frame", "type": "main", "index": 0 }
]
]
},

View File

@@ -222,9 +222,19 @@ void RenderCoordinatorService::RenderFrameInternal(float time,
if (guiService_) {
auto extent = graphicsService_->GetSwapchainExtent();
if (guiCommands) {
if (logger_) {
logger_->Trace("RenderCoordinatorService", "RenderFrame",
"guiCommands=" + std::to_string(guiCommands->size()),
"Using workflow GUI commands");
}
guiService_->PrepareFrame(*guiCommands, extent.first, extent.second);
} else if (guiScriptService_ && guiScriptService_->HasGuiCommands()) {
auto scriptCommands = guiScriptService_->LoadGuiCommands();
if (logger_) {
logger_->Trace("RenderCoordinatorService", "RenderFrame",
"guiCommands=" + std::to_string(scriptCommands.size()),
"Using script GUI commands");
}
guiService_->PrepareFrame(scriptCommands, extent.first, extent.second);
}
}

View File

@@ -1,5 +1,7 @@
#include "soundboard_state_service.hpp"
#include <utility>
namespace sdl3cpp::services::impl {
SoundboardStateService::SoundboardStateService(std::shared_ptr<ILogger> logger)

View File

@@ -0,0 +1,21 @@
#pragma once
#include "../interfaces/i_logger.hpp"
#include "../interfaces/i_workflow_step.hpp"
#include <memory>
namespace sdl3cpp::services::impl {
class WorkflowNumberAddStep final : public IWorkflowStep {
public:
explicit WorkflowNumberAddStep(std::shared_ptr<ILogger> logger);
std::string GetPluginId() const override;
void Execute(const WorkflowStepDefinition& step, WorkflowContext& context) override;
private:
std::shared_ptr<ILogger> logger_;
};
} // namespace sdl3cpp::services::impl

View File

@@ -4,6 +4,7 @@
#include <filesystem>
#include <stdexcept>
#include <utility>
namespace sdl3cpp::services::impl {

View File

@@ -9,6 +9,7 @@
#include <filesystem>
#include <stdexcept>
#include <string>
#include <utility>
#include <vector>
namespace sdl3cpp::services::impl {

View File

@@ -10,6 +10,7 @@
#include <cmath>
#include <filesystem>
#include <stdexcept>
#include <utility>
namespace sdl3cpp::services::impl {
namespace {
@@ -164,6 +165,10 @@ void WorkflowSoundboardGuiStep::Execute(const WorkflowStepDefinition& step, Work
void WorkflowSoundboardGuiStep::EnsureConfigLoaded() {
if (!cachedConfig_) {
cachedConfig_ = LoadConfig();
if (logger_) {
logger_->Trace("WorkflowSoundboardGuiStep", "EnsureConfigLoaded",
"title=" + cachedConfig_->title);
}
}
}
@@ -322,6 +327,10 @@ std::vector<GuiCommand> WorkflowSoundboardGuiStep::BuildCommands(
}
}
if (justReleased && !activeWidget_.empty()) {
activeWidget_.clear();
}
const float statusY = rect.y + rect.height - config.statusOffsetY;
commands.push_back(BuildTextCommand(statusMessage, rect.x + config.panelPaddingX,
statusY, config.statusFontSize,

View File

@@ -0,0 +1,35 @@
#include "workflow_value_copy_step.hpp"
#include "workflow_step_io_resolver.hpp"
#include <stdexcept>
#include <utility>
namespace sdl3cpp::services::impl {
WorkflowValueCopyStep::WorkflowValueCopyStep(std::shared_ptr<ILogger> logger)
: logger_(std::move(logger)) {}
std::string WorkflowValueCopyStep::GetPluginId() const {
return "value.copy";
}
void WorkflowValueCopyStep::Execute(const WorkflowStepDefinition& step, WorkflowContext& context) {
WorkflowStepIoResolver resolver;
const std::string inputKey = resolver.GetRequiredInputKey(step, "value");
const std::string outputKey = resolver.GetRequiredOutputKey(step, "value");
const auto* value = context.TryGetAny(inputKey);
if (!value) {
throw std::runtime_error("value.copy missing input '" + inputKey + "'");
}
context.Set(outputKey, *value);
if (logger_) {
logger_->Trace("WorkflowValueCopyStep", "Execute",
"input=" + inputKey + ", output=" + outputKey,
"Copied workflow value");
}
}
} // namespace sdl3cpp::services::impl

View File

@@ -0,0 +1,21 @@
#pragma once
#include "../interfaces/i_logger.hpp"
#include "../interfaces/i_workflow_step.hpp"
#include <memory>
namespace sdl3cpp::services::impl {
class WorkflowValueCopyStep final : public IWorkflowStep {
public:
explicit WorkflowValueCopyStep(std::shared_ptr<ILogger> logger);
std::string GetPluginId() const override;
void Execute(const WorkflowStepDefinition& step, WorkflowContext& context) override;
private:
std::shared_ptr<ILogger> logger_;
};
} // namespace sdl3cpp::services::impl

View File

@@ -0,0 +1,39 @@
#include "workflow_value_default_step.hpp"
#include "workflow_step_io_resolver.hpp"
#include <stdexcept>
#include <utility>
namespace sdl3cpp::services::impl {
WorkflowValueDefaultStep::WorkflowValueDefaultStep(std::shared_ptr<ILogger> logger)
: logger_(std::move(logger)) {}
std::string WorkflowValueDefaultStep::GetPluginId() const {
return "value.default";
}
void WorkflowValueDefaultStep::Execute(const WorkflowStepDefinition& step, WorkflowContext& context) {
WorkflowStepIoResolver resolver;
const std::string primaryKey = resolver.GetRequiredInputKey(step, "primary");
const std::string fallbackKey = resolver.GetRequiredInputKey(step, "fallback");
const std::string outputKey = resolver.GetRequiredOutputKey(step, "value");
const auto* primary = context.TryGetAny(primaryKey);
const auto* fallback = context.TryGetAny(fallbackKey);
if (!primary && !fallback) {
throw std::runtime_error("value.default missing inputs '" + primaryKey + "' and '" + fallbackKey + "'");
}
const char* source = primary ? "primary" : "fallback";
context.Set(outputKey, primary ? *primary : *fallback);
if (logger_) {
logger_->Trace("WorkflowValueDefaultStep", "Execute",
"source=" + std::string(source) +
", output=" + outputKey,
"Selected default workflow value");
}
}
} // namespace sdl3cpp::services::impl

View File

@@ -0,0 +1,21 @@
#pragma once
#include "../interfaces/i_logger.hpp"
#include "../interfaces/i_workflow_step.hpp"
#include <memory>
namespace sdl3cpp::services::impl {
class WorkflowValueDefaultStep final : public IWorkflowStep {
public:
explicit WorkflowValueDefaultStep(std::shared_ptr<ILogger> logger);
std::string GetPluginId() const override;
void Execute(const WorkflowStepDefinition& step, WorkflowContext& context) override;
private:
std::shared_ptr<ILogger> logger_;
};
} // namespace sdl3cpp::services::impl

View File

@@ -27,6 +27,14 @@ public:
return std::any_cast<T>(&it->second);
}
const std::any* TryGetAny(const std::string& key) const {
auto it = values_.find(key);
if (it == values_.end()) {
return nullptr;
}
return &it->second;
}
private:
std::unordered_map<std::string, std::any> values_;
};