Symbian3/SDK/Source/GUID-F9FCE3FC-42E4-5E9E-9AFC-A9B02E2612A2.dita
changeset 7 51a74ef9ed63
parent 0 89d6a7a84779
equal deleted inserted replaced
6:43e37759235e 7:51a74ef9ed63
       
     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-F9FCE3FC-42E4-5E9E-9AFC-A9B02E2612A2" xml:lang="en"><title>Using
       
    13 TRefByValue&lt;class T&gt; Class</title><shortdesc>This document describes how to use the TRefByValue&lt;class T&gt;
       
    14 class.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <p>Functions which take a variable number of arguments, such as <codeph>TDes8::Format()</codeph>,
       
    16 always take the first parameter as a value reference.</p>
       
    17 <p>For example, the function <codeph>TDes8::Format()</codeph> is prototyped
       
    18 as:</p>
       
    19 <codeblock id="GUID-A3704F62-5577-585E-A6D5-052194467C7D" xml:space="preserve">void Format(TRefByValue&lt;const TDesC8&gt; aFmt,...);</codeblock>
       
    20 <p>The first argument is a value reference for a <codeph>const         TDesC8</codeph> type.
       
    21 Just pass a parameter of this type or a parameter that can be converted to
       
    22 that type. </p>
       
    23 <codeblock id="GUID-D4B86B9C-43B9-53A1-9038-A9515D6A806B" xml:space="preserve">_LIT(KFormat1,"%b %c %d %o %u %x");
       
    24 ...
       
    25 tgt.Format(KFormat1,65,65,65,65,65,65);
       
    26 ...</codeblock>
       
    27 </conbody></concept>