uAction Class Reference

#include <uInput.h>

Inheritance diagram for uAction:

Inheritance graph
[legend]
Collaboration diagram for uAction:

Collaboration graph
[legend]

List of all members.

Public Types

enum  uInputType { uINPUT_DIGITAL, uINPUT_ANALOG }

Public Member Functions

 uAction (uAction *&anchor, const char *name, int priority=0, uInputType t=uINPUT_DIGITAL)
 uAction (uAction *&anchor, const char *name, const tOutput &desc, const tOutput &help, int priority=0, uInputType t=uINPUT_DIGITAL)
virtual ~uAction ()
unsigned short ID () const

Static Public Member Functions

static uActionFind (char const *name)
 find an action of the given name

Public Attributes

uInputType type
int priority
tString internalName
const tOutput description
const tOutput helpText

Protected Attributes

int localID
int globalID


Detailed Description

Definition at line 51 of file uInput.h.


Member Enumeration Documentation

enum uAction::uInputType

Enumerator:
uINPUT_DIGITAL 
uINPUT_ANALOG 

Definition at line 56 of file uInput.h.


Constructor & Destructor Documentation

uAction::uAction ( uAction *&  anchor,
const char *  name,
int  priority = 0,
uInputType  t = uINPUT_DIGITAL 
)

Definition at line 46 of file uInput.cpp.

References description, globalID, helpText, localID, su_allActionsLen, tASSERT, tToLower(), and uMAX_ACTIONS.

00049         :tListItem<uAction>(anchor),type(t),priority(priority_),internalName(name){
00050     globalID = localID = su_allActionsLen++;
00051 
00052     tASSERT(localID < uMAX_ACTIONS);
00053 
00054     su_allActions[localID] = this;
00055 
00056     tString descname;
00057     descname << "input_" << name << "_text";
00058     tToLower( descname );
00059 
00060     const_cast<tOutput&>(description).AddLocale(descname);
00061 
00062     tString helpname;
00063     helpname << "input_" << name << "_help";
00064     tToLower( helpname );
00065 
00066     const_cast<tOutput&>(helpText).AddLocale(helpname);
00067 }

Here is the call graph for this function:

uAction::uAction ( uAction *&  anchor,
const char *  name,
const tOutput desc,
const tOutput help,
int  priority = 0,
uInputType  t = uINPUT_DIGITAL 
)

Definition at line 69 of file uInput.cpp.

References globalID, localID, su_allActionsLen, tASSERT, and uMAX_ACTIONS.

00074         :tListItem<uAction>(anchor),type(t),priority(priority_),internalName(name), description(desc), helpText(help){
00075     globalID = localID = su_allActionsLen++;
00076 
00077     tASSERT(localID < uMAX_ACTIONS);
00078 
00079     su_allActions[localID] = this;
00080 }

uAction::~uAction (  )  [virtual]

Definition at line 82 of file uInput.cpp.

References localID, and NULL.

00082                  {
00083     su_allActions[localID] = NULL;
00084 }


Member Function Documentation

uAction * uAction::Find ( char const *  name  )  [static]

find an action of the given name

Definition at line 86 of file uInput.cpp.

References internalName, and su_allActionsLen.

Referenced by uBindPlayer::NewBind(), and uBind::uBind().

00087 {
00088     for (int i=su_allActionsLen-1;i>=0;i--)
00089         if (!strcmp(name,su_allActions[i]->internalName))
00090             return su_allActions[i];
00091 
00092     return 0;
00093 }

Here is the caller graph for this function:

unsigned short uAction::ID (  )  const [inline]

Definition at line 83 of file uInput.h.

References globalID.

Referenced by uActionPlayer::Find(), and eNetGameObject::SendControl().

00083 {return globalID;}

Here is the caller graph for this function:


Member Data Documentation

int uAction::localID [protected]

Definition at line 53 of file uInput.h.

Referenced by uAction(), and ~uAction().

int uAction::globalID [protected]

Definition at line 54 of file uInput.h.

Referenced by ID(), uActionGlobal::operator==(), uActionCamera::operator==(), uActionPlayer::operator==(), and uAction().

uInputType uAction::type

Definition at line 58 of file uInput.h.

Referenced by su_HandleEvent(), and su_InputSync().

int uAction::priority

Definition at line 59 of file uInput.h.

tString uAction::internalName

Definition at line 60 of file uInput.h.

Referenced by Find(), uJoystick::GetPersistentID(), uJoystick::uJoystick(), and uBind::Write().

const tOutput uAction::description

Definition at line 61 of file uInput.h.

Referenced by uAction().

const tOutput uAction::helpText

Definition at line 62 of file uInput.h.

Referenced by uAction().


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:59:50 2008 for Armagetron Advanced by  doxygen 1.5.4