SuperTuxKart
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
SavedGrandPrix Class Reference

Class for managing saved Grand-Prix's A list of all possible resumable GP's is stored in the user config. More...

#include <saved_grand_prix.hpp>

Classes

class  SavedGPKart
 

Public Member Functions

 SavedGrandPrix (unsigned int player_id, const std::string &gp_id, RaceManager::MinorRaceModeType race_type, RaceManager::Difficulty difficulty, int player_karts, int last_track, int reverse_type, const std::vector< RaceManager::KartStatus > &kart_list)
 Constructor to create a new entry.
 
 SavedGrandPrix (const XMLNode *node)
 Constructor to deserialize a entry that was saved to a XML file.
 
void setKarts (const std::vector< RaceManager::KartStatus > &kart_list)
 
void clearKarts ()
 
void loadKarts (std::vector< RaceManager::KartStatus > &kart_list)
 
unsigned int getPlayerID () const
 Returns the player id for this saved GP. More...
 
std::string getGPID () const
 Returns the grand prix id. More...
 
int getRaceType () const
 Returns the race type of this GP. More...
 
int getDifficulty () const
 Returns the difficulty of this GP. More...
 
int getTotalKarts () const
 Returns the total number of karts of this GP. More...
 
int getPlayerKarts () const
 Returns the number of player karts in this GP. More...
 
int getNextTrack () const
 Returns the index of the last track finished when this GP was saved. More...
 
int getReverseType () const
 Returns the reverse Type. More...
 
void setNextTrack (int next_track)
 Sets the index of the last track finished. More...
 
void remove ()
 Removed this SavedGrandPrix from the list of all SavedGrandPrix, and deletes it. More...
 

Static Public Member Functions

static SavedGrandPrixgetSavedGP (unsigned int player, const std::string &gpid, RaceManager::MinorRaceModeType race_type, const unsigned int number_of_players)
 Finds the right SavedGrandPrix given the specified data, or NULL if no matching GP was found. More...
 

Protected Attributes

GroupUserConfigParam m_savedgp_group
 For saving to config file. More...
 
IntUserConfigParam m_player_id
 
StringUserConfigParam m_gp_id
 Identifier of this GP. More...
 
IntUserConfigParam m_race_type
 Race type at which this GP was run. More...
 
IntUserConfigParam m_difficulty
 Difficulty at which this GP was run. More...
 
IntUserConfigParam m_player_karts
 Number of player karts used in this GP. More...
 
IntUserConfigParam m_next_track
 Index of the next to run track. More...
 
IntUserConfigParam m_reverse_type
 GPReverseType of the GP as int.
 
PtrVector< SavedGPKartm_karts
 

Detailed Description

Class for managing saved Grand-Prix's A list of all possible resumable GP's is stored in the user config.

Member Function Documentation

◆ getDifficulty()

int SavedGrandPrix::getDifficulty ( ) const
inline

Returns the difficulty of this GP.

◆ getGPID()

std::string SavedGrandPrix::getGPID ( ) const
inline

Returns the grand prix id.

◆ getNextTrack()

int SavedGrandPrix::getNextTrack ( ) const
inline

Returns the index of the last track finished when this GP was saved.

◆ getPlayerID()

unsigned int SavedGrandPrix::getPlayerID ( ) const
inline

Returns the player id for this saved GP.

◆ getPlayerKarts()

int SavedGrandPrix::getPlayerKarts ( ) const
inline

Returns the number of player karts in this GP.

◆ getRaceType()

int SavedGrandPrix::getRaceType ( ) const
inline

Returns the race type of this GP.

◆ getReverseType()

int SavedGrandPrix::getReverseType ( ) const
inline

Returns the reverse Type.

◆ getSavedGP()

static SavedGrandPrix* SavedGrandPrix::getSavedGP ( unsigned int  player,
const std::string &  gpid,
RaceManager::MinorRaceModeType  race_type,
const unsigned int  number_of_players 
)
inlinestatic

Finds the right SavedGrandPrix given the specified data, or NULL if no matching GP was found.

◆ getTotalKarts()

int SavedGrandPrix::getTotalKarts ( ) const
inline

Returns the total number of karts of this GP.

◆ remove()

void SavedGrandPrix::remove ( )
inline

Removed this SavedGrandPrix from the list of all SavedGrandPrix, and deletes it.

◆ setNextTrack()

void SavedGrandPrix::setNextTrack ( int  next_track)
inline

Sets the index of the last track finished.

Member Data Documentation

◆ m_difficulty

IntUserConfigParam SavedGrandPrix::m_difficulty
protected

Difficulty at which this GP was run.

◆ m_gp_id

StringUserConfigParam SavedGrandPrix::m_gp_id
protected

Identifier of this GP.

◆ m_next_track

IntUserConfigParam SavedGrandPrix::m_next_track
protected

Index of the next to run track.

◆ m_player_karts

IntUserConfigParam SavedGrandPrix::m_player_karts
protected

Number of player karts used in this GP.

◆ m_race_type

IntUserConfigParam SavedGrandPrix::m_race_type
protected

Race type at which this GP was run.

◆ m_savedgp_group

GroupUserConfigParam SavedGrandPrix::m_savedgp_group
protected

For saving to config file.

WARNING : m_savedgp_group has to be declared before the other userconfigparams!


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