Symbian3/SDK/Source/GUID-B1BDF68C-F989-56BD-AED4-727595D7355C.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?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-B1BDF68C-F989-56BD-AED4-727595D7355C" xml:lang="en"><title>Doubly
Linked Lists Overview</title><shortdesc>This document is an overview of doubly linked lists.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-BC85DA5B-8918-4668-AB55-7E5689C145FB"><title>Purpose</title> <p>Manipulates a doubly-linked list: an ordered,
non-indexed list of elements, that can be traversed in both directions. </p> <p>The
API contains all the necessary functionality for doubly-linked lists. It is
possible to derive from its classes to add additional features.</p> </section>
<section id="GUID-110D347E-8D54-4E07-900B-9DD6E4BD1967"><title>Description</title> <p>The API has three key concepts: list
header (TDblQue), link class (TDblQueLink), and iterator class (TDblQueIter). </p> <p><b>General properties</b> </p> <p>Note the following properties of doubly-linked
lists:</p> <ul>
<li id="GUID-C0A25098-7340-59E4-BE7D-2E8C3063CCB0"><p>the list is circular:
the last element points forward to the head element and the head element points
back to the last element</p> </li>
<li id="GUID-869E862F-6DA6-5065-8933-B787C25747CC"><p>elements can be accessed
through iterating through the list, and added to the start and end of a list,
but not to the middle </p> </li>
<li id="GUID-14AEAE92-5DDF-5FEE-AF26-F983AD238365"><p>elements in a linked
list need not be objects of the same type but ought to be derived from the
same base class</p> </li>
</ul> <p><b>List
header</b> </p> <p>The list header supplies the behaviour for managing a doubly
linked list of objects. </p> <p>The list header interface is provided by <xref href="GUID-E5E9834A-63CA-3F03-88D3-85B912ADA54C.dita"><apiname>TDblQue</apiname></xref> <codeph>&lt;class
T&gt;</codeph>. The <codeph>T</codeph> template parameter specifies the type
of objects in the list.</p> <p><b>Link
class</b> </p> <p>To be a member of a doubly linked list, an object must contain
an instance of the link class as a data member.</p> <p>The link class interface
is provided by <xref href="GUID-603E3D27-6A5C-3E3D-8067-69E44AAACC1B.dita"><apiname>TDblQueLink</apiname></xref>.</p> <p><b>Iterator class </b> </p> <p>The iterator class supplies the behaviour
for moving through the elements of a list. </p> <p>The iterator class interface
is provided by <xref href="GUID-46C6F8E4-C7B5-39B2-A9E6-F022A924FF8C.dita"><apiname>TDblQueIter</apiname></xref>. </p> </section>
<section id="GUID-655D5DDF-9F7A-4DD7-AA3B-4CDF3A02B081"><title>See also</title> <p><xref href="GUID-21C04887-9F9C-5066-AA1D-B30C433CC0AE.dita">Circular
Buffers Overview</xref> </p> <p><xref href="GUID-8B28B8BB-6935-5332-B4D3-4183FDA3D202.dita">Singly
Linked Lists Overview</xref> </p> </section>
</conbody></concept>