mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-03 09:29:50 +00:00
0deb37ab19
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
24 lines
608 B
C++
24 lines
608 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
#include "simdjson/simdjson.h"
|
|
|
|
class cycle_t final {
|
|
private:
|
|
const uint16_t m_address = 0xffff;
|
|
const uint8_t m_value = 0xff;
|
|
const std::string m_action;
|
|
|
|
public:
|
|
cycle_t(uint16_t address, uint8_t value, std::string action) noexcept;
|
|
|
|
cycle_t(simdjson::dom::element input) noexcept;
|
|
cycle_t(simdjson::dom::array input) noexcept;
|
|
|
|
[[nodiscard]] constexpr auto address() const noexcept { return m_address; }
|
|
[[nodiscard]] constexpr auto value() const noexcept { return m_value; }
|
|
[[nodiscard]] auto action() const noexcept { return m_action; }
|
|
};
|