#include <WrapperPacket.h>
Inheritance diagram for GNE::WrapperPacket:
Public Member Functions | |
WrapperPacket (int id) | |
Initializes a new WrapperPacket with the given Packet ID and no encapsulated Packet. | |
WrapperPacket (int id, const Packet *packet) | |
Initializes a new WrapperPacket with the given Packet ID and encapsulated Packet. | |
WrapperPacket (const WrapperPacket &o) | |
Initializes this WrapperPacket with the given WrapperPacket. | |
virtual int | getSize () const |
Returns the current size of this packet in bytes. | |
const Packet * | getData () const |
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. | |
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. | |
WrapperPacket & | operator= (const WrapperPacket &rhs) |
Copies the given WrapperPacket into this one. | |
Protected Member Functions | |
WrapperPacket () | |
This ctor is suitable for use only in the create method. |
|
Initializes a new WrapperPacket with the given Packet ID and encapsulated Packet. The encapsulated Packet may be NULL. |
|
Returns the encapsulated data in this WrapperPacket. There may not currently be an encapsulated Packet, so this method may return NULL. |
|
Copies the given WrapperPacket into this one. Calls Packet::operator=( const Packet& rhs ). |
|
Replaces the given packet with the current packet as this WrapperPacket's data. The given packet is copied with the Packet::makeClone method, if it is not NULL. |