--- a/Symbian3/PDK/Source/GUID-685CF352-372F-5393-97AF-1FA17DC57BA8.dita Thu Mar 11 15:24:26 2010 +0000
+++ b/Symbian3/PDK/Source/GUID-685CF352-372F-5393-97AF-1FA17DC57BA8.dita Thu Mar 11 18:02:22 2010 +0000
@@ -1,49 +1,49 @@
-<?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 xml:lang="en" id="GUID-685CF352-372F-5393-97AF-1FA17DC57BA8"><title>Constructing Descriptor Arrays</title><shortdesc>Descriptor arrays provide normal array operations for inserting, appending, deleting, and accessing elements. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody><section><title>Procedure</title> <p>Follow the steps listed below to construct descriptor arrays: </p> <ol id="GUID-4957F727-EC6C-5DFF-B970-44DD0AB5E69C"><li id="GUID-69B3273C-1552-5B9C-816D-1398BFF49A6B"><p>Construct a set of descriptors. </p> <p>The following code fragments illustrate how to construct a <xref href="GUID-29384669-FFCE-38FC-A005-61163D99401D.dita"><apiname>CDesCArrayFlat</apiname></xref> and a <xref href="GUID-FC3F3E4A-C86C-3DDB-B851-538BF20D5B27.dita"><apiname>CPtrCArray</apiname></xref>. Both array types can accept any type of descriptor as source when adding a new array element. </p> <codeblock id="GUID-AEE8ABB8-CCCE-5263-8EA4-AD2D8898F4D4" xml:space="preserve">_LIT( KText1,"abcdefg" );
-_LIT( KText2,"hijk" );
-_LIT( KText3,"lmnopqr" );
-_LIT( KText4,"stuvwxyz" );
-...
-TBufC<8> buffer1( KText1 ); // a non-modifiable buffer descriptor
-TBuf<8> buffer2( Ktext2 ); // a modifiable buffer descriptor
-...
-TPtrC ptr1( Ktext3 ); // a non-modifiable pointer descriptor
-TPtr ptr2; // a modifiable pointer descriptor
-ptr2 = buffer1.Des(); // pointing to the data in buffer1
-...
-HBufC* heapbuff = HBufC::NewL( 8 ); // a heap descriptor
-*heapbuff = KText4;</codeblock> <p> <b>Note:</b> Constructing and using a <xref href="GUID-1B44227C-6F11-3A51-BE2C-8780319C6F72.dita"><apiname>CDesCArraySeg</apiname></xref> is same as using <xref href="GUID-29384669-FFCE-38FC-A005-61163D99401D.dita"><apiname>CDesCArrayFlat</apiname></xref>. </p> </li> <li id="GUID-8A1E403F-FBA4-5A60-AAC4-7296BA7B160F"><p>Add the five descriptors to <xref href="GUID-29384669-FFCE-38FC-A005-61163D99401D.dita"><apiname>CDesCArrayFlat</apiname></xref> as shown in the following code. </p> <codeblock id="GUID-6DE21030-1887-53D8-8D04-B9DB0F69F647" xml:space="preserve">CDesCArrayFlat* descarray;
-...
-descarray = new( ELeave ) CDesCArrayFlat( 5 );
-...
-descarray->AppendL( buffer1 );
-descarray->AppendL( buffer2 );
-descarray->AppendL( ptr1 );
-descarray->AppendL( ptr2 );
-descarray->AppendL( *heapbuff );
-...
-TInt len = descarray->MdcaPoint( 2 ).Length(); // information about
- // the third element
-...</codeblock> </li> <li id="GUID-EE266B93-2899-5D35-A0BF-569694574D5C"><p>Add the five descriptors to <xref href="GUID-FC3F3E4A-C86C-3DDB-B851-538BF20D5B27.dita"><apiname>CPtrCArray</apiname></xref> as shown in the following code. </p> <codeblock id="GUID-90A51320-7B9E-5DAD-A041-77FD6B2C3A37" xml:space="preserve">CPtrCArray* ptrcarray;
-...
-ptrcarray = new( ELeave ) CPtrCArray( 5 );
-...
-ptrcarray->AppendL( buffer1 );
-ptrcarray->AppendL( buffer2 );
-ptrcarray->AppendL( ptr1 );
-ptrcarray->AppendL( ptr2 );
-ptrcarray->AppendL( *heapbuff );
-...
-TInt len = ptrcarray->MdcaPoint( 2 ).Length(); // information about
- // the third element
+<?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 xml:lang="en" id="GUID-685CF352-372F-5393-97AF-1FA17DC57BA8"><title>Constructing Descriptor Arrays</title><shortdesc>Descriptor arrays provide normal array operations for inserting, appending, deleting, and accessing elements. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody><section><title>Procedure</title> <p>Follow the steps listed below to construct descriptor arrays: </p> <ol id="GUID-4957F727-EC6C-5DFF-B970-44DD0AB5E69C"><li id="GUID-69B3273C-1552-5B9C-816D-1398BFF49A6B"><p>Construct a set of descriptors. </p> <p>The following code fragments illustrate how to construct a <xref href="GUID-29384669-FFCE-38FC-A005-61163D99401D.dita"><apiname>CDesCArrayFlat</apiname></xref> and a <xref href="GUID-FC3F3E4A-C86C-3DDB-B851-538BF20D5B27.dita"><apiname>CPtrCArray</apiname></xref>. Both array types can accept any type of descriptor as source when adding a new array element. </p> <codeblock id="GUID-AEE8ABB8-CCCE-5263-8EA4-AD2D8898F4D4" xml:space="preserve">_LIT( KText1,"abcdefg" );
+_LIT( KText2,"hijk" );
+_LIT( KText3,"lmnopqr" );
+_LIT( KText4,"stuvwxyz" );
+...
+TBufC<8> buffer1( KText1 ); // a non-modifiable buffer descriptor
+TBuf<8> buffer2( Ktext2 ); // a modifiable buffer descriptor
+...
+TPtrC ptr1( Ktext3 ); // a non-modifiable pointer descriptor
+TPtr ptr2; // a modifiable pointer descriptor
+ptr2 = buffer1.Des(); // pointing to the data in buffer1
+...
+HBufC* heapbuff = HBufC::NewL( 8 ); // a heap descriptor
+*heapbuff = KText4;</codeblock> <p> <b>Note:</b> Constructing and using a <xref href="GUID-1B44227C-6F11-3A51-BE2C-8780319C6F72.dita"><apiname>CDesCArraySeg</apiname></xref> is same as using <xref href="GUID-29384669-FFCE-38FC-A005-61163D99401D.dita"><apiname>CDesCArrayFlat</apiname></xref>. </p> </li> <li id="GUID-8A1E403F-FBA4-5A60-AAC4-7296BA7B160F"><p>Add the five descriptors to <xref href="GUID-29384669-FFCE-38FC-A005-61163D99401D.dita"><apiname>CDesCArrayFlat</apiname></xref> as shown in the following code. </p> <codeblock id="GUID-6DE21030-1887-53D8-8D04-B9DB0F69F647" xml:space="preserve">CDesCArrayFlat* descarray;
+...
+descarray = new( ELeave ) CDesCArrayFlat( 5 );
+...
+descarray->AppendL( buffer1 );
+descarray->AppendL( buffer2 );
+descarray->AppendL( ptr1 );
+descarray->AppendL( ptr2 );
+descarray->AppendL( *heapbuff );
+...
+TInt len = descarray->MdcaPoint( 2 ).Length(); // information about
+ // the third element
+...</codeblock> </li> <li id="GUID-EE266B93-2899-5D35-A0BF-569694574D5C"><p>Add the five descriptors to <xref href="GUID-FC3F3E4A-C86C-3DDB-B851-538BF20D5B27.dita"><apiname>CPtrCArray</apiname></xref> as shown in the following code. </p> <codeblock id="GUID-90A51320-7B9E-5DAD-A041-77FD6B2C3A37" xml:space="preserve">CPtrCArray* ptrcarray;
+...
+ptrcarray = new( ELeave ) CPtrCArray( 5 );
+...
+ptrcarray->AppendL( buffer1 );
+ptrcarray->AppendL( buffer2 );
+ptrcarray->AppendL( ptr1 );
+ptrcarray->AppendL( ptr2 );
+ptrcarray->AppendL( *heapbuff );
+...
+TInt len = ptrcarray->MdcaPoint( 2 ).Length(); // information about
+ // the third element
...</codeblock> </li> </ol> </section> </conbody><related-links><link href="GUID-E8266924-FA52-5171-BD73-423A46227A74.dita"><linktext>Descriptor Arrays</linktext> </link> </related-links></concept>
\ No newline at end of file