Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Types | Public Member Functions
Arc::PayloadRawInterface Class Reference

Random Access Payload for Message objects. More...

#include <PayloadRaw.h>

Inheritance diagram for Arc::PayloadRawInterface:
Inheritance graph
[legend]
Collaboration diagram for Arc::PayloadRawInterface:
Collaboration graph
[legend]

List of all members.

Public Types

typedef signed long long int Size_t

Public Member Functions

 PayloadRawInterface (void)
virtual ~PayloadRawInterface (void)
virtual char operator[] (Size_t pos) const =0
 Returns content of byte at specified position.
virtual char * Content (Size_t pos=-1)=0
 Get pointer to buffer content at global position 'pos'.
virtual Size_t Size (void) const =0
 Returns logical size of whole structure.
virtual char * Insert (Size_t pos=0, Size_t size=0)=0
 Create new buffer at global position 'pos' of size 'size'.
virtual char * Insert (const char *s, Size_t pos=0, Size_t size=-1)=0
 Create new buffer at global position 'pos' of size 'size'.
virtual char * Buffer (unsigned int num)=0
 Returns pointer to num'th buffer.
virtual Size_t BufferSize (unsigned int num) const =0
 Returns length of num'th buffer.
virtual Size_t BufferPos (unsigned int num) const =0
 Returns position of num'th buffer.
virtual bool Truncate (Size_t size)=0
 Change size of stored information.

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.

Definition at line 16 of file PayloadRaw.h.


Member Typedef Documentation

typedef signed long long int Arc::PayloadRawInterface::Size_t

Definition at line 19 of file PayloadRaw.h.


Constructor & Destructor Documentation

Definition at line 20 of file PayloadRaw.h.

{ };
virtual Arc::PayloadRawInterface::~PayloadRawInterface ( void  ) [inline, virtual]

Definition at line 21 of file PayloadRaw.h.

{ };

Member Function Documentation

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

Returns pointer to num'th buffer.

Implemented in ARex::PrefixedFilePayload, Arc::PayloadHTTP, Arc::PayloadMemConst, Arc::PayloadRaw, ARex::PayloadFile, and Hopi::PayloadFile.

Here is the caller graph for this function:

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

Returns position of num'th buffer.

Implemented in ARex::PrefixedFilePayload, Arc::PayloadHTTP, Arc::PayloadMemConst, Arc::PayloadRaw, ARex::PayloadFile, and Hopi::PayloadFile.

Here is the caller graph for this function:

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

Returns length of num'th buffer.

Implemented in ARex::PrefixedFilePayload, Arc::PayloadHTTP, Arc::PayloadMemConst, Arc::PayloadRaw, ARex::PayloadFile, and Hopi::PayloadFile.

Here is the caller graph for this function:

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 ARex::PrefixedFilePayload, Arc::PayloadHTTP, Arc::PayloadMemConst, Arc::PayloadRaw, ARex::PayloadFile, and Hopi::PayloadFile.

Here is the caller graph for this function:

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 ARex::PrefixedFilePayload, Arc::PayloadHTTP, Arc::PayloadMemConst, Arc::PayloadRaw, ARex::PayloadFile, and Hopi::PayloadFile.

Here is the caller graph for this function:

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 ARex::PrefixedFilePayload, Arc::PayloadHTTP, Arc::PayloadMemConst, Arc::PayloadRaw, ARex::PayloadFile, and Hopi::PayloadFile.

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 ARex::PrefixedFilePayload, Arc::PayloadHTTP, Arc::PayloadMemConst, Arc::PayloadRaw, ARex::PayloadFile, and Hopi::PayloadFile.

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

Returns logical size of whole structure.

Implemented in ARex::PrefixedFilePayload, Arc::PayloadHTTP, Arc::PayloadMemConst, Arc::PayloadRaw, ARex::PayloadFile, and Hopi::PayloadFile.

Here is the caller graph for this function:

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 ARex::PrefixedFilePayload, Arc::PayloadMemConst, Arc::PayloadHTTP, Arc::PayloadRaw, ARex::PayloadFile, and Hopi::PayloadFile.

Here is the caller graph for this function:


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