emuWorks::SRAMFile Class Reference

#include <SRAMFile.hh>

List of all members.


Detailed Description

Class to encapsulate an SRAM file.

Definition at line 40 of file SRAMFile.hh.


Public Member Functions

 SRAMFile (wxString &filename)
 Constructor for an SRAMFile object.
 ~SRAMFile ()
 Destructor for an SRAMFile object.
bool isModified ()
 Checks if this SRAM file has been modified.
SaveSlotgetCurrentGame ()
 Gets the current game.
bool setCurrentGame (unsigned int current)
 Sets the current game.
bool isValidGame (int game)
 Checks if a particular game is valid.
bool save ()
 Saves the SRAM data to the file it was opened from.
bool save (wxString &filename)
 Saves the SRAM data to a particular file.

Private Member Functions

void load (wxString &filename)
 Loads the SRAM data from a file.

Private Attributes

wxString * file
SaveSlotgames [3]
int current
char * data

Constructor & Destructor Documentation

SRAMFile::SRAMFile ( wxString &  filename  ) 

Constructor for an SRAMFile object.

Parameters:
filename The SRAM file to use.

Definition at line 43 of file SRAMFile.cc.

SRAMFile::~SRAMFile (  ) 

Destructor for an SRAMFile object.

Definition at line 48 of file SRAMFile.cc.


Member Function Documentation

void SRAMFile::load ( wxString &  filename  )  [private]

Loads the SRAM data from a file.

Parameters:
filename The file to load SRAM data from.

Definition at line 136 of file SRAMFile.cc.

bool SRAMFile::isModified (  ) 

Checks if this SRAM file has been modified.

Returns:
true if modified; false otherwise.

Definition at line 56 of file SRAMFile.cc.

SaveSlot * SRAMFile::getCurrentGame (  ) 

Gets the current game.

Returns:
The current game data.

Definition at line 70 of file SRAMFile.cc.

bool SRAMFile::setCurrentGame ( unsigned int  current  ) 

Sets the current game.

Parameters:
current The new game.
Returns:
true if the current game was changed; false otherwise.

Definition at line 78 of file SRAMFile.cc.

bool SRAMFile::isValidGame ( int  game  ) 

Checks if a particular game is valid.

Parameters:
game The game to check.
Returns:
true if the game is valid; false otherwise.

Definition at line 91 of file SRAMFile.cc.

bool SRAMFile::save (  ) 

Saves the SRAM data to the file it was opened from.

Returns:
true if the data was saved; false otherwise.

Definition at line 95 of file SRAMFile.cc.

bool SRAMFile::save ( wxString &  filename  ) 

Saves the SRAM data to a particular file.

Parameters:
filename The file to save to.
Returns:
true if the data was saved; false otherwise.

Definition at line 99 of file SRAMFile.cc.


Member Data Documentation

wxString* emuWorks::SRAMFile::file [private]

Definition at line 42 of file SRAMFile.hh.

SaveSlot* emuWorks::SRAMFile::games[3] [private]

Definition at line 43 of file SRAMFile.hh.

int emuWorks::SRAMFile::current [private]

Definition at line 44 of file SRAMFile.hh.

char* emuWorks::SRAMFile::data [private]

Definition at line 45 of file SRAMFile.hh.


Generated on Mon Dec 29 01:21:33 2008 for Zelda II SRAM Editor by  doxygen 1.5.4