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

The three ObjectBrokerPackets are all identical except for their packet IDs. More...

#include <ObjectBrokerPacket.h>

Inheritance diagram for GNE::ObjectBrokerPacket:

Inheritance graph
[legend]
Collaboration diagram for GNE::ObjectBrokerPacket:

Collaboration graph
[legend]
List of all members.

Public Types

typedef SmartPtr< ObjectBrokerPacketsptr
typedef WeakPtr< ObjectBrokerPacketwptr

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 Tue Sep 5 23:47:49 2006 for GNE by  doxygen 1.4.7