diff -r 000000000000 -r 89d6a7a84779 Symbian3/SDK/Source/GUID-535954FD-2501-5C80-AD86-AC73A86B18B5.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-535954FD-2501-5C80-AD86-AC73A86B18B5.dita Thu Jan 21 18:18:20 2010 +0000 @@ -0,0 +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