#include <InputData.h>
Inheritance diagram for cmil::InputData:
Public Member Functions | |
InputData (const std::string &name) | |
virtual | ~InputData () |
bool | operator== (const InputData &other) |
std::string | getName () const |
bool | getState () const |
unsigned long | getTime () const |
unsigned int | getID () const |
virtual Ev | createEv () const |
virtual InputData * | clone ()=0 |
virtual bool | isActionCompatible (InputAction *const action) const =0 |
virtual void | run (InputAction *const action) const =0 |
Protected Member Functions | |
void | setDevice (const std::string &device) |
void | setName (const std::string &name) |
void | setWhichDevice (int num_device) |
void | setID (const int id) |
Protected Attributes | |
bool | m_state |
Private Member Functions | |
void | setTime (unsigned long time) |
InputData & | operator= (const InputData &) |
Private Attributes | |
std::string | m_name |
Non-const to allow for future modification by custom devices. | |
unsigned long | m_time |
unsigned int | m_id |
An id useful for indexing. | |
std::string | m_device |
These provide reverse lookup of the device information from InputData. | |
unsigned int | m_num_device |
Friends | |
class | DeviceRegistry |
class | DeviceInputs |
class | SDL::Relay |
Definition at line 39 of file InputData.h.
cmil::InputData::InputData | ( | const std::string & | name | ) | [inline] |
virtual cmil::InputData::~InputData | ( | ) | [inline, virtual] |
virtual InputData* cmil::InputData::clone | ( | ) | [pure virtual] |
Implemented in cmil::ModData, cmil::Press, cmil::Axis, cmil::Motion, cmil::Coord, and cmil::Hat.
Referenced by cmil::DeviceInputs::DeviceInputs().
Here is the caller graph for this function:
Ev cmil::InputData::createEv | ( | ) | const [virtual] |
Definition at line 38 of file InputData.cpp.
References m_device, m_name, and m_num_device.
Referenced by cmil::NodeSequencer::capture().
00038 { 00040 return Ev(m_num_device, m_device, m_name); 00041 }
Here is the caller graph for this function:
unsigned int cmil::InputData::getID | ( | ) | const [inline] |
Definition at line 56 of file InputData.h.
References m_id.
Referenced by cmil::NormalHandler::canHandle(), cmil::DeviceRegistry::getID(), cmil::ComboHandler::handle(), cmil::NormalHandler::handle(), and cmil::NormalHandler::HandleActivity().
00056 { return m_id; }
Here is the caller graph for this function:
std::string cmil::InputData::getName | ( | ) | const [virtual] |
Implements Logger.
Reimplemented in cmil::Motion.
Definition at line 34 of file InputData.cpp.
References m_name.
Referenced by cmil::DeviceInputs::add(), cmil::NormalHandler::canHandle(), cmil::ComboHandler::handle(), cmil::NormalHandler::handle(), cmil::NormalHandler::HandleActivity(), and cmil::InputArbitrator::isActionCompatible().
00034 { 00035 return m_name; 00036 }
Here is the caller graph for this function:
bool cmil::InputData::getState | ( | ) | const [inline] |
Definition at line 54 of file InputData.h.
References m_state.
Referenced by cmil::NodeSequencer::capture(), cmil::ComboHandler::handle(), and cmil::NormalHandler::handle().
00054 { return m_state; }
Here is the caller graph for this function:
unsigned long cmil::InputData::getTime | ( | ) | const [inline] |
Definition at line 55 of file InputData.h.
References m_time.
Referenced by cmil::ComboHandler::handle().
00055 { return m_time; };
Here is the caller graph for this function:
virtual bool cmil::InputData::isActionCompatible | ( | InputAction *const | action | ) | const [pure virtual] |
Implemented in cmil::tInputData< ActionType >, cmil::tInputData< cmil::HatAction >, cmil::tInputData< cmil::CoordAction >, cmil::tInputData< cmil::AxisAction >, cmil::tInputData< cmil::MotionAction >, and cmil::tInputData< cmil::ModAction >.
Referenced by cmil::InputArbitrator::isActionCompatible(), cmil::ComboHandler::isCombo(), and cmil::NormalHandler::isNormal().
Here is the caller graph for this function:
bool cmil::InputData::operator== | ( | const InputData & | other | ) | [inline] |
Definition at line 45 of file InputData.h.
References m_name.
00045 { 00046 if(m_name == other.m_name) { 00047 return true; 00048 } 00049 else { return false; } 00050 }
virtual void cmil::InputData::run | ( | InputAction *const | action | ) | const [pure virtual] |
Implemented in cmil::tInputData< ActionType >, cmil::tInputData< cmil::HatAction >, cmil::tInputData< cmil::CoordAction >, cmil::tInputData< cmil::AxisAction >, cmil::tInputData< cmil::MotionAction >, and cmil::tInputData< cmil::ModAction >.
Referenced by cmil::ComboHandler::handle(), and cmil::NormalHandler::handle().
Here is the caller graph for this function:
void cmil::InputData::setDevice | ( | const std::string & | device | ) | [inline, protected] |
Definition at line 74 of file InputData.h.
References m_device.
Referenced by cmil::DeviceInputs::add().
00074 { m_device = device; }
Here is the caller graph for this function:
void cmil::InputData::setID | ( | const int | id | ) | [inline, protected] |
void cmil::InputData::setName | ( | const std::string & | name | ) | [inline, protected] |
void cmil::InputData::setTime | ( | unsigned long | time | ) | [inline, private] |
Definition at line 87 of file InputData.h.
References m_time.
Referenced by cmil::SDL::Relay::UpdateSystem().
00087 { m_time = time; };
Here is the caller graph for this function:
void cmil::InputData::setWhichDevice | ( | int | num_device | ) | [inline, protected] |
Definition at line 80 of file InputData.h.
References m_num_device.
00080 { m_num_device = num_device; }
friend class DeviceInputs [friend] |
Definition at line 66 of file InputData.h.
friend class DeviceRegistry [friend] |
Definition at line 65 of file InputData.h.
friend class SDL::Relay [friend] |
Definition at line 86 of file InputData.h.
std::string cmil::InputData::m_device [private] |
These provide reverse lookup of the device information from InputData.
Definition at line 97 of file InputData.h.
Referenced by createEv(), and setDevice().
unsigned int cmil::InputData::m_id [private] |
std::string cmil::InputData::m_name [private] |
Non-const to allow for future modification by custom devices.
Definition at line 87 of file InputData.h.
Referenced by createEv(), getName(), operator==(), and setName().
unsigned int cmil::InputData::m_num_device [private] |
bool cmil::InputData::m_state [protected] |
State information should be provided irrigardless of the InputData implementations, This allows functions to treat this property of InputData uniformly. See ComboHandler::handle(InputData).
Definition at line 72 of file InputData.h.
Referenced by cmil::Press::do_run(), getState(), and cmil::ModData::setState().
unsigned long cmil::InputData::m_time [private] |