Main Page | Class Hierarchy | Class List | File List | Class Members

AAAMessageBlock Class Reference

MessageBuffer Message Buffer Definitions. More...

#include <diameter_parser_api.h>

List of all members.

Public Member Functions

void Release ()

Static Public Member Functions

AAAMessageBlock * Acquire (char *buf, ACE_UINT32 s)
AAAMessageBlock * Acquire (ACE_UINT32 s)
AAAMessageBlock * Acquire (AAAMessageBlock *b)

Protected Member Functions

 AAAMessageBlock (char *buf, ACE_UINT32 s)
 AAAMessageBlock (ACE_UINT32 s)
 AAAMessageBlock (AAAMessageBlock *b)
void * operator new (size_t s)
void operator delete (void *p)


Detailed Description

MessageBuffer Message Buffer Definitions.

AAAMessageBlock is a class for containing raw data.

Offset contains the current pointer location relative to the address of data. Offset is set only after "write" operation and not updated for "read" operation.


Constructor & Destructor Documentation

AAAMessageBlock::AAAMessageBlock (  char *  buf,
ACE_UINT32  s
)  [inline, protected]
 

A message block is created with pointing to the buffer location and having a specified size.

Parameters:
buf User buffer passed to message block
s size of user buffer

AAAMessageBlock::AAAMessageBlock (  ACE_UINT32  s  )  [inline, protected]
 

A message block consisting of null characters of the specified size is created.

Parameters:
s size to be internally allocated

AAAMessageBlock::AAAMessageBlock (  AAAMessageBlock *  b  )  [inline, protected]
 

A shallow-copy constractor. This constructor just duplicates (ie. a shallow copy) the data block of the incoming Message Block, since the incoming Message Block always has a data block has a data block allocated from the heap.


Member Function Documentation

AAAMessageBlock* AAAMessageBlock::Acquire (  AAAMessageBlock *  b  )  [inline, static]
 

Acquire by duplication. Referece count of the original message data is incremented by one.

Parameters:
b original message

AAAMessageBlock* AAAMessageBlock::Acquire (  ACE_UINT32  s  )  [inline, static]
 

Acquire by allocation. A new message block of specified size is created.

Parameters:
s size to be internally allocated

AAAMessageBlock* AAAMessageBlock::Acquire (  char *  buf,
ACE_UINT32  s
)  [inline, static]
 

Acquire by reference. The message block points to the specified location with the size set to the specified value.

Parameters:
buf User buffer passed to message block
s size of user buffer

void AAAMessageBlock::operator delete (  void *  p  )  [inline, protected]
 

Abstracted delete operator

Parameters:
p data block to free

void* AAAMessageBlock::operator new (  size_t  s  )  [inline, protected]
 

Abstracted new operator

Parameters:
s size of block to allocate (proxy only)

void AAAMessageBlock::Release (   )  [inline]
 

Release function. Referece count of the message data is decremented by one. If the reference count becomes 0, the entire message block is deleted. It is definitely more efficient to directly call release().


The documentation for this class was generated from the following file:
Generated on Mon Jan 10 20:16:51 2005 for Open Diameter C++ API by  doxygen 1.3.9.1