diff -r 80ef3a206772 -r 48780e181b38 Symbian3/SDK/Source/GUID-074F3499-54FE-58BC-A0F4-D8EA632AF76B.dita --- a/Symbian3/SDK/Source/GUID-074F3499-54FE-58BC-A0F4-D8EA632AF76B.dita Fri Jul 16 17:23:46 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-074F3499-54FE-58BC-A0F4-D8EA632AF76B.dita Tue Jul 20 12:00:49 2010 +0100 @@ -9,7 +9,7 @@ --> -Externalising a Swizzle

Typically, externalizing a Swizzle is a two stage process which involves:

For example, given a container type object, CClassABC, with a data member TSwizzle<CClassB> iB representing a CClassB object in memory, the diagram below illustrates the result of storing the container object.

The following code fragments illustrates 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 +Externalising a Swizzle

Typically, externalizing a Swizzle is a two stage process which involves:

  • externalizing the in-memory object which the Swizzle represents, to its own stream

  • externalizing the resulting stream ID.

For example, given a container type object, CClassABC, with a data member TSwizzle<CClassB> iB representing a CClassB object in memory, the diagram below illustrates the result of storing the container object.

The following code fragments illustrates 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; @@ -45,4 +45,4 @@ aStream << iB ... } -

At this point, the Swizzle still represents the CClassB object as a pointer, and the object itself is still in memory.

The mechanism underlying the implementation of the stream operator<<, assumes that the stream ID associated with the Swizzle has been placed in the store map. It also assumes that the RStoreWriteStream object has been constructed, specifying the store map as an externalizer.

The end result of the operation aStream << iB;, is to externalise, to the stream, the stream ID associated with the Swizzle iB. The following diagram shows this:

\ No newline at end of file +

At this point, the Swizzle still represents the CClassB object as a pointer, and the object itself is still in memory.

The mechanism underlying the implementation of the stream operator<<, assumes that the stream ID associated with the Swizzle has been placed in the store map. It also assumes that the RStoreWriteStream object has been constructed, specifying the store map as an externalizer.

The end result of the operation aStream << iB;, is to externalise, to the stream, the stream ID associated with the Swizzle iB. The following diagram shows this:

\ No newline at end of file