Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
<?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-74C7B8E1-0A02-5242-A8C9-5CDD410102CC" xml:lang="en"><title>Identifying
elements</title><shortdesc>Describes how to identify elements within arrays.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>Elements within arrays are identified by their logical position within
the array.</p>
<p>Elements can also be accessed by key.</p>
<p>For all of the arrays <i>except</i>: <codeph>RArray<class T></codeph>, <codeph>RPointerArray<class T></codeph> and
any of their specialisations, the key structure is defined independently of
the array itself, using:</p>
<ul>
<li id="GUID-DD8F7A9A-5A95-59DC-A98B-D3F74CCFD1D9"><p>a <codeph>TKeyArrayFix</codeph> object
for arrays of same length elements.</p> </li>
<li id="GUID-BB94B0F3-E182-5A14-98DE-BEC9D150C91A"><p>a <codeph>TKeyArrayVar</codeph> object
for arrays of variable length elements.</p> </li>
<li id="GUID-2AD3D7F3-3C1C-51EE-ADB4-7EEE489F42D0"><p>a <codeph>TKeyArrayPak</codeph> object
for arrays of packed (variable length) elements.</p> </li>
</ul>
<p>Accessing an element by key requires the appropriate <codeph>TKeyArrayFix</codeph>, <codeph>TKeyArrayVar</codeph> or <codeph>TKeyArrayPak</codeph> object to be constructed and passed to the appropriate array class member
function.</p>
<p>For the: <codeph>RArray<class T></codeph>, <codeph>RPointerArray<class T></codeph> arrays,
keys are part of the array itself. These arrays also use the classes:</p>
<ul>
<li id="GUID-476F1A74-3EEA-5F2D-BCDD-1CE53949D087"><p><codeph>TLinearOrder<class T></codeph> to
define the ordering of two objects.</p> </li>
<li id="GUID-2631B9C1-5716-5FF3-B248-E19E75BB212F"><p><codeph>TIdentityRelation<class T></codeph> to
define the comparison of two objects.</p> </li>
</ul>
</conbody></concept>