AURobotServers
4
|
#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 |
UEventTrap::UEventTrap | ( | ) |
Constructor
References key, MAX_TRAP_KEY_LENGTH, serial, trapCall, and valid.
UEventTrap::~UEventTrap | ( | ) |
Destructor
bool UEventTrap::callTrap | ( | void * | data | ) |
Call the trap function with these data
References trapCall.
Referenced by getID(), and UClientHandler::gotNewData().
|
inline |
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().
|
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().
|
inline |
|
protected |
Ketword that should trigger the event
Referenced by isThis(), set(), and UEventTrap().
|
static |
Max length of keyword string
Referenced by set(), and UEventTrap().
|
protected |
Object to reply to
|
protected |
ID if the trap, uset to delete the trap.
Referenced by getID(), set(), and UEventTrap().
|
protected |
Function to call
Referenced by callTrap(), set(), and UEventTrap().
|
protected |
Is the trap valid (not deleted)
Referenced by isValid(), setInvalid(), and UEventTrap().