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>
27 lines
632 B
C++
27 lines
632 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <vector>
|
|
|
|
#include "simdjson/simdjson.h"
|
|
|
|
#include "byte_t.h"
|
|
|
|
class ram_t final {
|
|
private:
|
|
std::vector<byte_t> m_bytes;
|
|
|
|
public:
|
|
ram_t(simdjson::dom::array input);
|
|
|
|
void add(byte_t byte);
|
|
|
|
[[nodiscard]] auto begin() const noexcept { return m_bytes.begin(); }
|
|
[[nodiscard]] auto end() const noexcept { return m_bytes.end(); }
|
|
|
|
[[nodiscard]] auto size() const noexcept { return m_bytes.size(); }
|
|
|
|
[[nodiscard]] auto& operator[](size_t idx) noexcept { return m_bytes[idx]; }
|
|
[[nodiscard]] auto operator[](size_t idx) const noexcept { return m_bytes[idx]; }
|
|
};
|