AURobotServers  4
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
UEventTrap Class Reference

#include <ueventtrap.h>

Public Member Functions

bool callTrap (void *data)
 
unsigned long getID ()
 
bool isThis (const char *compKey)
 
bool isValid ()
 
void set (unsigned long id, const char *onKey, EVENT_CALL onEvent, void *obj)
 
void setInvalid ()
 
 UEventTrap ()
 
 ~UEventTrap ()
 

Static Public Attributes

static const int MAX_TRAP_KEY_LENGTH = 100
 

Protected Attributes

char key [MAX_TRAP_KEY_LENGTH+1]
 
void * object
 
unsigned long serial
 
EVENT_CALL trapCall
 
bool valid
 

Constructor & Destructor Documentation

UEventTrap::UEventTrap ( )

Constructor

References key, MAX_TRAP_KEY_LENGTH, serial, trapCall, and valid.

UEventTrap::~UEventTrap ( )

Destructor

Member Function Documentation

bool UEventTrap::callTrap ( void *  data)

Call the trap function with these data

References trapCall.

Referenced by getID(), and UClientHandler::gotNewData().

unsigned long UEventTrap::getID ( )
inline

Get event ID

References callTrap(), data, isThis(), and serial.

Referenced by UEvents::del().

bool UEventTrap::isThis ( const char *  compKey)

Returns true if this eventkey is compatible with the parameter key

References key.

Referenced by UEvents::getEvent(), and getID().

bool UEventTrap::isValid ( )
inline

Is event trap valid

References valid.

Referenced by UEvents::add(), UEvents::del(), and UEvents::getEvent().

void UEventTrap::set ( unsigned long  id,
const char *  onKey,
EVENT_CALL  onEvent,
void *  obj 
)

Set trap date.

References key, MAX_TRAP_KEY_LENGTH, serial, and trapCall.

Referenced by UEvents::add().

void UEventTrap::setInvalid ( )
inline

Set event invalid

References valid.

Referenced by UEvents::del().

Member Data Documentation

char UEventTrap::key[MAX_TRAP_KEY_LENGTH+1]
protected

Ketword that should trigger the event

Referenced by isThis(), set(), and UEventTrap().

const int UEventTrap::MAX_TRAP_KEY_LENGTH = 100
static

Max length of keyword string

Referenced by set(), and UEventTrap().

void* UEventTrap::object
protected

Object to reply to

unsigned long UEventTrap::serial
protected

ID if the trap, uset to delete the trap.

Referenced by getID(), set(), and UEventTrap().

EVENT_CALL UEventTrap::trapCall
protected

Function to call

Referenced by callTrap(), set(), and UEventTrap().

bool UEventTrap::valid
protected

Is the trap valid (not deleted)

Referenced by isValid(), setInvalid(), and UEventTrap().


The documentation for this class was generated from the following files: