SuperTuxKart
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
GrandPrixManager Class Reference

Public Member Functions

void reload ()
 
bool existsName (const irr::core::stringw &name) const
 
void checkConsistency ()
 
GrandPrixDataeditGrandPrix (const std::string &s)
 
GrandPrixDatacreateNewGP (const irr::core::stringw &newName)
 
GrandPrixDatacopy (const std::string &id, const irr::core::stringw &newName)
 
void remove (const std::string &id)
 
const GrandPrixDatagetGrandPrix (const std::string &s) const
 Returns a pointer to the data for the specified GP.
 
const GrandPrixDatagetGrandPrix (const int i) const
 Returns a pointer to the data for the specified GP.
 
unsigned int getNumberOfGrandPrix () const
 Returns the number of GPs.
 

Private Member Functions

void loadFiles ()
 Load all the grands prix from the 3 directories known.
 
void loadDir (const std::string &dir, enum GrandPrixData::GPGroupType group)
 Load all the grands prix in one directory.
 
void load (const std::string &filename, enum GrandPrixData::GPGroupType group)
 Load a grand prix and add it to m_gp_data.
 
std::string generateId ()
 Generates a new unique indentifier for a user defined grand prix.
 

Private Attributes

PtrVector< GrandPrixDatam_gp_data
 

Static Private Attributes

static const char * SUFFIX = ".grandprix"
 

Member Function Documentation

◆ getGrandPrix() [1/2]

const GrandPrixData * GrandPrixManager::getGrandPrix ( const int  i) const
inline

Returns a pointer to the data for the specified GP.

Parameters
iIndex of the GP.

◆ getGrandPrix() [2/2]

const GrandPrixData * GrandPrixManager::getGrandPrix ( const std::string &  s) const

Returns a pointer to the data for the specified GP.

Parameters
sName of the GP.

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