You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.2 KiB

// License: AGPLv3 or later.
#ifndef _AUXILIARY_H_
#define _AUXILIARY_H_
#include <string>
class processArguments
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;
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;