mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Refactor the way image extensions are handled to be generally cleaner. Add
support for validating ImageSpecs before we actually want to read/write an image, so as to allow us to check the extension *before* wasting time reading a disk. Make .d81 an alias of .img.
This commit is contained in:
@@ -12,8 +12,17 @@ public:
|
||||
|
||||
public:
|
||||
static std::unique_ptr<ImageWriter> create(const SectorSet& sectors, const ImageSpec& spec);
|
||||
static void verifyImageSpec(const ImageSpec& filename);
|
||||
|
||||
private:
|
||||
typedef
|
||||
std::function<
|
||||
std::unique_ptr<ImageWriter>(const SectorSet& sectors, const ImageSpec& spec)
|
||||
>
|
||||
Constructor;
|
||||
|
||||
static std::map<std::string, Constructor> formats;
|
||||
|
||||
static std::unique_ptr<ImageWriter> createImgImageWriter(
|
||||
const SectorSet& sectors, const ImageSpec& spec);
|
||||
static std::unique_ptr<ImageWriter> createLDBSImageWriter(
|
||||
@@ -21,6 +30,8 @@ private:
|
||||
static std::unique_ptr<ImageWriter> createD64ImageWriter(
|
||||
const SectorSet& sectors, const ImageSpec& spec);
|
||||
|
||||
static Constructor findConstructor(const ImageSpec& spec);
|
||||
|
||||
public:
|
||||
virtual void adjustGeometry();
|
||||
void printMap();
|
||||
|
||||
Reference in New Issue
Block a user