Symbian3/SDK/Source/GUID-8B28B8BB-6935-5332-B4D3-4183FDA3D202.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-8B28B8BB-6935-5332-B4D3-4183FDA3D202" xml:lang="en"><title>Singly
Linked Lists Overview</title><shortdesc>A singly linked list is an ordered, non-indexed list of elements,
that can be traversed only from start to end. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-BEE97C73-8E2A-40F3-BBA0-4423B40346C4"><title>Purpose</title> <p>This
section of documentation covers the APi that manipulates and manages a singly-linked
list: an ordered, non-indexed list of elements, that can be traversed only
from start to end. </p> <p>The API contains all the necessary functionality
for singly-linked lists. It is possible to derive from its classes to add
additional features.</p> </section>
<section id="GUID-D998BA4E-B526-4B4A-A5C4-84E95D4ED456"><title>Description</title> <p> The
API has three key concepts: list header (TSglQue), link class (TSglQueLink),
and iterator class (TSglQueIter). </p> <p><b>General properties</b> </p><p>Note
the following properties of singly-linked lists:</p> <ul>
<li id="GUID-27F8B3DB-DB3B-5BBA-BBA9-170A0851E5F8"><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-3174EA23-FD0E-5C1A-8C9C-655814238EBB"><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 <xref href="GUID-2364CAB0-E19E-5EBB-837F-F6484642C2E4.dita">list
header</xref> supplies the behaviour for managing a singly-linked list of
objects. </p> <p>The list header interface is provided by <xref href="GUID-40BA1263-BE07-3C7F-955E-0BBC632E7C58.dita"><apiname>TSglQue</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 singly-linked list, an object must contain an instance of the<xref href="GUID-07045409-4714-5800-89EF-73590D4F0F37.dita">link</xref> class
as a data member.</p> <p>The link class interface is provided by <xref href="GUID-463970A1-7F84-3916-9236-1FF92F6B85BA.dita"><apiname>TSglQueLink</apiname></xref>.</p> <p><b>Iterator
class </b> </p> <p>The <xref href="GUID-82C53275-6F7C-5B3D-9A07-FA4801D42403.dita">iterator</xref> class
supplies the behaviour for moving through the elements of a list. </p> <p>The
iterator class interface is provided by <xref href="GUID-0A865633-5038-3320-A472-A2EE18F04FBE.dita"><apiname>TSglQueIter</apiname></xref>.</p> </section>
<section id="GUID-B7B5EDB5-1688-4745-AA23-975EB42A246D"><title>See also</title> <p><xref href="GUID-B1BDF68C-F989-56BD-AED4-727595D7355C.dita">Doubly Linked Lists Overview</xref> </p> </section>
</conbody></concept>