Arc::PayloadRaw Class Reference

Raw byte multi-buffer. More...

#include <PayloadRaw.h>

Inheritance diagram for Arc::PayloadRaw:
Arc::PayloadRawInterface Arc::MessagePayload

Public Member Functions

 PayloadRaw (void)
virtual ~PayloadRaw (void)
virtual char operator[] (Size_t pos) const
virtual char * Content (Size_t pos=-1)
virtual Size_t Size (void) const
virtual char * Insert (Size_t pos=0, Size_t size=0)
virtual char * Insert (const char *s, Size_t pos=0, Size_t size=-1)
virtual char * Buffer (unsigned int num=0)
virtual Size_t BufferSize (unsigned int num=0) const
virtual Size_t BufferPos (unsigned int num=0) const
virtual bool Truncate (Size_t size)

Detailed Description

Raw byte multi-buffer.

This is implementation of PayloadRawInterface. Buffers are memory blocks logically placed one after another.


Constructor & Destructor Documentation

Arc::PayloadRaw::PayloadRaw ( void   )  [inline]

List of handled buffers. Constructor. Created object contains no buffers.

virtual Arc::PayloadRaw::~PayloadRaw ( void   )  [virtual]

Destructor. Frees allocated buffers.


Member Function Documentation

virtual char* Arc::PayloadRaw::Buffer ( unsigned int  num = 0  )  [virtual]

Returns pointer to num'th buffer

Implements Arc::PayloadRawInterface.

virtual Size_t Arc::PayloadRaw::BufferPos ( unsigned int  num = 0  )  const [virtual]

Returns position of num'th buffer

Implements Arc::PayloadRawInterface.

virtual Size_t Arc::PayloadRaw::BufferSize ( unsigned int  num = 0  )  const [virtual]

Returns length of num'th buffer

Implements Arc::PayloadRawInterface.

virtual char* Arc::PayloadRaw::Content ( Size_t  pos = -1  )  [virtual]

Get pointer to buffer content at global position 'pos'. By default to beginning of main buffer whatever that means.

Implements Arc::PayloadRawInterface.

virtual char* Arc::PayloadRaw::Insert ( const char *  s,
Size_t  pos = 0,
Size_t  size = -1 
) [virtual]

Create new buffer at global position 'pos' of size 'size'. Created buffer is filled with content of memory at 's'. If 'size' is negative content at 's' is expected to be null-terminated.

Implements Arc::PayloadRawInterface.

virtual char* Arc::PayloadRaw::Insert ( Size_t  pos = 0,
Size_t  size = 0 
) [virtual]

Create new buffer at global position 'pos' of size 'size'.

Implements Arc::PayloadRawInterface.

virtual char Arc::PayloadRaw::operator[] ( Size_t  pos  )  const [virtual]

Returns content of byte at specified position. Specified position 'pos' is treated as global one and goes through all buffers placed one after another.

Implements Arc::PayloadRawInterface.

virtual Size_t Arc::PayloadRaw::Size ( void   )  const [virtual]

Returns logical size of whole structure.

Implements Arc::PayloadRawInterface.

virtual bool Arc::PayloadRaw::Truncate ( Size_t  size  )  [virtual]

Change size of stored information. If size exceeds end of allocated buffer, buffers are not re-allocated, only logical size is extended. Buffers with location behind new size are deallocated.

Implements Arc::PayloadRawInterface.


The documentation for this class was generated from the following file:
Generated on Wed Jun 27 11:54:25 2012 for Hosting Environment (Daemon) by  doxygen 1.6.3