Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

InputEntity Class Reference

#include <inputentity.h>

Inheritance diagram for InputEntity:

Inheritance graph
[legend]
Collaboration diagram for InputEntity:

Collaboration graph
[legend]
List of all members.

Detailed Description

Interface for objects processing input Input entites receive input events from the master InputGroup object the entity is attached to. Derived from Activator for easy on/off management. A deactivated input entity will not receive any events from the master InputGroup object.

Derived classes must implement the Input process method to handle the events received.

Author:
Mattias Jansson (mattias@realityrift.com)


Public Member Functions

 InputEntity (InputGroup *pkGroup)
virtual ~InputEntity ()
void AttachToGroup (InputGroup *pkGroup)
virtual void Input (const InputEvent *pkEvent)=0
bool IsActive () const
virtual void Activate ()
virtual void Deactivate ()
bool Toggle ()

Protected Attributes

InputGroupm_pkGroup
bool m_bActive


Constructor & Destructor Documentation

InputEntity InputGroup pkGroup  ) 
 

Attach to group

Parameters:
pkGroup 

virtual ~InputEntity  )  [virtual]
 

Detach from group


Member Function Documentation

void AttachToGroup InputGroup pkGroup  ) 
 

Attach to an input group (will detach from any current group)

Parameters:
pkGroup 

virtual void Input const InputEvent pkEvent  )  [pure virtual]
 

Process input

Parameters:
pkEvent Event

Implemented in Console.

bool IsActive  )  const [inline, inherited]
 

Query state of object

Returns:
true if active, false if not

void Activate  )  [inline, virtual, inherited]
 

Activate object

void Deactivate  )  [inline, virtual, inherited]
 

Deactivate object

bool Toggle  )  [inline, inherited]
 

Toggle active state. This method does not need to be overloaded, it is only a wrapper to Activate and Deactivate

Returns:
true if activated, false if deactivated


Member Data Documentation

InputGroup* m_pkGroup [protected]
 

Input group we belong to

bool m_bActive [protected, inherited]
 

Active flag


The documentation for this class was generated from the following file:
Generated on Wed Jan 21 14:21:11 2004 for NeoEngine by doxygen 1.3.5