Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

nesgamegeniecode.hh

Go to the documentation of this file.
00001 /*
00002  * Game Genie Encoder/Decoder
00003  * Copyright (C) 2004-2005 emuWorks
00004  * http://games.technoplaza.net/
00005  *
00006  * This file is part of Game Genie Encoder/Decoder.
00007  *
00008  * Game Genie Encoder/Decoder is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * Game Genie Encoder/Decoder is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with Game Genie Encoder/Decoder; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021  */
00022  
00023 // $Id: nesgamegeniecode.hh,v 1.3 2005/07/30 02:36:45 technoplaza Exp $
00024 
00025 #ifndef _NESGAMEGENIECODE_HH
00026 #define _NESGAMEGENIECODE_HH
00027 
00028 #include "gamegeniecode.hh"
00029 
00030 namespace emuWorks {
00031     /**
00032      * An implementation of an NES game genie code.
00033      */
00034     class NESGameGenieCode : public GameGenieCode {
00035     public:
00036         /**
00037          * Creates an NESGameGenieCode object.
00038          *
00039          * @param code The game genie code string.
00040          *
00041          * @throws InvalidGameGenieCode if the code is invalid.
00042          */
00043         static NESGameGenieCode create(QString &code);
00044     
00045         /**
00046          * Checks if the code is a valid game genie code.
00047          *
00048          * @param code The code to check.
00049          *
00050          * @return true if valid; false otherwise.
00051          */
00052         static bool isValidCode(QString &code);
00053         
00054         /**
00055          * Gets the game genie alphabet.
00056          *
00057          * @return The genie alphabet array.
00058          */
00059         const char *getAlphabet();
00060         
00061         /**
00062          * The game genie alphabet.
00063          */
00064         static const char ALPHABET[];
00065     private:
00066         /**
00067          * Constructor for an NESGameGenieCode.
00068          */
00069         NESGameGenieCode(QString &code) { setCode(code); }
00070     };
00071 }
00072 
00073 #endif
00074 

Generated on Sat Jul 30 15:01:51 2005 for Game Genie Encoder/Decoder by  doxygen 1.4.4