ggencoder::GBGGGameGenieCode Class Reference

#include <gbgggamegeniecode.hh>

Inheritance diagram for ggencoder::GBGGGameGenieCode:

ggencoder::GameGenieCode

List of all members.


Detailed Description

An implementation of a Game Boy or Game Gear game genie code.

Definition at line 36 of file gbgggamegeniecode.hh.


Public Member Functions

const char * getAlphabet () const
 Gets the game genie alphabet.
virtual int getAlphabetCount () const
 Gets the number of letters in the game genie alphabet.
const QString & getCode () const
 Gets the game genie code.
void setCode (const QString &code)
 Sets the game genie code.
virtual int toHex (char letter) const
 Gets the corresponding hex value for a particular game genie letter.

Static Public Member Functions

static GBGGGameGenieCode create (const QString &code) throw (InvalidGameGenieCodeException)
 Creates a GBGGGameGenieCode object.
static bool isValidCode (const QString &code)
 Checks if the code is a valid game genie code.

Static Public Attributes

static const char ALPHABET []
 The game genie alphabet.

Private Member Functions

 GBGGGameGenieCode (const QString &code)
 Constructor for an GBGGGameGenieCode.

Constructor & Destructor Documentation

ggencoder::GBGGGameGenieCode::GBGGGameGenieCode ( const QString &  code  )  [inline, private]

Constructor for an GBGGGameGenieCode.

Definition at line 74 of file gbgggamegeniecode.hh.


Member Function Documentation

GBGGGameGenieCode GBGGGameGenieCode::create ( const QString &  code  )  throw (InvalidGameGenieCodeException) [static]

Creates a GBGGGameGenieCode object.

Parameters:
code The game genie code string.
Exceptions:
InvalidGameGenieCodeException if the code is invalid.

Definition at line 34 of file gbgggamegeniecode.cc.

const char * GBGGGameGenieCode::getAlphabet (  )  const [virtual]

Gets the game genie alphabet.

Returns:
The genie alphabet array.

Implements ggencoder::GameGenieCode.

Definition at line 43 of file gbgggamegeniecode.cc.

bool GBGGGameGenieCode::isValidCode ( const QString &  code  )  [static]

Checks if the code is a valid game genie code.

Parameters:
code The code to check.
Returns:
true if valid; false otherwise.

Definition at line 47 of file gbgggamegeniecode.cc.

int ggencoder::GameGenieCode::getAlphabetCount (  )  const [inline, virtual, inherited]

Gets the number of letters in the game genie alphabet.

Returns:
The alphabet letter count.

Reimplemented in ggencoder::GenesisGameGenieCode.

Definition at line 83 of file gamegeniecode.hh.

const QString & ggencoder::GameGenieCode::getCode (  )  const [inline, inherited]

Gets the game genie code.

Returns:
The game genie code.

Definition at line 85 of file gamegeniecode.hh.

void ggencoder::GameGenieCode::setCode ( const QString &  code  )  [inline, inherited]

Sets the game genie code.

Parameters:
code The new game genie code.

Definition at line 87 of file gamegeniecode.hh.

int GameGenieCode::toHex ( char  letter  )  const [virtual, inherited]

Gets the corresponding hex value for a particular game genie letter.

Parameters:
letter The game genie letter.
Returns:
The hex value of the letter or -1 if the letter is invalid.

Definition at line 31 of file gamegeniecode.cc.


Member Data Documentation

const char GBGGGameGenieCode::ALPHABET [static]

Initial value:

 {
    '0', '1', '2', '3', '4', '5', '6', '7',
    '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
}
The game genie alphabet.

Definition at line 45 of file gbgggamegeniecode.hh.


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