EightBit/M6502/HarteTest_6502/test_t.h
Adrian Conlon 17b71aafc3 Refactor to share JSON implementation details.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-22 13:10:23 +01:00

18 lines
534 B
C++

#pragma once
#include "simdjson/simdjson.h"
#include "element_t.h"
#include "cycles_t.h"
#include "state_t.h"
class test_t final : public element_t {
public:
test_t(simdjson::dom::element input) noexcept;
[[nodiscard]] auto name() const noexcept { return at("name"); }
[[nodiscard]] auto initial() const noexcept { return state_t(at("initial")); }
[[nodiscard]] auto final() const noexcept { return state_t(at("final")); }
[[nodiscard]] auto cycles() const noexcept { return cycles_t(array_at("cycles")); }
};