Symbian3/SDK/Source/GUID-93AB9273-08A5-52CD-AFF7-8B92D72067BF.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
child 13 48780e181b38
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-93AB9273-08A5-52CD-AFF7-8B92D72067BF" xml:lang="en"><title>Using
TDes</title><shortdesc>Use TDes for interfaces which take narrow or wide (Unicode) text,
depending on the build variant.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-3B3CC723-0555-5FCD-8783-F1467BB1191C"><title>Usage in a
function interface</title> <p>An interface which needs to access and modify
either narrow text or wide (Unicode) text, depending on the build variant,
uses a <xref href="GUID-49D4E917-57EA-39AE-8941-144AA8AC2584.dita"><apiname>TDes</apiname></xref> as the argument type. All build independent
concrete descriptors are derived from <codeph>TDes</codeph> which means that
the interface can accept any build independent descriptor.</p> <p>The following
code fragment shows the most common function prototype pattern.</p> <codeblock id="GUID-87812092-5582-51F4-B67B-9A2F503C0A26" xml:space="preserve">void ClassX::foo(TDes&amp; anArg);</codeblock> <p>The
use of <codeph>TDes</codeph> means that data can be accessed and modified
through the descriptor.</p> <p>If the interface is to handle explicit 8 bit
or explicit 16 bit data, regardless of the build variant, then use <xref href="GUID-445B19E5-E2EE-32E2-8D6C-C7D6A9B3C507.dita"><apiname>TDes8</apiname></xref> or <xref href="GUID-C04A9A0C-DBA7-37DA-B744-54FBF3D544CD.dita"><apiname>TDes16</apiname></xref> instead.</p> </section>
</conbody><related-links>
<link>
<desc><xref href="GUID-3D73DD8F-8D23-5D47-A4F7-3673C993EF8F.dita">Using class TDes8</xref></desc>
</link>
<link href="GUID-0B6C97D3-0E2D-5BBE-B8AC-985902715160.dita"><linktext>Using Class
TDes16</linktext></link>
</related-links></concept>