cmil::Hat Class Reference

#include <InputData.h>

Inheritance diagram for cmil::Hat:

Inheritance graph
[legend]
Collaboration diagram for cmil::Hat:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Hat (const std::string &ident)
virtual InputDataclone ()
virtual void setPosition (HatAction::Position pos)
const HatAction::Position getPosition () const
void do_run (HatAction *action) const

Private Attributes

HatAction::Position m_pos

Detailed Description

This represents hat based motion. A hat event can belong to a joystick,gamepad or similar device

Definition at line 306 of file InputData.h.


Constructor & Destructor Documentation

cmil::Hat::Hat ( const std::string &  ident  )  [inline]

Definition at line 308 of file InputData.h.

Referenced by clone().

00308 : tInputData<HatAction>(ident) {}

Here is the caller graph for this function:


Member Function Documentation

virtual InputData* cmil::Hat::clone (  )  [inline, virtual]

Implements cmil::InputData.

Definition at line 310 of file InputData.h.

References Hat().

00310                                  {
00311         return new Hat(*this);
00312       };

Here is the call graph for this function:

void cmil::Hat::do_run ( HatAction action  )  const [inline]

Definition at line 321 of file InputData.h.

References m_pos, and cmil::HatAction::Movement().

00321                                            {
00322         action->Movement(m_pos);
00323       };

Here is the call graph for this function:

const HatAction::Position cmil::Hat::getPosition (  )  const [inline]

Definition at line 317 of file InputData.h.

References m_pos.

00317                                                   {
00318         return m_pos; 
00319       }; 

virtual void cmil::Hat::setPosition ( HatAction::Position  pos  )  [inline, virtual]

Definition at line 314 of file InputData.h.

References m_pos.

Referenced by cmil::SDL::SDLControllers::translate().

00314                                                       {
00315         m_pos = pos;
00316       }; 

Here is the caller graph for this function:


Member Data Documentation

HatAction::Position cmil::Hat::m_pos [private]

Definition at line 323 of file InputData.h.

Referenced by do_run(), getPosition(), and setPosition().


The documentation for this class was generated from the following file:
(c) 2006-2007 John P. Feltz
Generated on Wed Jul 25 16:08:02 2007 for Common Media Input Layer by doxygen 1.4.7

SourceForge.net Logo