openMSX
EmptyPatch.hh
Go to the documentation of this file.
1 #ifndef EMPTYPATCH_HH
2 #define EMPTYPATCH_HH
3 
4 #include "PatchInterface.hh"
5 
6 namespace openmsx {
7 
8 class EmptyPatch final : public PatchInterface
9 {
10 public:
11  EmptyPatch(const byte* block, size_t size);
12 
13  void copyBlock(size_t src, byte* dst, size_t num) const override;
14  size_t getSize() const override;
15  std::vector<Filename> getFilenames() const override;
16  bool isEmptyPatch() const override { return true; }
17 
18 private:
19  const byte* block;
20  const size_t size;
21 };
22 
23 } // namespace openmsx
24 
25 #endif
bool isEmptyPatch() const override
Definition: EmptyPatch.hh:16
uint8_t byte
8 bit unsigned integer
Definition: openmsx.hh:26
EmptyPatch(const byte *block, size_t size)
Definition: EmptyPatch.cc:7
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
std::vector< Filename > getFilenames() const override
Definition: EmptyPatch.cc:40
void copyBlock(size_t src, byte *dst, size_t num) const override
Definition: EmptyPatch.cc:12
size_t getSize() const override
Definition: EmptyPatch.cc:35