diff -r 51a74ef9ed63 -r ae94777fff8f Symbian3/SDK/Source/GUID-535954FD-2501-5C80-AD86-AC73A86B18B5.dita --- a/Symbian3/SDK/Source/GUID-535954FD-2501-5C80-AD86-AC73A86B18B5.dita Wed Mar 31 11:11:55 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-535954FD-2501-5C80-AD86-AC73A86B18B5.dita Fri Jun 11 12:39:03 2010 +0100 @@ -1,29 +1,29 @@ - - - - - -Internalising a Swizzle

Internalising a Swizzle from a stream has assignment semantics.

The process of internalisation assumes that the current position within the stream contains the external representation of a stream ID. The stream which corresponds to this ID contains the external representation of some object.

The result is a Swizzle which represents the object by stream ID.

The following code fragments illustrate the process.

iB is a CClassB type component of a class CClassABC, and is represented by a Swizzle. The data member is defined as:

class CCClassABC : public CBase - { - ... - TSwizzle<CClassB> iB; - ... - } -

The example assumes that the stream ID of the swizzled object has been externalised as in Externalizing a Swizzle.

CClassB's RestoreL() and InternalizeL() functions are implemented as:

void CClassABC::RestoreL() - { - RStoreReadStream stream; - stream.OpenLC(iStore,iId); - InternalizeL(stream); - CleanupStack::PopAndDestroy(); - } void CClassABC::InternalizeL(RReadStream& aStream) - { - ... - aStream >> iB; // internalises Swizzle from stream - ... - }

Here, iId is the stream ID containing CClassABC data.

\ No newline at end of file + + + + + +Internalising a Swizzle

Internalising a Swizzle from a stream has assignment semantics.

The process of internalisation assumes that the current position within the stream contains the external representation of a stream ID. The stream which corresponds to this ID contains the external representation of some object.

The result is a Swizzle which represents the object by stream ID.

The following code fragments illustrate the process.

iB is a CClassB type component of a class CClassABC, and is represented by a Swizzle. The data member is defined as:

class CCClassABC : public CBase + { + ... + TSwizzle<CClassB> iB; + ... + } +

The example assumes that the stream ID of the swizzled object has been externalised as in Externalizing a Swizzle.

CClassB's RestoreL() and InternalizeL() functions are implemented as:

void CClassABC::RestoreL() + { + RStoreReadStream stream; + stream.OpenLC(iStore,iId); + InternalizeL(stream); + CleanupStack::PopAndDestroy(); + } void CClassABC::InternalizeL(RReadStream& aStream) + { + ... + aStream >> iB; // internalises Swizzle from stream + ... + }

Here, iId is the stream ID containing CClassABC data.

\ No newline at end of file