mirror of
https://bitbucket.org/Mattrixwv/cipherstream.git
synced 2025-12-06 18:33:58 -05:00
Created Morse Code encoder/decoder
This commit is contained in:
34
Headers/Morse.hpp
Normal file
34
Headers/Morse.hpp
Normal file
@@ -0,0 +1,34 @@
|
||||
//Ciphers/Headers/Morse.hpp
|
||||
//Matthew Ellison
|
||||
// Created: 5-1-18
|
||||
//Modified: 5-1-18
|
||||
//This file contains the declaration of the Morse class
|
||||
//This class is designed to translate Morse Code into regular letters and numbers
|
||||
|
||||
#ifndef MORSE_HPP
|
||||
#define MORSE_HPP
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
class Morse{
|
||||
private:
|
||||
static std::string code[];
|
||||
std::stringstream inputString;
|
||||
std::string outputString;
|
||||
std::string encode();
|
||||
std::string decode();
|
||||
public:
|
||||
Morse();
|
||||
~Morse();
|
||||
void setEncodeInputString(std::string input);
|
||||
void setDecodeInputString(std::string input);
|
||||
std::string getInputString() const;
|
||||
std::string getOutputString() const;
|
||||
std::string encode(std::string input);
|
||||
std::string decode(std::string input);
|
||||
void reset();
|
||||
};
|
||||
|
||||
#endif //MORSE_HPP
|
||||
Reference in New Issue
Block a user