Symbian3/SDK/Source/GUID-0EECEF02-EC6A-53D5-8B27-C0732DA0160A.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?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-0EECEF02-EC6A-53D5-8B27-C0732DA0160A" xml:lang="en"><title>How to
replace a C++ array with a wrapper</title><shortdesc>This document shows briefly how to replace a C++ array with a Symbian
platform object.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>C++ arrays can always be replaced with a <codeph>TFixedArray&lt;class T,TInt
S&gt;</codeph>. For example:</p>
<codeblock id="GUID-5DFFA9D5-C18B-5BF9-B3A4-77B7ABB4CD1B" xml:space="preserve">TChar iSeparators[EMaxSeparators];
CCoeControl* iControls[ENumControls];</codeblock>
<p>becomes:</p>
<codeblock id="GUID-388DFDE7-4E2F-5E69-8F12-48A337B1A206" xml:space="preserve">TFixedArray&lt;TChar,EMaxSeparators&gt; iSeparators;
TFixedArray&lt;CCoeControl*,ENumControls&gt; iControls;</codeblock>
<p>The contained class <i>must</i> have a default constructor. The array can
also be initialised from a C++ array (using a bitwise copy).</p>
</conbody></concept>