/*
 * 2004 Utah High School Programming Contest, University of Utah
 * Take-Home Problem
 *
 * SubstitutionCipher.hpp
 *
 * This file contains the definition of the SubstitutionCipher class.
 */

#ifndef SUBSTITUTIONCIPHER_HPP
#define SUBSTITUTIONCIPHER_HPP

#include "Cipher.hpp"

#include <string>

using namespace std;

/**
 * A SubstitutionCipher implements a particular letter substitution algorithm,
 * in which every letter is replaced by some other letter.
 *
 * SubstitutionCipher is a subclass of the (abstract) Cipher class.
 * SubstitutionCiphers are created by the Search class.
 */
class SubstitutionCipher {
private:
    // TODO: Add members to implement the SubstitutionCipher class.
    
public:
    /**
     * Construct a SubstitutionCipher object to implement a particular letter
     * substitution algorithm.  Letter case is preserved.  Only upper- and
     * lowercase letters are translated; all other characters "decrypt" to
     * themselves.
     */
    SubstitutionCipher();
    
    /**
     * Destroy a SubstitutionCipher object.
     */
    virtual ~SubstitutionCipher();
    
    /**
     * Modify the given string by applying this SubstitutionCipher's algorithm
     * to it.  This may or may not actually decrypt the string into English
     * text; the caller must decide if this SubstitutionCipher's algorithm
     * actually "worked."
     *
     * @param cryptogram    the string to be modified
     */
    virtual void decipher(string& cryptogram) const;
};

#endif // SUBSTITUTIONCIPHER_HPP

// End of file.

