Main Page   Modules   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members   Related Pages  

GNE::ObjectBrokerPacket Class Reference
[High-Level API]

#include <ObjectBrokerPacket.h>

Inheritance diagram for GNE::ObjectBrokerPacket:

GNE::WrapperPacket GNE::Packet GNE::ObjectCreationPacket GNE::ObjectDeathPacket GNE::ObjectUpdatePacket List of all members.

Public Types

typedef SmartPtr< ObjectBrokerPacket > sptr
typedef WeakPtr< ObjectBrokerPacket > wptr

Public Member Functions

 ObjectBrokerPacket (int packetId, int objectId, const Packet *data)
 Initializes a new ObjectBrokerPacket.

 ObjectBrokerPacket (const ObjectBrokerPacket &o)
 Initializes a new ObjectBrokerPacket from the given one.

int getObjectId () const
 Returns the object ID.

void setObjectId (int newId)
 Sets the object ID for this packet.

virtual int getSize () const
 Returns the current size of this packet in bytes.

virtual void writePacket (Buffer &raw) const
 Writes the packet to the given Buffer.

virtual void readPacket (Buffer &raw)
 Reads this packet from the given Buffer.


Protected Member Functions

 ObjectBrokerPacket (int id)
 This ctor is suitable for use only in the create method.


Detailed Description

The three ObjectBrokerPackets are all identical except for their packet IDs. This base class abstracts the common functionality.


Constructor & Destructor Documentation

GNE::ObjectBrokerPacket::ObjectBrokerPacket int  packetId,
int  objectId,
const Packet data
 

Initializes a new ObjectBrokerPacket.

The given Packet is copied, if it not NULL. ObjectCreationPacket and ObjectUpdatePacket require a passed packet, but ObjectDeathPacket does not.


Member Function Documentation

void GNE::ObjectBrokerPacket::setObjectId int  newId  ) 
 

Sets the object ID for this packet.

Parameters:
the new ID, in the range of [0..65535] (inclusive).


The documentation for this class was generated from the following files:
Generated on Fri Aug 22 13:40:06 2003 for GNE by doxygen1.3