mitiru::control

Namespace catalog extracted from docs/API_CATALOG.md (6 types, 47 items).

Namespace catalog extracted from docs/API_CATALOG.md (6 types, 47 items).

NameKindItems
ActionExecutorclass8
Commandstruct2
CommandQueueclass18
ReplayStateenum3
ReplaySystemclass12
ScriptActionstruct3

Free functions and typedefs

using ActionHandler = std::function<void(std::string_view payload)>;
class ActionExecutor 8
void registerAction(const std::string& name, ActionHandler handler)
bool execute(const Command& command)
std::size_t executeAll(const std::vector<Command>& commands)
[[nodiscard]] std::vector<std::string> listActions() const
[[nodiscard]] bool hasAction(const std::string& name) const
bool removeAction(const std::string& name)
void clear()
[[nodiscard]] std::size_t actionCount() const noexcept
struct Command 2
std::string type
std::string payload
class CommandQueue 18
void submit(const Command& command)
void submit(Command&& command)
[[nodiscard]] std::vector<Command> consumeAll()
[[nodiscard]] std::size_t pendingCount() const
void clear()
[[nodiscard]] bool empty() const
inline constexpr std::string_view KeyDown = "key_down"
inline constexpr std::string_view KeyUp = "key_up"
inline constexpr std::string_view MouseMove = "mouse_move"
inline constexpr std::string_view MouseDown = "mouse_down"
inline constexpr std::string_view MouseUp = "mouse_up"
inline constexpr std::string_view WaitFrames = "wait_frames"
inline constexpr std::string_view Snapshot = "snapshot"
inline constexpr std::string_view Capture = "capture"
inline constexpr std::string_view Step = "step"
[[nodiscard]] inline std::optional<Command> parseCommand(const std::string& jsonStr)
[[nodiscard]] inline std::string commandToJson(const Command& command)
[[nodiscard]] inline std::string schemaJson()
enum ReplayState : std::uint8_t 3
Idle
Recording
Playing
class ReplaySystem 12
void startRecording(std::uint64_t seed = 0, int tps = 60)
void recordFrame(std::uint64_t frameNumber, const InputState& state)
void recordFrameCommands(std::uint64_t frameNumber, const std::vector<InputCommand>& commands)
[[nodiscard]] ReplayData stopRecording()
void startPlayback(const ReplayData& data)
[[nodiscard]] std::vector<InputCommand> getPlaybackCommands( std::uint64_t frameNumber)
[[nodiscard]] bool isPlaying() const noexcept
[[nodiscard]] bool isRecording() const noexcept
[[nodiscard]] ReplayState state() const noexcept
void reset()
using ScriptSequence = std::vector<ScriptAction>;
[[nodiscard]] inline ScriptSequence parseScript(const std::string& jsonStr)
struct ScriptAction 3
std::string type
std::map<std::string, std::string> params
[[nodiscard]] std::string toJson() const

Sourced from docs/API_CATALOG.md, auto-generated by tools/generate_api_catalog.py.