62 consist of non-modifiable pointer descriptors. These pointer descriptors represent |
62 consist of non-modifiable pointer descriptors. These pointer descriptors represent |
63 the data of the descriptors added to the array. The following diagram illustrates |
63 the data of the descriptors added to the array. The following diagram illustrates |
64 this. The diagram is also true for <xref href="GUID-6DF731E4-5691-31C4-BEE0-03A3873F15EC.dita"><apiname>TPtrC8</apiname></xref> and <xref href="GUID-8FE95467-D48B-3E61-9028-29C0F15F567E.dita"><apiname>TPtrC16</apiname></xref>. </p> <fig id="GUID-AB7B77C5-31BC-5DD0-B1FC-D02436E18D14"> |
64 this. The diagram is also true for <xref href="GUID-6DF731E4-5691-31C4-BEE0-03A3873F15EC.dita"><apiname>TPtrC8</apiname></xref> and <xref href="GUID-8FE95467-D48B-3E61-9028-29C0F15F567E.dita"><apiname>TPtrC16</apiname></xref>. </p> <fig id="GUID-AB7B77C5-31BC-5DD0-B1FC-D02436E18D14"> |
65 <title> Array of non-modifiable pointer descriptor elements |
65 <title> Array of non-modifiable pointer descriptor elements |
66 </title> |
66 </title> |
67 <image href="GUID-77EC9F20-32F4-5A1D-B183-75838EBA30B1_d0e176330_href.png" placement="inline"/> |
67 <image href="GUID-77EC9F20-32F4-5A1D-B183-75838EBA30B1_d0e181355_href.png" placement="inline"/> |
68 </fig> <p> <b>NOTE:</b> <xref href="GUID-B24BD746-98D1-3837-B834-5C12D4D516FC.dita"><apiname>delete()</apiname></xref> and <xref href="GUID-FA50BA77-E578-3652-B1FB-AD2D0523CC17.dita"><apiname>reset()</apiname></xref> removes |
68 </fig> <p> <b>NOTE:</b> <xref href="GUID-B24BD746-98D1-3837-B834-5C12D4D516FC.dita"><apiname>delete()</apiname></xref> and <xref href="GUID-FA50BA77-E578-3652-B1FB-AD2D0523CC17.dita"><apiname>reset()</apiname></xref> removes |
69 the non-modifiable pointer descriptors from the array but does <b>not</b> delete |
69 the non-modifiable pointer descriptors from the array but does <b>not</b> delete |
70 the data or descriptors that they point to. </p> </section> |
70 the data or descriptors that they point to. </p> </section> |
71 <section><title>Array of pointer elements</title> <p>The elements of this |
71 <section><title>Array of pointer elements</title> <p>The elements of this |
72 type of array consist of <b>pointers</b> to heap descriptors. </p> <p>When |
72 type of array consist of <b>pointers</b> to heap descriptors. </p> <p>When |
73 a descriptor is added to this type of array, a heap descriptor is allocated, |
73 a descriptor is added to this type of array, a heap descriptor is allocated, |
74 taking its data from the supplied descriptor. The pointer to this heap descriptor |
74 taking its data from the supplied descriptor. The pointer to this heap descriptor |
75 is added as an array element. The following diagram illustrates this. The |
75 is added as an array element. The following diagram illustrates this. The |
76 diagram is also true for <xref href="GUID-2A528453-0279-3E47-838C-F8A8D29B88F1.dita"><apiname>HBufC8</apiname></xref> and <xref href="GUID-3D3D9CD7-C8FD-3F81-9CC5-1A71D4F9751E.dita"><apiname>HBufC16</apiname></xref>. </p> <fig id="GUID-D6B993E5-AF6B-5AD2-A30F-834C6815EFEF"> |
76 diagram is also true for <xref href="GUID-2A528453-0279-3E47-838C-F8A8D29B88F1.dita"><apiname>HBufC8</apiname></xref> and <xref href="GUID-3D3D9CD7-C8FD-3F81-9CC5-1A71D4F9751E.dita"><apiname>HBufC16</apiname></xref>. </p> <fig id="GUID-D6B993E5-AF6B-5AD2-A30F-834C6815EFEF"> |
77 <title> Array of pointer elements </title> |
77 <title> Array of pointer elements </title> |
78 <image href="GUID-3853600F-A096-53A6-8E68-4815ED85FD05_d0e176377_href.png" placement="inline"/> |
78 <image href="GUID-3853600F-A096-53A6-8E68-4815ED85FD05_d0e181402_href.png" placement="inline"/> |
79 </fig> <p>There are two implementations of the array, one using a flat buffer |
79 </fig> <p>There are two implementations of the array, one using a flat buffer |
80 and the other using a segmented buffer. </p> <p>The flat buffer implementation |
80 and the other using a segmented buffer. </p> <p>The flat buffer implementation |
81 is supplied in two variants: </p> <ul> |
81 is supplied in two variants: </p> <ul> |
82 <li id="GUID-8E031CC3-AC57-5882-A96A-40F041543714"><p>the 16-bit variant implemented |
82 <li id="GUID-8E031CC3-AC57-5882-A96A-40F041543714"><p>the 16-bit variant implemented |
83 using a flat buffer, a <xref href="GUID-0DF28074-4B76-3767-9FD8-EADF36E3EA14.dita"><apiname>CDesC16ArrayFlat</apiname></xref>, constructed from <xref href="GUID-440FF2B4-353B-3097-A2BA-5887D10B8B23.dita"><apiname>TDesC16</apiname></xref> types. </p> </li> |
83 using a flat buffer, a <xref href="GUID-0DF28074-4B76-3767-9FD8-EADF36E3EA14.dita"><apiname>CDesC16ArrayFlat</apiname></xref>, constructed from <xref href="GUID-440FF2B4-353B-3097-A2BA-5887D10B8B23.dita"><apiname>TDesC16</apiname></xref> types. </p> </li> |
118 <section><title>Relationship between descriptor array classes</title> <p>The |
118 <section><title>Relationship between descriptor array classes</title> <p>The |
119 following diagram illustrates the relationship between the descriptor array |
119 following diagram illustrates the relationship between the descriptor array |
120 concrete classes and the base classes which support them. </p> <fig id="GUID-43444E8B-F2F5-539B-BA9D-EDF9B832DFD9"> |
120 concrete classes and the base classes which support them. </p> <fig id="GUID-43444E8B-F2F5-539B-BA9D-EDF9B832DFD9"> |
121 <title> The class relationships for CDesCArrayFlat & CDesCArraySeg |
121 <title> The class relationships for CDesCArrayFlat & CDesCArraySeg |
122 </title> |
122 </title> |
123 <image href="GUID-B3166752-9B99-5669-8AB4-078164144AA1_d0e176531_href.png" placement="inline"/> |
123 <image href="GUID-B3166752-9B99-5669-8AB4-078164144AA1_d0e181556_href.png" placement="inline"/> |
124 </fig> <p> </p> <fig id="GUID-3BD4A73F-1E09-515A-9833-6D9592A98E97"> |
124 </fig> <p> </p> <fig id="GUID-3BD4A73F-1E09-515A-9833-6D9592A98E97"> |
125 <title> The class relationships for CPtrCArray </title> |
125 <title> The class relationships for CPtrCArray </title> |
126 <image href="GUID-93678518-1FBD-521D-807A-63DA2E33551F_d0e176542_href.png" placement="inline"/> |
126 <image href="GUID-93678518-1FBD-521D-807A-63DA2E33551F_d0e181567_href.png" placement="inline"/> |
127 </fig> </section> |
127 </fig> </section> |
128 <section id="GUID-9948A6D4-19A2-58A2-B2F1-73EC577E1B0B"><title>Copying Descriptor |
128 <section id="GUID-9948A6D4-19A2-58A2-B2F1-73EC577E1B0B"><title>Copying Descriptor |
129 Arrays </title> <p>An array of non-modifiable pointer descriptors, a <xref href="GUID-FC3F3E4A-C86C-3DDB-B851-538BF20D5B27.dita"><apiname>CPtrCArray</apiname></xref> type, |
129 Arrays </title> <p>An array of non-modifiable pointer descriptors, a <xref href="GUID-FC3F3E4A-C86C-3DDB-B851-538BF20D5B27.dita"><apiname>CPtrCArray</apiname></xref> type, |
130 provides a function which can copy elements from any descriptor array. </p> <p>The |
130 provides a function which can copy elements from any descriptor array. </p> <p>The |
131 source descriptor array must be one which satisfies the protocol defined by |
131 source descriptor array must be one which satisfies the protocol defined by |
135 descriptor array,that is, whether it is a <xref href="GUID-FC3F3E4A-C86C-3DDB-B851-538BF20D5B27.dita"><apiname>CPtrCArray</apiname></xref> type |
135 descriptor array,that is, whether it is a <xref href="GUID-FC3F3E4A-C86C-3DDB-B851-538BF20D5B27.dita"><apiname>CPtrCArray</apiname></xref> type |
136 or a <xref href="GUID-1ABD9C74-01F0-3144-9E5C-550E83F4D424.dita"><apiname>CDesCArray</apiname></xref> type. However, the following diagram shows |
136 or a <xref href="GUID-1ABD9C74-01F0-3144-9E5C-550E83F4D424.dita"><apiname>CDesCArray</apiname></xref> type. However, the following diagram shows |
137 the effect of the copy operation based on the concrete type of the source |
137 the effect of the copy operation based on the concrete type of the source |
138 array. </p> <fig id="GUID-E320FF9E-CBCA-597C-AE3B-8480A0829EF7"> |
138 array. </p> <fig id="GUID-E320FF9E-CBCA-597C-AE3B-8480A0829EF7"> |
139 <title> Copying descriptor arrays </title> |
139 <title> Copying descriptor arrays </title> |
140 <image href="GUID-6FFEC753-4006-559C-B8E9-14940CFCD012_d0e176588_href.png" placement="inline"/> |
140 <image href="GUID-6FFEC753-4006-559C-B8E9-14940CFCD012_d0e181613_href.png" placement="inline"/> |
141 </fig> </section> |
141 </fig> </section> |
142 <section id="GUID-009C368B-80E3-523B-BC4A-12BB90244CE1"><title>8-Bit Variant, |
142 <section id="GUID-009C368B-80E3-523B-BC4A-12BB90244CE1"><title>8-Bit Variant, |
143 16-Bit Variant and Build Independence</title> <p>Descriptor arrays are supplied |
143 16-Bit Variant and Build Independence</title> <p>Descriptor arrays are supplied |
144 in two variants: </p> <ul> |
144 in two variants: </p> <ul> |
145 <li id="GUID-7819B939-C7C0-5117-812D-B2D05D7650D4"><p>the 16-bit variant for |
145 <li id="GUID-7819B939-C7C0-5117-812D-B2D05D7650D4"><p>the 16-bit variant for |