Symbian3/SDK/Source/GUID-7CE86E8C-0187-5679-B87D-71ABDE479048.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     6
<!-- Initial Contributors:
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     7
    Nokia Corporation - initial contribution.
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     8
Contributors: 
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     9
-->
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    10
<!DOCTYPE concept
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    12
<concept xml:lang="en" id="GUID-7CE86E8C-0187-5679-B87D-71ABDE479048"><title>Externalising and internalising descriptors</title><prolog><metadata><keywords/></metadata></prolog><conbody><section><title>Externalising</title> <p>Descriptors can be externalised in one of two ways:</p> <ul><li id="GUID-184B3A20-23C7-5F6C-80B0-B8902CC56DE8"><p>using the <codeph>WriteL()</codeph> member functions of the <codeph>RWriteStream</codeph> class.</p> </li> <li id="GUID-8593FABC-5C26-5155-8181-A9614126D678"><p>using the templated stream <codeph>operator&lt;&lt;</codeph> </p> </li> </ul> <p>The <codeph>WriteL()</codeph> member functions of <codeph>RWriteStream</codeph> write only the <i>content</i> of a descriptor to the stream; they do not write any length information.</p> <p>The <codeph>operator&lt;&lt;</codeph> is implemented by the Store framework to write <i>both</i> the length of the descriptor content and the content itself to the stream.</p> <p>Use of the <codeph>operator&lt;&lt;</codeph> is preferred because descriptors can then be internalised using either the corresponding <codeph>operator&gt;&gt;</codeph> or the variants of <codeph>HBufC::NewL()</codeph> or <codeph>HBufC::NewLC()</codeph> that take a read stream.</p> </section> <section><title>Internalising</title> <p>Descriptors can be internalised in one of three ways:</p> <ul><li id="GUID-62935D77-6E8A-572C-AD28-94F1287DBD59"><p>using the <codeph>ReadL()</codeph> member functions of the <codeph>RReadStream</codeph> class.</p> </li> <li id="GUID-4B78612E-1338-5205-95BC-757EB0CD0C00"><p>using the templated stream <codeph>operator&gt;&gt;</codeph> </p> </li> <li id="GUID-02D55084-3194-54E2-BCD7-5609819BCD91"><p>using the variants of <codeph>HBufC::NewL()</codeph> or <codeph>HBufC::NewLC()</codeph> that take a read stream.</p> </li> </ul> <p>The <codeph>ReadL()</codeph> member functions of <codeph>RReadStream</codeph> assume that the stream contains only the content of a descriptor.</p> <p>Note that the specific variant, <codeph>ReadL(TDes&amp; aDes)</codeph>, assumes that the length of data to be read from the stream is the same as the maximum length of the target descriptor.</p> <p>The templated stream <codeph>operator&gt;&gt;</codeph> is implemented by the Store framework to read both the length of the descriptor content and the content itself and assumes that the descriptor was originally externalised using the templated <codeph>operator&lt;&lt;</codeph>.</p> <p>The <codeph>NewLC()</codeph> and <codeph>NewL()</codeph> member functions of <codeph>HBufC</codeph> heap descriptors allocate the heap descriptor before internalising from the stream and also assume that the descriptor was originally externalised using the <codeph>operator&lt;&lt;</codeph>.</p> </section> </conbody></concept>