diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-E1410365-7254-5326-B3F7-D7100D31E59F.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-E1410365-7254-5326-B3F7-D7100D31E59F.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,12 @@ + + + + + +Array of variable length elements, segmented buffer

This is a CArrayVarSeg<class T> object whose elements can have different lengths. Although each element is a class T object, the length of that object can vary.

In this type of array, each element occupies its own individual cell allocated from the heap. The array buffer contains fixed length data structures, one for each element, which are logically contiguous within the buffer but are physically contiguous only within a segment. Each fixed length data structure contains the length of an element (a TInt value) and a pointer to it. The structure itself is part of the implementation but occupies no more than eight bytes on 32-bit machines.

A segmented buffer is implemented as a doubly linked list of equally sized cells allocated from the heap and is always extended by allocating a new segment and inserting it into the appropriate place in the list. A segmented array buffer is implemented using a CBufSeg object.

The following diagram illustrates how elements are organised within the array buffer:

This kind of array is suitable for large arrays with a high turnover of elements.

This class is immediately derived from the abstract templated base class CArrayVar<class T> which is itself derived from the abstract non-templated base class CArrayVarBase.

See also

Dynamic Buffers Guide.

\ No newline at end of file