openMSX
EmptyPatch.hh
Go to the documentation of this file.
1#ifndef EMPTYPATCH_HH
2#define EMPTYPATCH_HH
3
4#include "PatchInterface.hh"
5
6namespace openmsx {
7
8class EmptyPatch final : public PatchInterface
9{
10public:
11 explicit EmptyPatch(std::span<const uint8_t> block_)
12 : block(block_) {}
13
14 void copyBlock(size_t src, std::span<uint8_t> dst) const override;
15 [[nodiscard]] size_t getSize() const override { return block.size(); }
16 [[nodiscard]] std::vector<Filename> getFilenames() const override { return {}; }
17 [[nodiscard]] bool isEmptyPatch() const override { return true; }
18
19private:
20 std::span<const uint8_t> block;
21};
22
23} // namespace openmsx
24
25#endif
size_t getSize() const override
Definition EmptyPatch.hh:15
bool isEmptyPatch() const override
Definition EmptyPatch.hh:17
void copyBlock(size_t src, std::span< uint8_t > dst) const override
Definition EmptyPatch.cc:7
std::vector< Filename > getFilenames() const override
Definition EmptyPatch.hh:16
EmptyPatch(std::span< const uint8_t > block_)
Definition EmptyPatch.hh:11
This file implemented 3 utility functions:
Definition Autofire.cc:11