Output images now get geometry specs to indicate what kind of file to write.

This commit is contained in:
David Given
2019-08-07 23:23:07 +02:00
parent eb924780ab
commit d8172154c3
27 changed files with 201 additions and 187 deletions

View File

@@ -1,6 +1,13 @@
#ifndef DATASPEC_H
#define DATASPEC_H
class MissingModifierException : public std::runtime_error
{
public:
MissingModifierException(const std::string& mod);
const std::string mod;
};
class DataSpec
{
public:
@@ -36,6 +43,9 @@ public:
void set(const std::string& spec);
operator std::string () const;
const Modifier& at(const std::string& mod) const;
bool has(const std::string& mod) const;
std::string filename;
std::map<std::string, Modifier> modifiers;
};
@@ -72,9 +82,11 @@ public:
public:
std::string filename;
unsigned tracks;
unsigned cylinders;
unsigned heads;
unsigned sectors;
unsigned bytes;
bool initialised : 1;
};
static inline std::ostream& operator << (std::ostream& os, const DataSpec& dataSpec)