Symbian3/PDK/Source/GUID-82862A69-5E86-5924-BFF0-F7655FCBFAF0.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 11 Mar 2010 18:02:22 +0000
changeset 3 46218c8b8afa
parent 1 25a17d01db0c
child 5 f345bda72bc4
permissions -rw-r--r--
week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-82862A69-5E86-5924-BFF0-F7655FCBFAF0" xml:lang="en"><title>Contiguousness</title><shortdesc>Description of contiguous data in flat and segmented buffers.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>In flat buffers, all data is contiguous. The <codeph>Ptr()</codeph> function
always returns a pointer descriptor from the buffer position specified to
the end of the data, and the <codeph>BackPtr()</codeph> function always returns
a pointer descriptor from the beginning of the buffer to the buffer position
specified.</p>
<p>In segmented buffers, data is contained in segments and the maximum length
of contiguous data is the granularity of the buffer. The extent of contiguous
data contained in a segment may vary between a single byte, and the granularity,
if the insertion and deletion pattern is arbitrary.</p>
<p>However, the following guarantee is made: if the number of bytes inserted
or deleted in <i>all</i> insertion and deletion operations is a multiple of
some number <i>n</i>, and the granularity is also a multiple of this number <i>n</i>,
then all data extents will be a multiple of <i>n</i> in length. This implies
that the <codeph>Ptr()</codeph> function, given a buffer position which is
a multiple of <i>n</i>, will always return a pointer descriptor referring
to at least <i>n</i> bytes.</p>
<p>This property of segmented descriptors is exploited by the <codeph>CArrayFixBase</codeph>, <codeph>CArrayVarBase</codeph> and <codeph>CArrayPakBase</codeph> derived array classes. In these classes, all insertion or deletion operations
are always done in terms of the (fixed) length of data stored in the buffer.
Therefore, the data for an individual array element is always contiguous.</p>
</conbody><related-links>
<link>
<desc><xref href="GUID-2F64B579-73D3-548A-9104-16483AF77BCB.dita">Dynamic Arrays</xref></desc>
</link>
</related-links></concept>