torque Torque Game Engine Documentation
CVS Revision Label 1.3.x

ActionMap Class Reference

#include <actionMap.h>

Inheritance diagram for ActionMap:

SimObject ConsoleObject

Detailed Description

Map raw inputs to a variety of actions.

This is used for all keymapping in the engine.

See also:
ActionMap::Node


Public Member Functions

 ActionMap ()
 ~ActionMap ()
void dumpActionMap (const char *fileName, const bool append) const
bool processBind (const U32 argc, const char **argv)
bool processBindCmd (const char *device, const char *action, const char *makeCmd, const char *breakCmd)
bool processUnbind (const char *device, const char *action)
bool processAction (const InputEvent *)
 DECLARE_CONOBJECT (ActionMap)
Console Interface Functions
const char * getBinding (const char *command)
 Find what the given command is bound to.
const char * getCommand (const char *device, const char *action)
 Find what command is bound to the given event descriptor .
bool isInverted (const char *device, const char *action)
F32 getScale (const char *device, const char *action)
const char * getDeadZone (const char *device, const char *action)

Static Public Member Functions

static bool createEventDescriptor (const char *pEventString, EventDescriptor *pDescriptor)
static bool getKeyString (const U32 action, char *buffer)
static bool getDeviceName (const U32 deviceType, const U32 deviceInstance, char *buffer)
static const char * buildActionString (const InputEvent *event)
static bool checkBreakTable (const InputEvent *)
static bool handleEvent (const InputEvent *)
static bool handleEventGlobal (const InputEvent *)
static bool getDeviceTypeAndInstance (const char *device, U32 &deviceType, U32 &deviceInstance)

Protected Member Functions

bool onAdd ()
 Called when the object is added to the sim.
const NodefindNode (const U32 inDeviceType, const U32 inDeviceInst, const U32 inModifiers, const U32 inAction)
bool findBoundNode (const char *function, U32 &devMapIndex, U32 &nodeIndex)
NodegetNode (const U32 inDeviceType, const U32 inDeviceInst, const U32 inModifiers, const U32 inAction)
void removeNode (const U32 inDeviceType, const U32 inDeviceInst, const U32 inModifiers, const U32 inAction)
void enterBreakEvent (const InputEvent *pEvent, const Node *pNode)

Static Protected Member Functions

static const char * getModifierString (const U32 modifiers)

Protected Attributes

Vector< DeviceMap * > mDeviceMaps

Static Protected Attributes

static Vector< BreakEntrysmBreakTable

Private Types

typedef SimObject Parent

Data Structures

struct  BreakEntry
struct  DeviceMap
 Used to represent a devices. More...
struct  Node


Member Typedef Documentation

typedef SimObject ActionMap::Parent [private]
 

Reimplemented from SimObject.


Constructor & Destructor Documentation

ActionMap::ActionMap  ) 
 

ActionMap::~ActionMap  ) 
 


Member Function Documentation

bool ActionMap::onAdd  )  [protected, virtual]
 

Called when the object is added to the sim.

Reimplemented from SimObject.

const Node* ActionMap::findNode const U32  inDeviceType,
const U32  inDeviceInst,
const U32  inModifiers,
const U32  inAction
[protected]
 

bool ActionMap::findBoundNode const char *  function,
U32 devMapIndex,
U32 nodeIndex
[protected]
 

Node* ActionMap::getNode const U32  inDeviceType,
const U32  inDeviceInst,
const U32  inModifiers,
const U32  inAction
[protected]
 

void ActionMap::removeNode const U32  inDeviceType,
const U32  inDeviceInst,
const U32  inModifiers,
const U32  inAction
[protected]
 

void ActionMap::enterBreakEvent const InputEvent pEvent,
const Node pNode
[protected]
 

static const char* ActionMap::getModifierString const U32  modifiers  )  [static, protected]
 

void ActionMap::dumpActionMap const char *  fileName,
const bool  append
const
 

static bool ActionMap::createEventDescriptor const char *  pEventString,
EventDescriptor pDescriptor
[static]
 

bool ActionMap::processBind const U32  argc,
const char **  argv
 

bool ActionMap::processBindCmd const char *  device,
const char *  action,
const char *  makeCmd,
const char *  breakCmd
 

bool ActionMap::processUnbind const char *  device,
const char *  action
 

const char* ActionMap::getBinding const char *  command  ) 
 

Find what the given command is bound to.

const char* ActionMap::getCommand const char *  device,
const char *  action
 

Find what command is bound to the given event descriptor .

bool ActionMap::isInverted const char *  device,
const char *  action
 

F32 ActionMap::getScale const char *  device,
const char *  action
 

const char* ActionMap::getDeadZone const char *  device,
const char *  action
 

static bool ActionMap::getKeyString const U32  action,
char *  buffer
[static]
 

static bool ActionMap::getDeviceName const U32  deviceType,
const U32  deviceInstance,
char *  buffer
[static]
 

static const char* ActionMap::buildActionString const InputEvent event  )  [static]
 

bool ActionMap::processAction const InputEvent  ) 
 

static bool ActionMap::checkBreakTable const InputEvent  )  [static]
 

static bool ActionMap::handleEvent const InputEvent  )  [static]
 

static bool ActionMap::handleEventGlobal const InputEvent  )  [static]
 

static bool ActionMap::getDeviceTypeAndInstance const char *  device,
U32 deviceType,
U32 deviceInstance
[static]
 

ActionMap::DECLARE_CONOBJECT ActionMap   ) 
 


Field Documentation

Vector<DeviceMap*> ActionMap::mDeviceMaps [protected]
 

Vector<BreakEntry> ActionMap::smBreakTable [static, protected]
 




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen