hack4u::SRAMFile Class Reference

#include <SRAMFile.hh>

List of all members.


Detailed Description

Definition at line 37 of file SRAMFile.hh.

Public Member Functions

 SRAMFile (const wxString &filename) throw (InvalidSRAMException)
 Creates a new SRAMFile from a SAV file.
 ~SRAMFile ()
 Destructor for an SRAMFile.
SaveSlotgetSaveSlot (int game)
 Gets one of the SaveSlots in this SRAMFile.
bool isModified () const
 Checks if this SRAMFile has been modified.
bool isValid (int slot) const
 Queries the validity of one of the three SaveSlots.
void save (const wxString &filename) throw (FileIOException)
 Saves the SRAM data to disk.

Private Member Functions

void verifyChecksum ()
 Verifies the checksums of all three SaveSlots.

Private Attributes

SaveSlotsaveslot [3]
char sram [SRAM_SIZE]
bool valid [3]


Constructor & Destructor Documentation

SRAMFile::SRAMFile const wxString &  filename  )  throw (InvalidSRAMException)
 

Creates a new SRAMFile from a SAV file.

Parameters:
filename The filename to read the SRAM data from.
Exceptions:
InvalidSRAMException if the file is not a valid SRAMFile.

Definition at line 36 of file SRAMFile.cc.

SRAMFile::~SRAMFile  ) 
 

Destructor for an SRAMFile.

Definition at line 81 of file SRAMFile.cc.


Member Function Documentation

SaveSlot * hack4u::SRAMFile::getSaveSlot int  game  )  [inline]
 

Gets one of the SaveSlots in this SRAMFile.

Parameters:
game Which game's SaveSlot to get.
Returns:
The requested SaveSlot.

Definition at line 98 of file SRAMFile.hh.

bool SRAMFile::isModified  )  const
 

Checks if this SRAMFile has been modified.

Returns:
true if modified; false otherwise.

Definition at line 87 of file SRAMFile.cc.

bool hack4u::SRAMFile::isValid int  slot  )  const [inline]
 

Queries the validity of one of the three SaveSlots.

Parameters:
slot The slot to test.
Returns:
true if the SaveSlot is valid; false otherwise.

Definition at line 99 of file SRAMFile.hh.

void SRAMFile::save const wxString &  filename  )  throw (FileIOException)
 

Saves the SRAM data to disk.

Parameters:
filename The filename to save to.
Exceptions:
FileIOException if the data cannot be saved.

Definition at line 93 of file SRAMFile.cc.

void SRAMFile::verifyChecksum  )  [private]
 

Verifies the checksums of all three SaveSlots.

Definition at line 138 of file SRAMFile.cc.


Member Data Documentation

SaveSlot* hack4u::SRAMFile::saveslot[3] [private]
 

Definition at line 39 of file SRAMFile.hh.

char hack4u::SRAMFile::sram[SRAM_SIZE] [private]
 

Definition at line 40 of file SRAMFile.hh.

bool hack4u::SRAMFile::valid[3] [private]
 

Definition at line 41 of file SRAMFile.hh.


Generated on Tue Mar 21 07:01:10 2006 for hack4u by  doxygen 1.4.6-NO