mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-03 02:23:49 +00:00
Cleaning up
This commit is contained in:
@@ -26,25 +26,20 @@ namespace ComSquare::Memory
|
||||
//! @param addr The absolute address (in the 24 bit bus)
|
||||
//! @return The local address (0 refers to the first byte of this component).
|
||||
//! @throw InvalidAddress is thrown if the address is not mapped by this component.
|
||||
virtual uint24_t getRelativeAddress(uint24_t addr) const override;
|
||||
[[nodiscard]] uint24_t getRelativeAddress(uint24_t addr) const override;
|
||||
|
||||
//! @brief Change starting and ending points of this mapped memory.
|
||||
//! @param start The first address mapped to this component.
|
||||
//! @param end The last address mapped to this component.
|
||||
//! @warning The start/end address should be a continuous range. You can't map address 0x0 and 0x2 but not 0x1. To do that, use two AMemory.
|
||||
void setMemoryRegion(uint24_t start, uint24_t end);
|
||||
|
||||
//! @brief Return true if this component has mapped the address.
|
||||
//! @param addr The address to check.
|
||||
//! @return True if this address is mapped to the component. False otherwise.
|
||||
virtual bool hasMemoryAt(uint24_t addr) const override;
|
||||
//! @brief Check if this memory is a mirror or not.
|
||||
//! @return True if this memory is a mirror. False otherwise.
|
||||
virtual bool isMirror() const override;
|
||||
//! @brief Get the name of the data at the address
|
||||
//! @param addr The address (in local space)
|
||||
virtual std::string getValueName(uint24_t addr) const override;
|
||||
//! @brief Return the memory accessor this accessor mirror if any
|
||||
//! @return nullptr if isMirror is false, the source otherwise.
|
||||
virtual std::shared_ptr<IMemory> getMirrored() const override;
|
||||
virtual ~AMemory() override = default;
|
||||
[[nodiscard]] bool hasMemoryAt(uint24_t addr) const override;
|
||||
|
||||
//! @brief A default destructor
|
||||
~AMemory() override = default;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user