Arxx::Buffer::SubBuffer Class Reference

Collaboration diagram for Arxx::Buffer::SubBuffer:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class represents a sub buffer and its maintainance information inside a superior buffer.

Whenever a sub buffer is created the superior buffer will add this informative structure to its m_SubBuffers vector.

Currently there is only one piece of information given here: the order.

The order of a sub buffer is a numeric value related to the time when it was created as a sub buffer. It actually is not a time value. It only supports the one relation:

Why would anybody need such a thing?

Imagine an arbitrary buffer, filled or empty, that doesn't matter. Now mentally create three sub buffers of length 0 at the same position, one after another so that they get different orders. Now consider the three (different) scenarios of inserting an amount of data into one of those buffers.

Now, since all three buffer share the same values concerning their physical structure (position and length) there is no way of differentiating these three scenarios. What we need is the only difference they have: their times of creation.


Public Member Functions

 SubBuffer (Arxx::Buffer &Buffer, size_type stOrder)
 The constructor of a SubBuffer structure.
BufferGetBuffer (void)
 A function to retrieve the associated buffer.
size_type stGetOrder (void)
 A function to retrieve the associated order of the sub buffer.

Private Attributes

Bufferm_Buffer
 The associated Buffer.
size_type m_stOrder
 The associated order of the sub buffer.


Constructor & Destructor Documentation

Arxx::Buffer::SubBuffer::SubBuffer ( Arxx::Buffer Buffer,
size_type  stOrder 
) [inline]

The constructor of a SubBuffer structure.

Parameters:
Buffer The associated buffer which actually is the sub buffer.
stOrder The order this sub buffer was inserted in the superior buffer.
This constructor creates a SubBuffer. The parameters are the information the superior buffer whishes to associate with the sub buffer.


Member Function Documentation

Buffer& Arxx::Buffer::SubBuffer::GetBuffer ( void   )  [inline]

A function to retrieve the associated buffer.

With this function you can reget the associated sub buffer.

size_type Arxx::Buffer::SubBuffer::stGetOrder ( void   )  [inline]

A function to retrieve the associated order of the sub buffer.

With this function you can get the associated order.


Member Data Documentation

Buffer& Arxx::Buffer::SubBuffer::m_Buffer [private]

The associated Buffer.

A reference to the associated Buffer. As it is a reference it cannot be re-set or left unspecified. This class is only valid if there actually is such a sub buffer. It must be set with the constructor and may be retrieved with GetBuffer().

size_type Arxx::Buffer::SubBuffer::m_stOrder [private]

The associated order of the sub buffer.

A numeric value describing the order of the associated buffer (m_Buffer) inside the superior buffer. It may be retrieved via stGetOrder().


The documentation for this class was generated from the following file:
Generated on Tue Oct 10 11:34:44 2006 for libarxx by  doxygen 1.4.7