Arc::PayloadRawInterface Class Reference

Random Access Payload for Message objects. More...

#include <PayloadRaw.h>

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

Public Member Functions

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

Detailed Description

Random Access Payload for Message objects.

This class is a virtual interface for managing Message payload with arbitrarily accessible content. Inheriting classes are supposed to implement memory-resident or memory-mapped content made of optionally multiple chunks/buffers. Every buffer has own size and offset. This class is purely virtual.


Member Function Documentation

virtual char* Arc::PayloadRawInterface::Buffer ( unsigned int  num  )  [pure virtual]

Returns pointer to num'th buffer

Implemented in Arc::PayloadRaw.

virtual Size_t Arc::PayloadRawInterface::BufferPos ( unsigned int  num  )  const [pure virtual]

Returns position of num'th buffer

Implemented in Arc::PayloadRaw.

virtual Size_t Arc::PayloadRawInterface::BufferSize ( unsigned int  num  )  const [pure virtual]

Returns length of num'th buffer

Implemented in Arc::PayloadRaw.

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

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

Implemented in Arc::PayloadRaw.

virtual char* Arc::PayloadRawInterface::Insert ( const char *  s,
Size_t  pos = 0,
Size_t  size = -1 
) [pure 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.

Implemented in Arc::PayloadRaw.

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

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

Implemented in Arc::PayloadRaw.

virtual char Arc::PayloadRawInterface::operator[] ( Size_t  pos  )  const [pure 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.

Implemented in Arc::PayloadRaw.

virtual Size_t Arc::PayloadRawInterface::Size ( void   )  const [pure virtual]

Returns logical size of whole structure.

Implemented in Arc::PayloadRaw.

virtual bool Arc::PayloadRawInterface::Truncate ( Size_t  size  )  [pure 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.

Implemented in Arc::PayloadRaw.


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