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. | |
Buffer & | GetBuffer (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 | |
Buffer & | m_Buffer |
The associated Buffer. | |
size_type | m_stOrder |
The associated order of the sub buffer. |
Arxx::Buffer::SubBuffer::SubBuffer | ( | Arxx::Buffer & | Buffer, | |
size_type | stOrder | |||
) | [inline] |
The constructor of a SubBuffer structure.
Buffer | The associated buffer which actually is the sub buffer. | |
stOrder | The order this sub buffer was inserted in the superior buffer. |
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.
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().