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

NetReceiverBase Class Reference

Template-Independent part of the NetReceiver handles memory-acclocation. More...

#include <NetReceiver.h>

Inheritance diagram for NetReceiverBase:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 NetReceiverBase ()
 ~NetReceiverBase ()
virtual void onReceive ()=0
 is called by the associated handler when receiving data

bool receivedNew ()
void * getPackage (int newsize)
 gets memory for the NetHandler to store the data the NetReceiver then calls the streaming-operator for this data.

void freePackage ()
 frees the memory allocated by getPackage


Public Attributes

bool receivedNewPackage
 true if new data is aviable

void * package
 pointer to the data

int size
 size of the data


Detailed Description

Template-Independent part of the NetReceiver handles memory-acclocation.

Definition at line 17 of file NetReceiver.h.


Constructor & Destructor Documentation

NetReceiverBase::NetReceiverBase  )  [inline]
 

Definition at line 20 of file NetReceiver.h.

NetReceiverBase::~NetReceiverBase  )  [inline]
 

Definition at line 27 of file NetReceiver.h.

References freePackage().

Here is the call graph for this function:


Member Function Documentation

virtual void NetReceiverBase::onReceive  )  [pure virtual]
 

is called by the associated handler when receiving data

Implemented in NetReceiver< T >.

Referenced by UDPHandlerEndpoint::onReceive(), and TCPHandler::onReceive().

bool NetReceiverBase::receivedNew  )  [inline]
 

Definition at line 34 of file NetReceiver.h.

References receivedNewPackage.

void* NetReceiverBase::getPackage int  newsize  )  [inline]
 

gets memory for the NetHandler to store the data the NetReceiver then calls the streaming-operator for this data.

Definition at line 44 of file NetReceiver.h.

References ASSERT, and size.

Referenced by UDPHandler::addSenderAndReceiver(), UDPHandlerEndpoint::onReceive(), TCPHandler::onReceive(), and TCPHandler::TCPHandler().

void NetReceiverBase::freePackage  )  [inline]
 

frees the memory allocated by getPackage

Definition at line 60 of file NetReceiver.h.

Referenced by ~NetReceiverBase().


Member Data Documentation

bool NetReceiverBase::receivedNewPackage
 

true if new data is aviable

Definition at line 69 of file NetReceiver.h.

Referenced by receivedNew().

void* NetReceiverBase::package
 

pointer to the data

Definition at line 70 of file NetReceiver.h.

Referenced by UDPHandlerEndpoint::onReceive().

int NetReceiverBase::size
 

size of the data

Definition at line 71 of file NetReceiver.h.

Referenced by getPackage().


The documentation for this class was generated from the following file:
Generated on Thu Sep 23 20:09:52 2004 for GT2004 by doxygen 1.3.6