Symbian3/SDK/Source/GUID-5CF5B8D6-C477-55D2-A036-2C090FA41D33.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.

<?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-5CF5B8D6-C477-55D2-A036-2C090FA41D33"><title>The write stream interface</title><prolog><metadata><keywords/></metadata></prolog><conbody><p><codeph>RWriteStream</codeph> is an abstract class that presents the necessary interface for externalising to a stream. When called, the <codeph>ExternalizeL()</codeph> member function of a class is passed a reference to a concrete write stream object; for example, an object constructed from a class such as <codeph>RStoreWriteStream</codeph>. This allows <codeph>ExternalizeL()</codeph> to write the object's data to any stream, regardless of that stream’s concrete implementation. </p> <p>All data types, including non-class types, can be externalised, although some can only be externalised using the templated stream <codeph>operator&lt;&lt;</codeph>.</p> <p><codeph>RWriteStream</codeph> provides support for externalizing:</p> <ul><li id="GUID-09D7AA34-DD98-5E9D-AD0B-4CC7C8D5E841"><p><codeph>TInt</codeph>, <codeph>TUint</codeph>, <codeph>TReal</codeph> and <codeph>TReal64</codeph> types.</p> </li> <li id="GUID-1A7BD64A-3FF3-569B-B60F-CCC6858EC2F9"><p>The content of a descriptor.</p> </li> <li id="GUID-9E899BB9-1B59-5907-9584-A0803735C2DF"><p>The data from an open read stream object, a <codeph>RReadStream</codeph> type.</p> </li> </ul> <p>The <codeph>WriteInt8()</codeph>, <codeph>WriteUint8()</codeph>, <codeph>WriteInt16()</codeph> and <codeph>WriteUint16()</codeph> member functions allow applications to reduce the size of the stream when <codeph>TInt</codeph> and <codeph>TUint</codeph> values are guaranteed to be containable within 8 bits and 16 bits.</p> <p>The write stream interface also allows data to be externalised from a location defined by a pointer and a length. However, this functionality is rarely used by application code.</p> <section><title>See also</title> <p><xref href="GUID-D7211372-9411-5A18-88F0-615F4983A2E0.dita">Store streams</xref> </p> </section> </conbody></concept>