SuperTuxKart
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MapUserConfigParam< T, U > Class Template Reference

ATM only map with 1 key and 1 value is supported. More...

#include <user_config.hpp>

Inheritance diagram for MapUserConfigParam< T, U >:
Inheritance graph
[legend]

Public Member Functions

 MapUserConfigParam (const char *param_name, const char *comment, std::array< std::string, 3 > key_names, std::map< T, U > default_value)
 
 MapUserConfigParam (const char *param_name, GroupUserConfigParam *group, const char *comment=NULL)
 
 MapUserConfigParam (const char *param_name, GroupUserConfigParam *group, const char *comment, std::array< std::string, 3 > key_names, std::map< T, U > default_value)
 
void write (std::stringstream &stream) const
 
void findYourDataInAChildOf (const XMLNode *node)
 
void findYourDataInAnAttributeOf (const XMLNode *node)
 
void addElement (T element, U value)
 
irr::core::stringc toString () const
 
 operator std::map< T, U > & ()
 
std::map< T, U >::iterator begin ()
 
std::map< T, U >::iterator end ()
 
std::map< T, U >::iterator find (const T &key)
 
size_t erase (const T &key)
 
bool empty () const
 
std::map< T, U > & operator= (const std::map< T, U > &v)
 
std::map< T, U > & operator= (const MapUserConfigParam &v)
 
size_t size () const
 
U & operator[] (const T key)
 
U & at (const T key)
 
- Public Member Functions inherited from UserConfigParam
virtual void write (std::stringstream &stream) const =0
 
virtual void writeInner (std::stringstream &stream, int level=0) const
 Writes an inner node.
 
virtual void findYourDataInAChildOf (const XMLNode *node)=0
 
virtual void findYourDataInAnAttributeOf (const XMLNode *node)=0
 
virtual irr::core::stringc toString () const =0
 

Protected Member Functions

 MapUserConfigParam (const char *param_name, const char *comment)
 

Protected Attributes

std::array< std::string, 3 > m_key_names
 
std::map< T, U > m_elements
 
- Protected Attributes inherited from UserConfigParam
bool m_can_be_deleted = true
 
std::string m_param_name
 
std::string m_comment
 

Detailed Description

template<typename T, typename U>
class MapUserConfigParam< T, U >

ATM only map with 1 key and 1 value is supported.

Member Function Documentation

◆ findYourDataInAChildOf()

template<typename T , typename U >
void MapUserConfigParam< T, U >::findYourDataInAChildOf ( const XMLNode node)
virtual

Implements UserConfigParam.

◆ findYourDataInAnAttributeOf()

template<typename T , typename U >
void MapUserConfigParam< T, U >::findYourDataInAnAttributeOf ( const XMLNode node)
virtual

Implements UserConfigParam.

◆ toString()

template<typename T , typename U >
core::stringc MapUserConfigParam< T, U >::toString
virtual

Implements UserConfigParam.

◆ write()

template<typename T , typename U >
void MapUserConfigParam< T, U >::write ( std::stringstream &  stream) const
virtual

Implements UserConfigParam.


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