Start using "base" as means to access base-class.

This commit is contained in:
Adrian Conlon 2024-03-16 14:23:05 +00:00
parent f19e67875e
commit 1c2b116a42
8 changed files with 16 additions and 0 deletions

View File

@ -14,6 +14,8 @@ namespace EightBit {
void pokeWord(register16_t address, register16_t value) noexcept final;
protected:
using base = BigEndianProcessor;
BigEndianProcessor(Bus& memory) noexcept;
[[nodiscard]] register16_t getWord() override;

View File

@ -70,6 +70,8 @@ namespace EightBit {
: Device(rhs) {}
protected:
using base = Chip;
Chip() noexcept = default;
};
}

View File

@ -22,6 +22,8 @@ namespace EightBit {
}
protected:
using base = ClockedChip;
ClockedChip() noexcept = default;
constexpr void resetCycles() noexcept { m_cycles = 0; }

View File

@ -114,6 +114,8 @@ namespace EightBit {
[[nodiscard]] constexpr bool powered() const noexcept { return raised(POWER()); }
protected:
using base = Device;
Device() noexcept {};
};
}

View File

@ -80,6 +80,8 @@ namespace EightBit {
DECLARE_PIN_OUTPUT(HALT)
protected:
using base = IntelProcessor;
IntelProcessor(Bus& bus);
template<class T> [[nodiscard]] static constexpr uint8_t adjustSign(uint8_t f, const uint8_t value) noexcept {

View File

@ -14,6 +14,8 @@ namespace EightBit {
void pokeWord(register16_t address, register16_t value) noexcept final;
protected:
using base = LittleEndianProcessor;
LittleEndianProcessor(Bus& memory) noexcept;
[[nodiscard]] register16_t getWord() override;

View File

@ -39,6 +39,8 @@ namespace EightBit {
DECLARE_PIN_INPUT(INT)
protected:
using base = Processor;
Processor(Bus& memory) noexcept;
[[nodiscard]] constexpr auto& opcode() noexcept { return m_opcode; }

View File

@ -15,6 +15,7 @@ public:
private:
using handle_t = std::coroutine_handle<promise_type>;
public:
class promise_type final {
private:
T value_;
@ -42,6 +43,7 @@ private:
[[nodiscard]] constexpr auto& exception() noexcept { return exception_; };
};
private:
handle_t h_;
private: