Main Page Modules Namespaces C++ Classes Compound List File List Index
TNL: TNL::RPCEvent Class Reference

# TNL::RPCEvent Class Reference

`#include <tnlRPC.h>`

Inheritance diagram for TNL::RPCEvent:

## Detailed Description

Base class for RPC events.

All declared RPC methods create subclasses of RPCEvent to send data across the wire

## Public Member Functions

| RPCEvent (RPCGuaranteeType gType, RPCDirection dir)
| Constructor call from within the rpcSomething method generated by the TNL_IMPLEMENT_RPC macro.
void | pack (EventConnection *ps, BitStream *bstream)
| Pack is called on the origin side of the connection to write an event's data into a packet.
void | unpack (EventConnection *ps, BitStream *bstream)
| Unpack is called on the destination side of the connection to read an event's data out of a packet.
virtual bool | checkClassType (Object *theObject)=0
void | process (EventConnection *ps)
| Process is called to process the event data when it has been unpacked.

## Data Fields

Functor * | mFunctor

## Constructor & Destructor Documentation

TNL::RPCEvent::RPCEvent | ( | RPCGuaranteeType | gType,
|  | RPCDirection | dir |
| ) |  |  |

Constructor call from within the rpcSomething method generated by the TNL_IMPLEMENT_RPC macro.

## Member Function Documentation

void TNL::RPCEvent::pack | ( | EventConnection * | ps,
|  | BitStream * | bstream |
| ) |  |  | `[virtual]`

Pack is called on the origin side of the connection to write an event's data into a packet.

Implements TNL::NetEvent.

Reimplemented in TNL::NetObjectRPCEvent.

void TNL::RPCEvent::unpack | ( | EventConnection * | ps,
|  | BitStream * | bstream |
| ) |  |  | `[virtual]`

Unpack is called on the destination side of the connection to read an event's data out of a packet.

Implements TNL::NetEvent.

Reimplemented in TNL::NetObjectRPCEvent.

virtual bool TNL::RPCEvent::checkClassType | ( | Object * | theObject | ) | `[pure virtual]`

void TNL::RPCEvent::process | ( | EventConnection * | ps | ) | `[virtual]`

Process is called to process the event data when it has been unpacked.

For a guaranteed, ordered event, process is called only once all prior events have been received and processed. For unguaranteed events, process is called immediately after unpack.

Implements TNL::NetEvent.

Reimplemented in TNL::NetObjectRPCEvent.

## Field Documentation

Functor* TNL::RPCEvent::mFunctor