More streamlined handling of io bases
This commit is contained in:
@@ -25,7 +25,9 @@ class Configuration {
|
||||
BASE_64,
|
||||
BASE_UWU,
|
||||
BASE_UGH
|
||||
} iobaseFormat;
|
||||
}
|
||||
formatIn,
|
||||
formatOut;
|
||||
|
||||
static std::string inputFilename;
|
||||
static std::string outputFilename;
|
||||
@@ -44,9 +46,13 @@ class Configuration {
|
||||
private:
|
||||
static void DecideInputFrom();
|
||||
static void DecideOutputTo();
|
||||
static void DecideIOBaseFormat();
|
||||
static void DecideCiphertextFormat();
|
||||
static void MapCiphertextFormatToIOBases();
|
||||
static void DecideModule();
|
||||
|
||||
// This is just an intermediary value, used between methods
|
||||
static IOBASE_FORMAT ciphertextFormat;
|
||||
|
||||
// No instanciation! >:(
|
||||
Configuration() {};
|
||||
};
|
||||
|
@@ -38,9 +38,6 @@ namespace IO {
|
||||
private:
|
||||
static std::istream* in;
|
||||
|
||||
// The format to read data in
|
||||
static Configuration::IOBASE_FORMAT inFormat;
|
||||
|
||||
// We have to hold on to a reference to a filestream,
|
||||
// even if we're always just reading from in.
|
||||
// We still have to CLOSE the file handle afterwards!
|
||||
|
@@ -34,9 +34,6 @@ namespace IO {
|
||||
private:
|
||||
static std::ostream* out;
|
||||
|
||||
// The format to write data in
|
||||
static Configuration::IOBASE_FORMAT outFormat;
|
||||
|
||||
// We have to hold on to a reference to a filestream,
|
||||
// even if we're always just reading from in.
|
||||
// We still have to CLOSE the file handle afterwards!
|
||||
|
Reference in New Issue
Block a user