Main Page | Namespace List | Class List | File List | Namespace Members | Class Members | File Members

emuWorks::SRAMFile Class Reference

#include <SRAMFile.hh>

List of all members.


Detailed Description

Class to encapsulate an SRAM file.

Definition at line 37 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
char * data
int current
SaveSlotgames [3]


Constructor & Destructor Documentation

SRAMFile::SRAMFile wxString &  filename  ) 
 

Constructor for an SRAMFile object.

Parameters:
filename The SRAM file to use.

Definition at line 39 of file SRAMFile.cc.

SRAMFile::~SRAMFile  ) 
 

Destructor for an SRAMFile object.

Definition at line 44 of file SRAMFile.cc.


Member Function Documentation

SaveSlot * SRAMFile::getCurrentGame  ) 
 

Gets the current game.

Returns:
The current game data.

Definition at line 66 of file SRAMFile.cc.

bool SRAMFile::isModified  ) 
 

Checks if this SRAM file has been modified.

Returns:
true if modified; false otherwise.

Definition at line 52 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 87 of file SRAMFile.cc.

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 132 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 95 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 91 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 74 of file SRAMFile.cc.


Member Data Documentation

int emuWorks::SRAMFile::current [private]
 

Definition at line 110 of file SRAMFile.hh.

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

Definition at line 108 of file SRAMFile.hh.

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

Definition at line 107 of file SRAMFile.hh.

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

Definition at line 111 of file SRAMFile.hh.


Generated on Fri Dec 10 11:33:56 2004 for Zelda II SRAM Editor by  doxygen 1.3.9.1