Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members

HighscoreModel Class Reference

List of all members.

Detailed Description

A model and the neccessary logic for highscore management.

Definition at line 48 of file HighscoreModel.h.

Public Member Functions

Construction / Destruction
 HighscoreModel (void *highscoreState)
 Construct the model from a save-state.

 ~HighscoreModel ()
 Destroy the model.

Logic
Boolean isHighscore (UInt32 score)
 Return whether the supplied score qualifies as a highscore.

void addHighscore (UInt32 score, Char *name=NULL)
 Add the highscore to the highscore table.

UInt8 getNumHighScores ()
 Get the number of highscores in the highscore table.

HighscoreEntrygetEntry (UInt8 index)
 Get the nth entry from the highscore table.


Static Public Member Functions

Persistence
StateDescriptorcreateStateDescriptor ()
 Return a descriptor for a freshly initialized state.


Constructor & Destructor Documentation

HighscoreModel::HighscoreModel void *    highscoreState
 

Construct the model from a save-state.

HighscoreModel::~HighscoreModel  
 

Destroy the model.


Member Function Documentation

Boolean HighscoreModel::isHighscore UInt32    score
 

Return whether the supplied score qualifies as a highscore.

void HighscoreModel::addHighscore UInt32    score,
Char *    name = NULL
 

Add the highscore to the highscore table.

If the number of highscores exceeds the limit, the lowest existing highscore will be discarded.

UInt8 HighscoreModel::getNumHighScores  
 

Get the number of highscores in the highscore table.

HighscoreEntry& HighscoreModel::getEntry UInt8    index
 

Get the nth entry from the highscore table.

StateDescriptor* HighscoreModel::createStateDescriptor   [static]
 

Return a descriptor for a freshly initialized state.


The documentation for this class was generated from the following file:
Razor! Engine Developer's Guide. Copyright © by Tilo Christ. All Rights Reserved. Last updated: 31 May 2003