Symbian3/SDK/Source/GUID-B71F0B0C-CFEB-583F-841D-07340DD6B9CE.dita
changeset 0 89d6a7a84779
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     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-B71F0B0C-CFEB-583F-841D-07340DD6B9CE" xml:lang="en"><title>Using
       
    13 TDes8Overflow</title><shortdesc>Use TDes8Overflow to handle overflow issues when calling the<apiname>TDes8::AppendFormat()</apiname> function.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>The <codeph>Overflow()</codeph> member function of the overflow handler, <xref href="GUID-6A13E649-D15A-3BD7-B5C2-4DC23211F276.dita"><apiname>TDes8Overflow</apiname></xref>,
       
    15 can be defined and implemented to handle a potential descriptor overflow resulting
       
    16 from a call to <xref href="GUID-445B19E5-E2EE-32E2-8D6C-C7D6A9B3C507.dita#GUID-445B19E5-E2EE-32E2-8D6C-C7D6A9B3C507/GUID-E8BE9DD1-2D96-3E8E-943A-CD2ECFD78333"><apiname>TDes8::AppendFormat()</apiname></xref>.</p>
       
    17 <p>There are many actions that the overflow function can perform but some
       
    18 possibilities are:</p>
       
    19 <ul>
       
    20 <li id="GUID-0543F1D9-4DAA-5433-BF08-55CF7DB7D690"><p>just return - in effect,
       
    21 this suppresses the panic caused by the overflow.</p> </li>
       
    22 <li id="GUID-F8D403D7-903E-5FAC-8ADC-F2FD0EE6CA6B"><p>leave.</p> </li>
       
    23 <li id="GUID-B28E1AF3-F1C0-51F4-97C3-EA8CCD2CDF2D"><p>replace the entire string
       
    24 with some error indication, e.g. "Overflowed"</p> </li>
       
    25 </ul>
       
    26 <p>For more complex recovery actions, it may be easier to set a flag in the
       
    27 implementation of the <codeph>TDes8Overflow</codeph> class and check it on
       
    28 return from the call to <codeph>AppendFormat()</codeph>.</p>
       
    29 </conbody></concept>