#include <SRAMFile.hh>
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. | |
SaveSlot * | getSaveSlot (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 | |
SaveSlot * | saveslot [3] |
char | sram [SRAM_SIZE] |
bool | valid [3] |
SRAMFile::SRAMFile | ( | const wxString & | filename | ) | throw (InvalidSRAMException) |
Creates a new SRAMFile from a SAV file.
filename | The filename to read the SRAM data from. |
InvalidSRAMException | if the file is not a valid SRAMFile. |
Definition at line 36 of file SRAMFile.cc.
SRAMFile::~SRAMFile | ( | ) |
void SRAMFile::verifyChecksum | ( | ) | [private] |
SaveSlot * hack4u::SRAMFile::getSaveSlot | ( | int | game | ) | [inline] |
Gets one of the SaveSlots in this SRAMFile.
game | Which game's SaveSlot to get. |
Definition at line 98 of file SRAMFile.hh.
bool SRAMFile::isModified | ( | ) | const |
Checks if this SRAMFile has been modified.
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.
slot | The slot to test. |
Definition at line 101 of file SRAMFile.hh.
void SRAMFile::save | ( | const wxString & | filename | ) | throw (FileIOException) |
Saves the SRAM data to disk.
filename | The filename to save to. |
FileIOException | if the data cannot be saved. |
Definition at line 93 of file SRAMFile.cc.
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.