File MotionFactory.h
File List > motion > MotionFactory.h
Go to the documentation of this file
/*
* ***
* SPDX-FileCopyrightText: 2026 Stagelab Coop SCCL
* SPDX-License-Identifier: GPL-3.0-or-later
* ***
*/
#pragma once
#include "motion/IMotion.h"
#include "signal/FadeCommand.h"
#include "time/MtcTickSource.h"
#include <lo/lo.h>
#include <functional>
#include <memory>
namespace gme {
namespace motion {
class MotionFactory {
public:
using OscSendFn = std::function<int(lo_address, const char*, float)>;
struct Context {
const gme::time::MtcTickSource& mtcSource;
OscSendFn oscSend;
std::function<void(gme::signal::StatusKind,
const std::string&,
const std::string&)> emitStatus;
};
static std::unique_ptr<IMotion> fromCommand(const gme::signal::FadeCommand& cmd,
const Context& ctx);
MotionFactory() = delete;
};
} // namespace motion
} // namespace gme