mirror of
https://bitbucket.org/Mattrixwv/cipherstream.git
synced 2025-12-06 18:33:58 -05:00
Added propper error handling
This commit is contained in:
@@ -14,6 +14,23 @@
|
||||
|
||||
class Playfair{
|
||||
private:
|
||||
//Classed to help with error handling
|
||||
class letterNotFound{
|
||||
private:
|
||||
char letter;
|
||||
public:
|
||||
letterNotFound(char letter): letter(letter) {}
|
||||
char getLetter(){ return letter; }
|
||||
};
|
||||
class invalidGrid{
|
||||
private:
|
||||
std::string type;
|
||||
unsigned int size;
|
||||
public:
|
||||
invalidGrid(std::string type, unsigned int size): type(type), size(size) {}
|
||||
std::string getType(){ return type; }
|
||||
int getSize(){ return size; }
|
||||
};
|
||||
static char REPLACED; //The letter that will need to be replaced in the grid and any input string or keyword
|
||||
static char REPLACER; //The letter that replaced REPLACED in any input string or keyword
|
||||
static char DOUBLED; //The letter that will be placed between double letters in the input string if necessary or to make the string length even
|
||||
|
||||
Reference in New Issue
Block a user