Symbian3/PDK/Source/GUID-0EECEF02-EC6A-53D5-8B27-C0732DA0160A.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-0EECEF02-EC6A-53D5-8B27-C0732DA0160A" xml:lang="en"><title>How to
       
    13 replace a C++ array with a wrapper</title><shortdesc>This document shows briefly how to replace a C++ array with a Symbian
       
    14 platform object.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <p>C++ arrays can always be replaced with a <codeph>TFixedArray&lt;class T,TInt
       
    16 S&gt;</codeph>. For example:</p>
       
    17 <codeblock id="GUID-5DFFA9D5-C18B-5BF9-B3A4-77B7ABB4CD1B" xml:space="preserve">TChar iSeparators[EMaxSeparators];
       
    18 CCoeControl* iControls[ENumControls];</codeblock>
       
    19 <p>becomes:</p>
       
    20 <codeblock id="GUID-388DFDE7-4E2F-5E69-8F12-48A337B1A206" xml:space="preserve">TFixedArray&lt;TChar,EMaxSeparators&gt; iSeparators;
       
    21 TFixedArray&lt;CCoeControl*,ENumControls&gt; iControls;</codeblock>
       
    22 <p>The contained class <i>must</i> have a default constructor. The array can
       
    23 also be initialised from a C++ array (using a bitwise copy).</p>
       
    24 </conbody></concept>