Symbian3/SDK/Source/GUID-0EECEF02-EC6A-53D5-8B27-C0732DA0160A.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-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>