| 1 |
#ifndef DISKCONTAINER_HH |
| 2 |
#define DISKCONTAINER_HH |
| 3 |
|
| 4 |
#include "serialize_meta.hh" |
| 5 |
|
| 6 |
#include <functional> |
| 7 |
#include <string> |
| 8 |
#include <string_view> |
| 9 |
|
| 10 |
namespace openmsx { |
| 11 |
|
| 12 |
class SectorAccessibleDisk; |
| 13 |
class MSXMotherBoard; |
| 14 |
|
| 15 |
class DiskContainer |
| 16 |
{ |
| 17 |
public: |
| 18 |
DiskContainer() = default; |
| 19 |
DiskContainer(const DiskContainer&) = delete; |
| 20 |
DiskContainer(DiskContainer&&) = delete; |
| 21 |
DiskContainer& operator=(const DiskContainer&) = delete; |
| 22 |
DiskContainer& operator=(DiskContainer&&) = delete; |
| 23 |
virtual ~DiskContainer() = default; |
| 24 |
|
| 25 |
[[nodiscard]] virtual SectorAccessibleDisk* getSectorAccessibleDisk() = 0; |
| 26 |
[[nodiscard]] virtual std::string_view getContainerName() const = 0; |
| 27 |
virtual bool diskChanged() = 0; |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
virtual int insertDisk(const std::string& filename) = 0; |
| 32 |
|
| 33 |
[[nodiscard]] bool isRomDisk() const; |
| 34 |
|
| 35 |
template<typename Archive> |
| 36 |
void serialize(Archive& , unsigned ) {} |
| 37 |
}; |
| 38 |
|
| 39 |
|
| 40 |
REGISTER_BASE_CLASS_1(DiskContainer, "DiskContainer", std::reference_wrapper<MSXMotherBoard>); |
| 41 |
|
| 42 |
} |
| 43 |
|
| 44 |
#endif |