// License: AGPLv3 or later. https://www.gnu.org/licenses/licenses.html #ifndef _AUXILIARY_H_ #define _AUXILIARY_H_ #include class processArguments { public: processArguments(int theArgc, const char* const theArgv[]); std::string codewordType() const; short codewordInt() const; int randomGeneratorSeed() const; int codewordLength() const; int codebookSize() const; int modulus() const; private: short mint = 0; short melt = 1; short mintOrMelt; int seed; int length; int size; int mod; int argc; const char* const *argv; // if any of the checks fail, program exits immediately w/ // error code 1 void checkIfArgcWithinRange(); void checkIfArg2Is0Or1Only(); void checkIfArg2Is0Or1OnlyAndSetMintOrMelt(); void checkIfCorrectNumberOfArgumentsForMintOrMelt(); void checkIf3rdOnwardArgsAreNotPositveInt(); void checkIfArgumentIsNotPositiveInt( const char* argument, std::string itsIndex); void setRemainingDataMemberValues(); void printProcessedArguments() const; }; #endif