#include <SDLSystem.h>
Inheritance diagram for cmil::SDL::SDLSystem::Parameters:
Public Types | |
typedef std::list< InputDevice * > | InputDeviceList |
typedef std::map< Supported, InputDeviceList > | MapList |
typedef std::pair< Supported, InputDeviceList > | MapListPair |
Public Member Functions | |
bool | add (SDL::Supported) |
bool | add (const Supported dev_type, InputDevice *custom) |
std::string | getName () const |
Private Attributes | |
MapList | m_index |
Friends | |
class | SDLSystem |
Definition at line 35 of file SDLSystem.h.
typedef std::list<InputDevice* > cmil::SDL::SDLSystem::Parameters::InputDeviceList |
Definition at line 37 of file SDLSystem.h.
typedef std::map<Supported, InputDeviceList > cmil::SDL::SDLSystem::Parameters::MapList |
Definition at line 38 of file SDLSystem.h.
typedef std::pair<Supported, InputDeviceList > cmil::SDL::SDLSystem::Parameters::MapListPair |
Definition at line 39 of file SDLSystem.h.
bool cmil::SDL::SDLSystem::Parameters::add | ( | const Supported | dev_type, | |
InputDevice * | custom | |||
) |
This inserts the device into the map-list structure. This function doesn't perform any validation of these parameters. That occurs in the SDLSystem ctor's and subsequent operations.
If the device doesn't exist in the map, add it with a list initialized with the device ptr.
Any additional device of the same kind will simply add another custom device to it's list.
Definition at line 38 of file SDLSystem.cpp.
References m_index.
00038 { 00040 MapList::iterator i; 00041 00042 if( (i = m_index.find(dev_type)) == m_index.end() ) { 00043 m_index.insert( MapListPair(dev_type, InputDeviceList(1, custom)) ) ; 00044 } 00045 else { 00047 (i->second).push_back(custom); 00048 } 00049 00050 return false; 00051 }
bool cmil::SDL::SDLSystem::Parameters::add | ( | SDL::Supported | ) |
Definition at line 30 of file SDLSystem.cpp.
Referenced by Application::init().
00030 { 00031 return SDLSystem::Parameters::add(device_type, NULL); 00032 }
Here is the caller graph for this function:
std::string cmil::SDL::SDLSystem::Parameters::getName | ( | ) | const [inline, virtual] |
friend class SDLSystem [friend] |
Definition at line 47 of file SDLSystem.h.