Symbian3/SDK/Source/GUID-B7482AEB-9E7E-5F9C-A69D-60E1FE82CCE1.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 7 51a74ef9ed63
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     6
<!-- Initial Contributors:
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     7
    Nokia Corporation - initial contribution.
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     8
Contributors: 
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     9
-->
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    10
<!DOCTYPE concept
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    12
<concept id="GUID-B7482AEB-9E7E-5F9C-A69D-60E1FE82CCE1" xml:lang="en"><title>dynamicarray: Using Dynamic Arrays</title><shortdesc>This example application demonstrates how to construct
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    13
and use dynamic arrays.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    14
<p> The example includes both simple dynamic arrays and extended dynamic
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    15
arrays. You are likely to use simple dynamic arrays often. Extended
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    16
dynamic arrays are combinations of element properties and storage
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    17
types. </p>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    18
<p>The example implements the following operations for the <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita"><apiname>RArray</apiname></xref> and <xref href="GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F.dita"><apiname>RPointerArray</apiname></xref> classes: </p>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    19
<ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    20
<li id="GUID-B97ECA5C-C85B-5FFE-85C8-5CF63B1E28BE"><p>Appends elements </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    21
<li id="GUID-94B944CD-E9E2-5C4D-AACB-9E132A042D9E"><p>Inserts elements </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    22
<li id="GUID-C08769D8-4921-53BE-A07C-08ADE237D05F"><p>Accesses elements </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    23
<li id="GUID-CB9EE059-E64B-5178-962F-1B21569581DF"><p>Removes elements </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    24
<li id="GUID-FFD58188-D8E0-5B53-8E59-91911186C7CB"><p>Finds elements
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    25
(in various ways) </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    26
<li id="GUID-6ADD8D2B-9B4E-52C5-838E-DA0F3D646390"><p>Sorts array </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    27
<li id="GUID-BF05324F-470C-5DE6-8BAD-E842D7C2BBC8"><p>Destroys the
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    28
array </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    29
</ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    30
<section id="GUID-C469AD45-C916-48B9-A621-944D8FE0B625"><title>Download</title> <p>Click on the following link to download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-a0e27f39-b574-424f-af5c-8e764d4e3aa0.zip" scope="external">DynamicArrays.zip</xref></p><p>Download some additional
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    31
files required by the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-4184e6d4-8dbe-4267-b1a3-8737c8bf64ce.zip" scope="external">CommonFramework.zip</xref></p><p>View the source
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    32
code: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-a0e27f39-b574-424f-af5c-8e764d4e3aa0.html" scope="peer">browse </xref> . View the additional files:<xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-4184e6d4-8dbe-4267-b1a3-8737c8bf64ce.html" scope="peer">browse</xref>.</p> </section>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    33
<section id="GUID-B7551573-B14D-45A9-9F29-39033C2058EC"><title>Description</title> <p>This example demonstrates how to construct and use the following
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    34
types of dynamic arrays: </p> <p><b>CArrayFixFlat</b> </p> <p>This
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    35
example uses the <xref href="GUID-12C65B99-553E-35CA-B36F-2F77BFC972B3.dita"><apiname>CArrayFixFlat</apiname></xref> array class to create
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    36
an array of objects. These objects are of fixed length and are stored
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    37
in a flat buffer. </p> <p>The following operations are performed on
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    38
this array: </p> <ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    39
<li id="GUID-98A1051E-C6A9-5A4D-9AC0-6421E7D2B972"><p> <b>Append elements:</b> The example uses the <xref href="GUID-79EFD210-2C4F-31E5-83CD-DC9FE54FD585.dita#GUID-79EFD210-2C4F-31E5-83CD-DC9FE54FD585/GUID-B4C14DDC-78BF-3A11-9A7C-6B7F948CE162"><apiname>CArrayFix::AppendL()</apiname></xref> function
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    40
to append objects to the array. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    41
<li id="GUID-EC85E528-D19E-5E93-B3D7-09A5E4920335"><p> <b>Insert elements:</b> The example uses the <xref href="GUID-79EFD210-2C4F-31E5-83CD-DC9FE54FD585.dita#GUID-79EFD210-2C4F-31E5-83CD-DC9FE54FD585/GUID-C6A1753D-E8A6-39CA-ACCA-42192A7B1BA3"><apiname>CArrayFix::InsertL()</apiname></xref> function
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    42
to insert objects into the array at the specified position. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    43
<li id="GUID-2572C5EC-A0AF-59AE-A165-A47741C035B1"><p> <b>Remove elements:</b> The example uses the <xref href="GUID-B0159EFA-B76E-3C59-8B35-42CC93DAF0FF.dita#GUID-B0159EFA-B76E-3C59-8B35-42CC93DAF0FF/GUID-3B6B91EE-B89F-3BA9-8F07-5036A347A6DE"><apiname>CArrayFixBase::Delete()</apiname></xref> function
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    44
to delete objects from the array. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    45
<li id="GUID-437DB73D-A4CB-573C-B75F-1E56A667F196"><p> <b>Sort elements:</b> The example defines an array key to sort the array using the <xref href="GUID-5BC09594-7D9F-3B3F-95B0-7828A756537B.dita"><apiname>TKeyArrayFix</apiname></xref> class. The <xref href="GUID-B0159EFA-B76E-3C59-8B35-42CC93DAF0FF.dita#GUID-B0159EFA-B76E-3C59-8B35-42CC93DAF0FF/GUID-B62662E3-F359-3A16-8C61-38A9E2EC7A56"><apiname>CArrayFixBase::Sort()</apiname></xref> function is used to sort the array using this array key. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    46
<li id="GUID-3EF730BC-B9DC-5906-ACE5-EC57DB8FDF46"><p> <b>Swap two
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    47
elements:</b> The example implements the <xref href="GUID-04117018-A42A-3D49-9EA3-D1D7A7785B0A.dita#GUID-04117018-A42A-3D49-9EA3-D1D7A7785B0A/GUID-22AB214D-552D-3F5B-9A04-E620453FFD08"><apiname>TSwap::Swap()</apiname></xref> function through the <codeph>CMySwap</codeph> class. The <codeph>CMySwap::Swap()</codeph> function is used to swap two elements of
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    48
the array. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    49
<li id="GUID-58714E19-49E6-528B-A462-F88BCB0063A3"><p> <b>Find an
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    50
element:</b> The example implements the <codeph>TKeyElementFix</codeph> class. This class is a <xref href="GUID-0756A649-486C-3CE5-9F1E-467E008A63C7.dita"><apiname>TKey</apiname></xref> derived class. It
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    51
overrides the <xref href="GUID-0756A649-486C-3CE5-9F1E-467E008A63C7.dita#GUID-0756A649-486C-3CE5-9F1E-467E008A63C7/GUID-EE6812EB-9E48-303D-88B7-B0D49581E9B1"><apiname>TKey::At()</apiname></xref> function. The <codeph>TKeyElementFix::At()</codeph> function gets a pointer to the key
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    52
of a specified array element. This function is used by the <xref href="GUID-12C65B99-553E-35CA-B36F-2F77BFC972B3.dita#GUID-12C65B99-553E-35CA-B36F-2F77BFC972B3/GUID-D5FB0842-E883-3977-95EB-EA2D0189A429"><apiname>CArrayFixFlat::Find()</apiname></xref> function to find an element in the
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    53
array. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    54
</ul> <p><b>CArrayPtrFlat</b> </p> <p>This example uses the <xref href="GUID-FCE7D958-96AA-346D-8D22-0EF24B9DB7CC.dita"><apiname>CArrayPtrFlat</apiname></xref> array class to create an array of pointers
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    55
to <codeph>CBase</codeph> derived objects. </p> <p>The following operations
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    56
are performed on this array: </p> <ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    57
<li id="GUID-291A9D24-E360-59A5-9856-D727920E06A3"><p> <b>Append elements:</b> The example uses the <xref href="GUID-79EFD210-2C4F-31E5-83CD-DC9FE54FD585.dita#GUID-79EFD210-2C4F-31E5-83CD-DC9FE54FD585/GUID-B4C14DDC-78BF-3A11-9A7C-6B7F948CE162"><apiname>CArrayFix::AppendL()</apiname></xref> function
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    58
to append objects to the array. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    59
<li id="GUID-17E609B9-837D-528B-A4EC-983AFCCC9D55"><p> <b>Insert elements:</b> The example uses the <xref href="GUID-79EFD210-2C4F-31E5-83CD-DC9FE54FD585.dita#GUID-79EFD210-2C4F-31E5-83CD-DC9FE54FD585/GUID-C6A1753D-E8A6-39CA-ACCA-42192A7B1BA3"><apiname>CArrayFix::InsertL()</apiname></xref> function
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    60
to insert objects into the array at the specified position. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    61
<li id="GUID-CC2A6E70-76E1-5029-B409-09EE2ADFCF0D"><p> <b>Remove elements:</b> The example uses the <xref href="GUID-B0159EFA-B76E-3C59-8B35-42CC93DAF0FF.dita#GUID-B0159EFA-B76E-3C59-8B35-42CC93DAF0FF/GUID-3B6B91EE-B89F-3BA9-8F07-5036A347A6DE"><apiname>CArrayFixBase::Delete()</apiname></xref> function
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    62
to delete objects from the array. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    63
</ul> <p><b>CArrayVarFlat</b> </p> <p>This example uses the <xref href="GUID-5BC7EAFE-FC9C-3E86-BFDC-FDE9FE086D53.dita"><apiname>CArrayVarFlat</apiname></xref> array class to create an array of objects.
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    64
These objects are of different lengths. Pointers to these elements
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    65
are maintained in a flat dynamic buffer. </p> <p>The following operations
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    66
are performed on this array: </p> <ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    67
<li id="GUID-D44919CC-40CF-5BE9-8228-633B752E83BE"><p> <b>Append elements:</b> The example uses the <xref href="GUID-C2430ABF-D276-3F70-A18B-7059F3099BF1.dita#GUID-C2430ABF-D276-3F70-A18B-7059F3099BF1/GUID-8C5D0DD4-880F-357C-92F5-C4750EF3F0CA"><apiname>CArrayVar::AppendL()</apiname></xref> function
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    68
to append objects to the array. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    69
<li id="GUID-DE339118-3311-5603-8925-9C540E2E3B5F"><p> <b>Sort elements:</b> The example defines an array key to sort the array using the <xref href="GUID-03CE0E0B-3731-338A-87E4-49B669AD4EBC.dita"><apiname>TKeyArrayVar</apiname></xref> class. The <xref href="GUID-1BA1D5FF-BE4A-3EA5-9784-ADEA1B81EF39.dita#GUID-1BA1D5FF-BE4A-3EA5-9784-ADEA1B81EF39/GUID-9E6E6A98-12F0-3D18-A9A2-5AECEE597FCD"><apiname>CArrayVarBase::Sort()</apiname></xref> function is used to sort the array using this array key. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    70
</ul> <p><b>CArrayPakFlat</b> </p> <p>This example uses the <xref href="GUID-4D6E6B46-32B5-34AD-BD8A-84BF6B2B7C81.dita"><apiname>CArrayPakFlat</apiname></xref> array class to create an array of objects.
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    71
These objects are of variable lengths. These are stored in a flat
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    72
buffer. Each element is preceded by its length information. </p> <p>The following operations are performed on this array: </p> <ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    73
<li id="GUID-DC8D9F36-DD53-52CB-B28B-585EF92A4F6E"><p> <b>Append elements:</b> The example uses the <xref href="GUID-899495E6-C20E-3614-A3A9-C49A7916E5E7.dita#GUID-899495E6-C20E-3614-A3A9-C49A7916E5E7/GUID-2AA0BFE1-E86D-3E4C-99C0-116A4D23458E"><apiname>CArrayPak::AppendL()</apiname></xref> function
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    74
to append objects to the array. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    75
<li id="GUID-CC45322E-DD5A-5A59-99C5-E5EC5F50102F"><p> <b>Find an
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    76
element:</b> The example defines an array key to find an element in
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    77
the array using the <xref href="GUID-F3BF9485-BA32-36A4-9B39-FC51E28F5A24.dita"><apiname>TKeyArrayPak</apiname></xref> class. The <xref href="GUID-800D79F0-D735-3AC5-BDFD-F1E7B8C37B99.dita#GUID-800D79F0-D735-3AC5-BDFD-F1E7B8C37B99/GUID-A52664B1-8E1F-3570-92EC-E7EEEA26F204"><apiname>CArrayPakBase::Find()</apiname></xref> function is used to find an element
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    78
in the array. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    79
</ul> <p><b>RArray</b> </p> <p>This example constructs a simple dynamic
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    80
array called <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita"><apiname>RArray</apiname></xref>. It is an efficient array of
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    81
fixed length objects. The elements of this array are the instances
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    82
of another class, so this is specified as a template parameter <codeph>T</codeph>. </p> <p>This example shows the following operations to
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    83
this array: </p> <ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    84
<li id="GUID-C70C80B2-E102-5B25-AE9C-9A81FF8A98EB"><p> <b>Append elements:</b> The example performs the following steps: </p> <ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    85
<li><p>Appends the objects into the array using <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita#GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707/GUID-91876009-5DB6-3EC3-A666-C641DFD9F6AC"><apiname>RArray::AppendL()</apiname></xref>.</p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    86
<li><p>Displays the number of objects and prints each object present
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    87
in the array.</p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    88
</ul> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    89
<li id="GUID-6DE66AF3-ECD0-599C-9BE0-CE56FAAE8DEB"><p> <b>Insert elements:</b> The example performs the following steps: </p> <ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    90
<li><p>Inserts the objects at a specified position using <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita#GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707/GUID-16727B8A-AFFB-3980-AD43-5F48FDE6636F"><apiname>RArray::InsertL()</apiname></xref>.</p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    91
<li><p>Passes the position of the object to the second parameter of <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita#GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707/GUID-16727B8A-AFFB-3980-AD43-5F48FDE6636F"><apiname>RArray::InsertL()</apiname></xref>. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    92
<li><p>Inserts objects in the beginning, middle, and at the end of
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    93
the array. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    94
<li><p>Displays the number of objects and prints each object present
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    95
in the array. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    96
</ul> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    97
<li id="GUID-4D341B6F-68F2-5111-9016-DF394371E9D9"><p> <b>Access elements:</b> The example accesses each object in the array and display into the
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    98
console. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    99
<li id="GUID-1BC1A5E9-2C9D-56C3-BD68-ABF6887A6611"><p> <b>Remove elements:</b> The example removes an object at a specific position from the array
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   100
using <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita#GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707/GUID-1DB4CB58-EFC8-3A83-9F37-19269C6C2C3B"><apiname>RArray::Remove()</apiname></xref>. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   101
<li id="GUID-9A8AE90E-5FBC-546E-8486-B49E9C102ADE"><p> <b>Find elements:</b> The example performs the following steps: </p> <ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   102
<li><p>Finds the first object in the array that matches the specified
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   103
object using <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita#GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707/GUID-3E855FCF-DF2C-3466-86F8-DD1EB6E29276"><apiname>RArray::Find()</apiname></xref>.</p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   104
<li><p>Finds the last object in the array that matches the specified
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   105
object using <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita#GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707/GUID-C6D7018E-764D-3F22-B2AC-9DD440803E29"><apiname>RArray::FindReverse()</apiname></xref>. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   106
<li><p>Finds the object using a binary search technique in the array,
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   107
which matches the specified object using <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita#GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707/GUID-DCB1F823-9EF6-34DB-8355-2BC2EF26FE7C"><apiname>RArray::FindInSignedKeyOrder()</apiname></xref>. It assumes that the existing objects within the array are in signed
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   108
key order.</p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   109
<li><p>Finds the object using a binary search technique in the array,
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   110
which matches the specified object using <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita#GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707/GUID-0E388DD6-B45D-3446-8962-A0EDBD342638"><apiname>RArray::FindInUnsignedKeyOrder()</apiname></xref>. It assumes that the existing objects within the array are in unsigned
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   111
key order. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   112
<li><p>Finds the object using a binary search technique in the array,
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   113
which matches the specified object using <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita#GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707/GUID-A18066A7-E8D1-3639-A1A3-28FC305530AC"><apiname>RArray::SpecificFindInSignedKeyOrder()</apiname></xref>. It passes the mode as the second parameter of this API to find
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   114
the first, last, or any match in case of multiple matches. It assumes
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   115
that the existing objects within the array are in signed key order.</p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   116
<li><p>Finds the object using a binary search technique in the array,
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   117
which matches the specified object using <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita#GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707/GUID-A2A443D0-0BC5-3918-8F4D-02EE8631DFA5"><apiname>RArray::SpecificFindInUnsignedKeyOrder()</apiname></xref>. It passes the mode as the second parameter of this API to find
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   118
the first, last, or any match in case of multiple matches. It assumes
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   119
that the existing objects within the array are in unsigned key order.</p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   120
</ul> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   121
<li id="GUID-BCE082EF-B079-5CCD-A05D-E75673D41F6A"><p> <b>Sort elements:</b> The example performs the following steps: </p> <ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   122
<li><p>Constructs two arrays of 64-bit signed integer type objects. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   123
<li><p>Appends random objects to the first array using <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita#GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707/GUID-B765D192-0DFD-3C6C-9CC2-DF9127CCBCD1"><apiname>RArray::Append()</apiname></xref>. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   124
<li><p>Inserts the data present in the first array to the second array.</p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   125
<li><p>Sorts the element of second array using <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita#GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707/GUID-1341082A-2B94-39A8-9392-C7579703448B"><apiname>RArray::sort()</apiname></xref>.</p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   126
</ul> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   127
<li id="GUID-0C4013C6-FF11-5EF5-997D-FC700B0EA074"><p> <b>Destroy
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   128
the array:</b> The example performs the following steps: </p> <ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   129
<li><p>Destroys the array using delete operator. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   130
<li><p>Closes the array and removes all the memory allocated to the
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   131
array using <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita#GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707/GUID-03B4185C-48D1-3006-850C-3FEC64624652"><apiname>RArray::Close()</apiname></xref>.</p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   132
</ul> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   133
</ul> <p><b>RPointerArray</b> </p> <p>This example constructs a simple
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   134
dynamic array of pointers to objects called <xref href="GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F.dita"><apiname>RPointerArray</apiname></xref>. It is an efficient pointer array of fixed-length objects. The elements
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   135
of this array are the instances of another class so this is specified
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   136
as a template parameter <codeph>T</codeph>. </p> <p>This example shows
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   137
the following operations to this array: </p> <ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   138
<li id="GUID-407A782D-D24C-57F1-9186-EA282BAED7DE"><p> <b>Append elements:</b> The example performs the following steps: <ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   139
<li><p>Appends the object pointers into the array using <xref href="GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F.dita#GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F/GUID-E68CDC4B-4F61-38CA-8B15-18316FB3E474"><apiname>RPointerArray::AppendL()</apiname></xref>.</p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   140
<li><p>Displays the number of object pointers and prints each object
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   141
pointer present in the array. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   142
</ul> </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   143
<li id="GUID-F912B096-C0D2-54AB-83BC-5EF5AE27056D"><p> <b>Insert elements:</b> The example performs the following steps: </p> <ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   144
<li><p>Inserts the objects pointer at a specified position using <xref href="GUID-DB067403-726B-3DCF-B1D9-F51CB2003608.dita#GUID-DB067403-726B-3DCF-B1D9-F51CB2003608/GUID-F93DF5F8-3FEF-3688-8734-CBB14E6359ED"><apiname>RpointerArray::InsertL()</apiname></xref>. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   145
<li><p>Passes the position of the object pointer to the second parameter
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   146
of <xref href="GUID-DB067403-726B-3DCF-B1D9-F51CB2003608.dita#GUID-DB067403-726B-3DCF-B1D9-F51CB2003608/GUID-F93DF5F8-3FEF-3688-8734-CBB14E6359ED"><apiname>RpointerArray::InsertL()</apiname></xref>. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   147
<li><p>Inserts object pointer at the beginning, in the middle, and
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   148
at the end of the array. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   149
<li><p>Displays the number of object pointers and prints each object
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   150
pointer present in the array. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   151
</ul> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   152
<li id="GUID-EA24F055-BEE4-59D3-AE73-0050D234B210"><p> <b>Access elements:</b> The example accesses each object pointer in the array and displays
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   153
it to the console. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   154
<li id="GUID-07DEA041-3DA6-50F0-A741-B35BCE2A8F5E"><p> <b>Remove elements:</b> The example removes an object pointer at a specific position from
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   155
the array using <xref href="GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F.dita#GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F/GUID-EC933901-F350-3A6E-8685-A67CA37A1E11"><apiname>RPointerArray::Remove()</apiname></xref>. </p> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   156
<li id="GUID-FA180B99-1F67-59ED-A3D0-72301D9C8715"><p> <b>Find elements:</b> The example performs the following steps: </p> <ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   157
<li><p>Finds the first object pointer in the array that matches the
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   158
specified object using <xref href="GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F.dita#GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F/GUID-8A9FDFE2-36DF-3761-9954-F109772AF61A"><apiname>RPointerArray::Find()</apiname></xref>. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   159
<li><p>Finds the last object pointer in the array that matches the
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   160
specified object using <xref href="GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F.dita#GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F/GUID-C5A21601-1A65-3511-ABD6-A8FFD980557A"><apiname>RPointerArray::FindReverse()</apiname></xref>. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   161
<li><p>Finds the object pointer in the array that matches the specified
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   162
object pointer, using <xref href="GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F.dita#GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F/GUID-A481AF4B-3E62-3C1F-B5D7-8AF728FDF669"><apiname>RPointerArray::FindInAddressOrder()</apiname></xref>. It assumes that object pointers in the array are in address order. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   163
</ul> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   164
<li id="GUID-04A741B2-2B7B-582C-A3EB-9826D55A2E09"><p> <b>Sort elements:</b> The example performs the following steps: </p><ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   165
<li><p>Constructs two arrays of <codeph>TAny</codeph> pointer objects. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   166
<li><p>Appends random objects to the first pointer array using <xref href="GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F.dita#GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F/GUID-C58AEACF-A227-365B-BFA8-90EFA488ED41"><apiname>RPointerArray::Append()</apiname></xref>. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   167
<li><p>Inserts the data present in the first pointer array to the
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   168
second pointer array. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   169
<li><p>Sorts the element of the second pointer array using <xref href="GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F.dita#GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F/GUID-46A0EC17-43BA-33B8-B24C-7D30F5726668"><apiname>RPointerArray::sort()</apiname></xref>. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   170
</ul> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   171
<li id="GUID-2B2521B2-815E-5798-8258-76B812BA42B5"><p> <b>Destroy
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   172
the array:</b> The example performs the following steps: </p> <ul>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   173
<li><p>Destroys and resets the pointer array using <xref href="GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F.dita#GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F/GUID-5F92DA38-9A3C-3D78-9E8B-F0341025F73C"><apiname>RPointerArray::ResetAnddestroy()</apiname></xref>. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   174
<li><p>Closes the pointer array and removes all the memory allocated
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   175
to the array using <xref href="GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F.dita#GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F/GUID-B96DA352-0983-31F3-BF46-EE30122F27B5"><apiname>RPointerArray::Close()</apiname></xref>. </p></li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   176
</ul> </li>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   177
</ul> </section>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   178
<section id="GUID-232031B9-5964-45FC-A497-1FBC6FB068B1"><title>Class
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   179
summary</title><p> <xref href="GUID-12C65B99-553E-35CA-B36F-2F77BFC972B3.dita"><apiname>CArrayFixFlat </apiname></xref>  <xref href="GUID-FCE7D958-96AA-346D-8D22-0EF24B9DB7CC.dita"><apiname>CArrayPtrFlat </apiname></xref> <xref href="GUID-5BC7EAFE-FC9C-3E86-BFDC-FDE9FE086D53.dita"><apiname>CArrayVarFlat </apiname></xref>  <xref href="GUID-4D6E6B46-32B5-34AD-BD8A-84BF6B2B7C81.dita"><apiname>CArrayPakFlat </apiname></xref>  <xref href="GUID-04117018-A42A-3D49-9EA3-D1D7A7785B0A.dita"><apiname>TSwap </apiname></xref> <xref href="GUID-5BC09594-7D9F-3B3F-95B0-7828A756537B.dita"><apiname>TKeyArrayFix </apiname></xref>  <xref href="GUID-03CE0E0B-3731-338A-87E4-49B669AD4EBC.dita"><apiname>TKeyArrayVar </apiname></xref>  <xref href="GUID-F3BF9485-BA32-36A4-9B39-FC51E28F5A24.dita"><apiname>TKeyArrayPak </apiname></xref> <xref href="GUID-0756A649-486C-3CE5-9F1E-467E008A63C7.dita"><apiname>TKey </apiname></xref>  <xref href="GUID-FAEBF321-6B08-3041-A01F-B1E7282D0707.dita"><apiname>RArray </apiname></xref>  <xref href="GUID-C028C373-CE25-3832-855E-17FB738721CF.dita"><apiname>TLinearOrder </apiname></xref>  <xref href="GUID-AAA13D1F-1BD7-3331-BB8C-11FA2795B53F.dita"><apiname>RPointerArray</apiname></xref>  </p></section>
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   180
<section id="GUID-7F5416FD-580C-4CD5-8167-DB6C546B75A4"><title>Build</title> <p> The Symbian build process describes how to build this example. </p> <p>For the emulator, the example builds an executable
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   181
file called <filepath>DynamicArrays.exe</filepath> in the standard
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   182
location (<filepath>\epoc32\release\winscw\&lt;build_variant&gt;</filepath> for CodeWarrior) directory. After launching the executable file,
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   183
depending on the emulator you are using, you can task away from the
48780e181b38 Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
   184
application launcher or shell screen to view the console. </p> </section>
7
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
   185
</conbody></concept>