diff -r 5072524fcc79 -r 80ef3a206772 Symbian3/PDK/Source/GUID-7767599C-7B77-5DD1-8E3E-7AD01EC6F6A1.dita --- a/Symbian3/PDK/Source/GUID-7767599C-7B77-5DD1-8E3E-7AD01EC6F6A1.dita Fri Jul 02 12:51:36 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-7767599C-7B77-5DD1-8E3E-7AD01EC6F6A1.dita Fri Jul 16 17:23:46 2010 +0100 @@ -29,7 +29,7 @@ aStream << iData; aStream << *iCompA; aStream << *iCompB; - }

The stream can be visualised as:

Storing components out-of-line

Storing a compound object’s component objects out-of-line means writing all of its component objects to a different stream from that to which it, itself, is written. Each component may be written to its own stream or to its own network of streams. The main advantage of this is that it allows for deferred loading of streams.

It is important to note that components are stored before the containing object.

The following code fragment defines an example class, CCompound, having two components, CComponentA and CComponentB. The components are defined as instances of the templated class TSwizzle.

CCompound class : public CBase + }

The stream can be visualised as:

Storing components out-of-line

Storing a compound object’s component objects out-of-line means writing all of its component objects to a different stream from that to which it, itself, is written. Each component may be written to its own stream or to its own network of streams. The main advantage of this is that it allows for deferred loading of streams.

It is important to note that components are stored before the containing object.

The following code fragment defines an example class, CCompound, having two components, CComponentA and CComponentB. The components are defined as instances of the templated class TSwizzle.

CCompound class : public CBase { ... TInt iDdata; @@ -47,7 +47,7 @@ map->Reset(); CleanupStack::PopAndDestroy(2); return id; - }

The StoreL() function:

This can be visualised as:

CCompound ’s components are stored to their own streams by defining and implementing a StoreComponentsL() member function; this is prototyped as:

void StoreComponentsL(CStreamStore& aStore,CStoreMap& aMap)

and implemented as:

void CCompound::StoreComponentsL(CStreamStore& aStore,CStoreMap& aMap) + }

The StoreL() function:

This can be visualised as:

CCompound ’s components are stored to their own streams by defining and implementing a StoreComponentsL() member function; this is prototyped as:

void StoreComponentsL(CStreamStore& aStore,CStoreMap& aMap)

and implemented as:

void CCompound::StoreComponentsL(CStreamStore& aStore,CStoreMap& aMap) { TStreamId id;