Public Member Functions

CxUtils::Packet::Wrapper Class Reference

Method to wrap an existing byte array within a Packet for easy Read/Write operations. The wrapped buffer is not resized or deleted by the Packet. More...

#include <packet.h>

List of all members.

Public Member Functions

 Wrapper ()
 Constructor.
 Wrapper (const Wrapper &wrapper)
 Copy constructor.
 Wrapper (unsigned char *buffer, const unsigned int len)
 Constructor for Wrapper packet. A Wrapper packet wraps an existing buffer with a Packet so users can easily Read/Write to/from the buffer. On destruction, the buffer is not deleted.
 ~Wrapper ()
 Destructor.
bool Create (unsigned char *buffer, const unsigned int len)
 Create a Wrapper packet. A Wrapper packet wraps an existing buffer with a Packet so users can easily Read/Write to/from the buffer. On destruction, the buffer is not deleted.
void Clear ()
 Clears wrapped data.
Packetoperator-> ()
 Method to get a pointer to the wrapper packet for read/write operations.
const Packetoperator-> () const
 Method to get a pointer to the wrapper packet for read/write operations.
PacketGetData ()
 Method to get a pointer to the wrapper packet for read/write operations.
const PacketGetData () const
 Method to get a pointer to the wrapper packet for read/write operations.
Wrapperoperator= (const Wrapper &wrapper)
 Makes a wrapper packet copy.

Detailed Description

Method to wrap an existing byte array within a Packet for easy Read/Write operations. The wrapped buffer is not resized or deleted by the Packet.

Definition at line 112 of file packet.h.


Constructor & Destructor Documentation

Packet::Wrapper::Wrapper (  )

Constructor.

Definition at line 64 of file packet.cpp.

Packet::Wrapper::Wrapper ( const Wrapper wrapper )

Copy constructor.

Parameters:
[in]wrapperThe wrapper to duplicate.

Definition at line 76 of file packet.cpp.

Packet::Wrapper::Wrapper ( unsigned char *  buffer,
const unsigned int  len 
)

Constructor for Wrapper packet. A Wrapper packet wraps an existing buffer with a Packet so users can easily Read/Write to/from the buffer. On destruction, the buffer is not deleted.

Parameters:
[in]bufferPointer to buffer to wrap.
[in]lenLength of the buffer in bytes.

Definition at line 92 of file packet.cpp.

Packet::Wrapper::~Wrapper (  )

Destructor.

Definition at line 109 of file packet.cpp.


Member Function Documentation

void Packet::Wrapper::Clear (  )

Clears wrapped data.

Definition at line 153 of file packet.cpp.

bool Packet::Wrapper::Create ( unsigned char *  buffer,
const unsigned int  len 
)

Create a Wrapper packet. A Wrapper packet wraps an existing buffer with a Packet so users can easily Read/Write to/from the buffer. On destruction, the buffer is not deleted.

Parameters:
[in]bufferPointer to buffer to wrap.
[in]lenLength of the buffer in bytes.
Returns:
True on success, false on failure.

Definition at line 127 of file packet.cpp.

Packet * Packet::Wrapper::GetData (  )

Method to get a pointer to the wrapper packet for read/write operations.

Definition at line 207 of file packet.cpp.

const Packet * Packet::Wrapper::GetData (  ) const

Method to get a pointer to the wrapper packet for read/write operations.

Definition at line 195 of file packet.cpp.

const Packet * Packet::Wrapper::operator-> (  ) const

Method to get a pointer to the wrapper packet for read/write operations.

Definition at line 172 of file packet.cpp.

Packet * Packet::Wrapper::operator-> (  )

Method to get a pointer to the wrapper packet for read/write operations.

Definition at line 184 of file packet.cpp.

Packet::Wrapper & Packet::Wrapper::operator= ( const Wrapper wrapper )

Makes a wrapper packet copy.

Definition at line 218 of file packet.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines