7 Nokia Corporation - initial contribution. |
7 Nokia Corporation - initial contribution. |
8 Contributors: |
8 Contributors: |
9 --> |
9 --> |
10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept id="GUID-93AB9273-08A5-52CD-AFF7-8B92D72067BF" xml:lang="en"><title>Using |
12 <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) |
13 TDes</title><shortdesc>Use TDes for interfaces which take narrow or wide (Unicode) text, |
13 text, depending on the build variant.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
14 depending on the build variant.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
14 <section id="GUID-3B3CC723-0555-5FCD-8783-F1467BB1191C"><title>Usage |
15 <section id="GUID-3B3CC723-0555-5FCD-8783-F1467BB1191C"><title>Usage in a |
15 in a function interface</title> <p>An interface which needs to access |
16 function interface</title> <p>An interface which needs to access and modify |
16 and modify either narrow text or wide (Unicode) text, depending on |
17 either narrow text or wide (Unicode) text, depending on the build variant, |
17 the build variant, uses a <xref href="GUID-49D4E917-57EA-39AE-8941-144AA8AC2584.dita"><apiname>TDes</apiname></xref> as the argument |
18 uses a <xref href="GUID-49D4E917-57EA-39AE-8941-144AA8AC2584.dita"><apiname>TDes</apiname></xref> as the argument type. All build independent |
18 type. All build independent concrete descriptors are derived from <codeph>TDes</codeph> which means that the interface can accept any build |
19 concrete descriptors are derived from <codeph>TDes</codeph> which means that |
19 independent descriptor.</p> <p>The following code fragment shows the |
20 the interface can accept any build independent descriptor.</p> <p>The following |
20 most common function prototype pattern.</p> <codeblock id="GUID-87812092-5582-51F4-B67B-9A2F503C0A26" xml:space="preserve">void ClassX::foo(TDes& anArg);</codeblock> <p>The use of <codeph>TDes</codeph> means that data can be accessed |
21 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& anArg);</codeblock> <p>The |
21 and modified through the descriptor.</p> <p>If the interface is to |
22 use of <codeph>TDes</codeph> means that data can be accessed and modified |
22 handle explicit 8 bit or explicit 16 bit data, regardless of the build |
23 through the descriptor.</p> <p>If the interface is to handle explicit 8 bit |
23 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> |
24 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> |
|
25 </conbody><related-links> |
24 </conbody><related-links> |
26 <link> |
25 <link href="GUID-0B6C97D3-0E2D-5BBE-B8AC-985902715160.dita"> |
27 <desc><xref href="GUID-3D73DD8F-8D23-5D47-A4F7-3673C993EF8F.dita">Using class TDes8</xref></desc> |
26 <linktext>Using Class TDes16</linktext></link> |
28 </link> |
27 <link href="GUID-3D73DD8F-8D23-5D47-A4F7-3673C993EF8F.dita"><linktext>Using |
29 <link href="GUID-0B6C97D3-0E2D-5BBE-B8AC-985902715160.dita"><linktext>Using Class |
28 class TDes8</linktext></link> |
30 TDes16</linktext></link> |
|
31 </related-links></concept> |
29 </related-links></concept> |