|
SuperTuxKart
|
Class for storing the current favorites/custom groups of karts and tracks. More...
#include <favorite_status.hpp>
Public Member Functions | |
| FavoriteStatus (const XMLNode *node, std::string parse_type) | |
| Parse all <(parse_type)/> in <favorite> in xml node. | |
| void | save (UTFWriter &out) |
| Writes the data for this player to the specified UTFWriter. More... | |
| bool | isFavorite (std::string ident) |
| Adds a new favorite track to this player profile and to the group of favorite tracks of the Track Manager. More... | |
| void | addFavorite (std::string ident, std::string group=DEFAULT_FAVORITE_GROUP_NAME) |
| Adds a new favorite track to this player profile and to the group of favorite tracks of the Track Manager. | |
| void | removeFavorite (std::string ident, std::string group=DEFAULT_FAVORITE_GROUP_NAME) |
| Removes a favorite track from this player profile and from the group of favorite tracks of the Track Manager. | |
| const std::unordered_map< std::string, std::set< std::string > > & | getAllFavorites () const |
Static Public Attributes | |
| static const std::string | DEFAULT_FAVORITE_GROUP_NAME = "Favorites" |
Private Attributes | |
| std::string | m_parse_type |
| std::unordered_map< std::string, std::set< std::string > > | m_favorite |
| unordered_map<Group Name, set<Track Name> > . | |
Class for storing the current favorites/custom groups of karts and tracks.
Put it into KartPropertiesManager or TrackManager by setFavoriteStatus() to add them into the original groups.
| bool FavoriteStatus::isFavorite | ( | std::string | ident | ) |
Adds a new favorite track to this player profile and to the group of favorite tracks of the Track Manager.
To be used only if this player profile is the current player.
| void FavoriteStatus::save | ( | UTFWriter & | out | ) |
Writes the data for this player to the specified UTFWriter.
| out | The utf writer to write the data to. |