#include <InputDevice.h>
Inheritance diagram for cmil::GameController:
Public Member Functions | |
GameController (const std::string &name, unsigned int axis, unsigned int buttons, unsigned int balls, unsigned int hats) | |
virtual InputDevice * | clone () const |
bool | operator== (const GameController &controller) const |
Public Attributes | |
tInputIndex< Axis > | m_axes |
These are useful conversion indexes. | |
tInputIndex< Press > | m_buttons |
tInputIndex< Motion > | m_balls |
tInputIndex< Hat > | m_hats |
Definition at line 243 of file InputDevice.h.
cmil::GameController::GameController | ( | const std::string & | name, | |
unsigned int | axis, | |||
unsigned int | buttons, | |||
unsigned int | balls, | |||
unsigned int | hats | |||
) |
Definition at line 598 of file InputDevice.cpp.
References m_axes, m_balls, m_buttons, m_hats, and cmil::InputDevice::m_inputs.
Referenced by clone().
00603 : InputDevice(name) { 00604 m_axes.fill_indexes (name, "axis", axes, m_inputs); 00605 m_buttons.fill_indexes (name, "button", buttons, m_inputs); 00606 m_balls.fill_indexes (name, "ball", balls, m_inputs); 00607 m_hats.fill_indexes (name, "hat", hats, m_inputs); 00608 }
Here is the caller graph for this function:
InputDevice * cmil::GameController::clone | ( | ) | const [virtual] |
Devices must provide this function in order to achieve certain custom properties on on construction, this function is accessed by translators.
Reimplemented from cmil::InputDevice.
Definition at line 610 of file InputDevice.cpp.
References GameController(), cmil::InputDevice::getName(), Logger::log_debug(), m_axes, m_balls, m_buttons, m_hats, and cmil::InputDevice::setInputs().
00610 { 00611 log_debug("clone() "); 00613 InputDevice* clone = new GameController(getName(), m_axes.getSize(), m_buttons.getSize(), m_balls.getSize(), m_hats.getSize()); 00614 00616 clone->setInputs( *this ); 00617 00618 log_debug("clone() returning clone"); 00619 return clone; 00620 };
Here is the call graph for this function:
bool cmil::GameController::operator== | ( | const GameController & | controller | ) | const |
Definition at line 622 of file InputDevice.cpp.
References cmil::InputDevice::getInputs(), cmil::InputDevice::getName(), Logger::log_debug(), m_axes, m_balls, m_buttons, m_hats, and cmil::InputDevice::m_inputs.
00622 { 00623 log_debug("operator=="); 00624 if ((m_axes == controller.m_axes) || 00625 (m_buttons == controller.m_buttons) || 00626 (m_balls == controller.m_balls) || 00627 (m_hats == controller.m_hats)) { 00628 log_debug("operator== returning false due to member mismatch"); 00629 return false; 00630 } 00631 00632 return ((getName() == controller.getName()) && (m_inputs == controller.getInputs())); 00633 };
Here is the call graph for this function:
These are useful conversion indexes.
Definition at line 254 of file InputDevice.h.
Referenced by clone(), GameController(), and operator==().
Definition at line 256 of file InputDevice.h.
Referenced by clone(), GameController(), and operator==().
Definition at line 255 of file InputDevice.h.
Referenced by clone(), GameController(), and operator==().
Definition at line 257 of file InputDevice.h.
Referenced by clone(), GameController(), and operator==().