rawcode.hh

Go to the documentation of this file.
00001 /*
00002  * Game Genie Encoder/Decoder
00003  * Copyright (C) 2004-2006,2008 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: rawcode.hh,v 1.7 2008/12/18 03:23:30 jdratlif Exp $
00024 
00025 #ifndef GGENCODER_RAWCODE_HH_
00026 #define GGENCODER_RAWCODE_HH_
00027 
00028 namespace ggencoder {
00029     /**
00030      * Interface for a raw hex/PAR code.
00031      */
00032     class RawCode {
00033     protected:
00034         int address;
00035         int value;
00036         
00037     public:
00038         /**
00039          * Virtual destructor for RawCode derivatives.
00040          */
00041         virtual ~RawCode();
00042     
00043         /**
00044          * Gets the address of this RawCode.
00045          *
00046          * @return The address.
00047          */
00048         virtual int getAddress() const;
00049         
00050         /**
00051          * Sets the address of this RawCode.
00052          *
00053          * @param address The new address.
00054          */
00055         virtual void setAddress(int address) = 0;
00056         
00057         /**
00058          * Gets the value of this RawCode.
00059          *
00060          * @return The value.
00061          */
00062         virtual int getValue() const;
00063         
00064         /**
00065          * Sets the value of this RawCode.
00066          *
00067          * @param value The new value.
00068          */
00069         virtual void setValue(int value) = 0;
00070     };
00071     
00072     inline RawCode::~RawCode() {}
00073     inline int RawCode::getAddress() const { return address; }
00074     inline int RawCode::getValue() const { return value; }
00075 }
00076 
00077 #endif
00078 

Generated on Thu Dec 18 01:01:24 2008 for Game Genie Encoder/Decoder by  doxygen 1.5.4