SuperTuxKart
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
HighscoreManager Class Reference

This class reads and writes the 'highscores.xml' file, and also takes care of dealing with new records. More...

#include <highscore_manager.hpp>

Public Member Functions

void loadHighscores ()
 
void saveHighscores ()
 
HighscoresgetHighscores (const Highscores::HighscoreType &highscore_type, int num_karts, const RaceManager::Difficulty difficulty, const std::string &trackName, const int number_of_laps, const bool reverse)
 
HighscoresgetGPHighscores (int num_karts, const RaceManager::Difficulty difficulty, const std::string &trackName, const int target, GrandPrixData::GPReverseType reverse_type, RaceManager::MinorRaceModeType minor_mode)
 getHighscores method for grandprix highscores
 
void deleteHighscores (int i)
 
void clearHighscores ()
 
bool highscoresEmpty ()
 
HighscoresgetHighscoresAt (int i)
 
int highscoresSize ()
 
void sortHighscores (bool reverse)
 

Private Member Functions

void setFilename ()
 Determines the path to store the highscore file in.
 

Private Attributes

std::vector< std::unique_ptr< Highscores > > m_all_scores
 
std::string m_filename
 
bool m_can_write
 

Static Private Attributes

static const unsigned int CURRENT_HSCORE_FILE_VERSION = 4
 

Detailed Description

This class reads and writes the 'highscores.xml' file, and also takes care of dealing with new records.

One 'HighscoreEntry' object is created for each highscore entry.


The documentation for this class was generated from the following files: