EightBit/src/UnusedMemory.cpp
Adrian Conlon 887b89308a Ensure virtual methods are no longer defined inline.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2018-11-25 10:43:51 +00:00

30 lines
822 B
C++

#include "stdafx.h"
#include "UnusedMemory.h"
EightBit::UnusedMemory::UnusedMemory(const size_t size, const uint8_t value)
: m_size(size), m_value(value) {}
size_t EightBit::UnusedMemory::size() const {
return m_size;
}
uint8_t EightBit::UnusedMemory::peek(uint16_t) const {
return m_value;
}
int EightBit::UnusedMemory::load(std::ifstream&, int, int, int) {
throw new std::logic_error("load operation not allowed.");
}
int EightBit::UnusedMemory::load(const std::string&, int, int, int) {
throw new std::logic_error("load operation not allowed.");
}
int EightBit::UnusedMemory::load(const std::vector<uint8_t>&, int, int, int) {
throw new std::logic_error("load operation not allowed.");
}
void EightBit::UnusedMemory::poke(uint16_t, uint8_t) {
throw new std::logic_error("Poke operation not allowed.");
}