GNE  0.75.0
GNE::ObjectCreationPacket Class Reference

ObjectCreationPacket is a class used by the ObjectBroker to replicate new objects. More...

#include <ObjectCreationPacket.h>

Inheritance diagram for GNE::ObjectCreationPacket:
GNE::ObjectBrokerPacket GNE::WrapperPacket GNE::Packet

Public Types

typedef SmartPtr
< ObjectCreationPacket
sptr
typedef WeakPtr
< ObjectCreationPacket
wptr
- Public Types inherited from GNE::ObjectBrokerPacket
typedef SmartPtr
< ObjectBrokerPacket
sptr
typedef WeakPtr
< ObjectBrokerPacket
wptr
- Public Types inherited from GNE::WrapperPacket
typedef SmartPtr< WrapperPacketsptr
typedef WeakPtr< WrapperPacketwptr
- Public Types inherited from GNE::Packet
typedef SmartPtr< Packetsptr
typedef WeakPtr< Packetwptr

Public Member Functions

 ObjectCreationPacket ()
 Creates a new instance of this packet suitable only to call readPacket on.
 ObjectCreationPacket (int objectId, const Packet &data)
 Initializes a new ObjectCreationPacket.
- Public Member Functions inherited from GNE::ObjectBrokerPacket
 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.
- Public Member Functions inherited from GNE::WrapperPacket
const PacketgetData () const
 Returns the encapsulated data in this WrapperPacket.
PacketgetData ()
 Returns the encapsulated data in this WrapperPacket.
void setData (const Packet *packet)
 Replaces the given packet with the current packet as this WrapperPacket's data.
WrapperPacketoperator= (const WrapperPacket &rhs)
 Copies the given WrapperPacket into this one.
- Public Member Functions inherited from GNE::Packet
PacketmakeClone () const
 Returns a newly allocated exact copy of this packet, using the PacketParser::clonePacket function.
int getType () const
 Returns the type of this instance.

Static Public Attributes

static const int ID = 6
 The ID for this type of packet.

Additional Inherited Members

- Protected Member Functions inherited from GNE::ObjectBrokerPacket
 ObjectBrokerPacket (int id)
 This ctor is suitable for use only in the create method.

Detailed Description

ObjectCreationPacket is a class used by the ObjectBroker to replicate new objects.

Constructor & Destructor Documentation

GNE::ObjectCreationPacket::ObjectCreationPacket ( int  objectId,
const Packet data 
)

Initializes a new ObjectCreationPacket.

The given Packet is copied.


The documentation for this class was generated from the following files: