diff -r 51a74ef9ed63 -r ae94777fff8f Symbian3/SDK/Source/GUID-6163197B-7983-5FB7-9B92-02E490A900FB.dita --- a/Symbian3/SDK/Source/GUID-6163197B-7983-5FB7-9B92-02E490A900FB.dita Wed Mar 31 11:11:55 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-6163197B-7983-5FB7-9B92-02E490A900FB.dita Fri Jun 11 12:39:03 2010 +0100 @@ -1,45 +1,45 @@ - - - - - -How to -construct a headerThis document describes how to create a header for a doubly linked -list. -

In order to construct a header, two important pieces of information are -needed:

- -

To create a header for a doubly linked list of CMyClass elements, -defined as:

-class CMyClass : public CBase - { - ... - TDblQueLink iDlink; - ... - }; -

construct a TDblQue as follows:

-TDblQue<CMyClass> queHeader(_FOFF(CMyClass,iDlink)); -

The TDblQue class takes a class template parameter which -defines the type of object which is to form an element of the list. In this -example, objects of type CMyClass form the elements of the -list.

-

The _FOFF macro (i.e. the "field offset" macro) calculates -the offset of the component link object within the element. In this example, -the required value is the offset of the iDlink data member -from the start of CMyClass.

- - -<image href="GUID-29E7942D-A00D-5771-9782-59260965C687_d0e217648_href.png" placement="inline"/> -</fig> +<?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-6163197B-7983-5FB7-9B92-02E490A900FB" xml:lang="en"><title>How to +construct a headerThis document describes how to create a header for a doubly linked +list. +

In order to construct a header, two important pieces of information are +needed:

+
    +
  • the type of object +which forms the elements.

  • +
  • the offset of +the link object from the start of the element.

  • +
+

To create a header for a doubly linked list of CMyClass elements, +defined as:

+class CMyClass : public CBase + { + ... + TDblQueLink iDlink; + ... + }; +

construct a TDblQue as follows:

+TDblQue<CMyClass> queHeader(_FOFF(CMyClass,iDlink)); +

The TDblQue class takes a class template parameter which +defines the type of object which is to form an element of the list. In this +example, objects of type CMyClass form the elements of the +list.

+

The _FOFF macro (i.e. the "field offset" macro) calculates +the offset of the component link object within the element. In this example, +the required value is the offset of the iDlink data member +from the start of CMyClass.

+ + +<image href="GUID-29E7942D-A00D-5771-9782-59260965C687_d0e213911_href.png" placement="inline"/> +</fig> </conbody></concept> \ No newline at end of file