Symbian3/SDK/Source/GUID-D37E0579-0F3B-5EE4-8264-1358E493672B.dita
changeset 7 51a74ef9ed63
child 8 ae94777fff8f
equal deleted inserted replaced
6:43e37759235e 7:51a74ef9ed63
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-D37E0579-0F3B-5EE4-8264-1358E493672B" xml:lang="en"><title>Array
       
    13 of variable length elements, flat buffer</title><shortdesc>Describes how elements of varying length are organised in the array
       
    14 buffer.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <p>This is a <codeph>CArrayVarFlat&lt;class T&gt;</codeph> object whose
       
    16 elements can have different lengths. Although each element is a <codeph>class T</codeph> object,
       
    17 the length of that object can vary.</p>
       
    18 <p>In this type of array, each element occupies its own individual cell allocated
       
    19 from the heap. The array buffer contains fixed length data structures, one
       
    20 for each element, which are physically contiguous within the flat array buffer.
       
    21 Each fixed length data structure contains the length of an element (a <codeph>TInt</codeph> value)
       
    22 and a pointer to it. The structure itself is part of the implementation but
       
    23 occupies no more than eight bytes on 32-bit machines.</p>
       
    24 <p>A flat buffer always occupies a single cell allocated from the heap and
       
    25 is always extended by the process of reallocation. A flat array buffer is
       
    26 implemented using a <codeph>CBufFlat</codeph> object.</p>
       
    27 <p>The following diagram illustrates how elements are organised within the
       
    28 array buffer:</p>
       
    29 <fig id="GUID-2A857FBF-943D-5665-9999-BC27EA321F73">
       
    30 <image href="GUID-924E26D6-8B9D-5C76-AF61-7C5514BB3D78_d0e219442_href.png" placement="inline"/>
       
    31 </fig>
       
    32 <p>This kind of array is suitable for a small number of elements or for a
       
    33 moderately large but fixed maximum number of elements. It is not suitable
       
    34 for large arrays with a high turnover of elements. </p>
       
    35 <p>This class is immediately derived from the abstract templated base class <codeph>CArrayVar&lt;class T&gt;</codeph> which
       
    36 is itself derived from the abstract non-templated base class <codeph>CArrayVarBase</codeph>.</p>
       
    37 <section id="GUID-59ADA2D7-56B2-44C3-8E7C-A5DE5F0BBDBA"><title>See also</title> <p><xref href="GUID-112AAFA5-B4C9-5B62-A106-FB5097C13A0E.dita">Using
       
    38 Dynamic Buffers</xref>.</p> </section>
       
    39 </conbody></concept>