diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-C1BCBA03-4E64-5188-8D33-25B4121C1582.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-C1BCBA03-4E64-5188-8D33-25B4121C1582.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,21 @@ + + + + + +Use of the Internalize class

The implementation of the family of operators operator>>() calls the internal Symbian OS function DoInternalizeL(). There are two variants of this function distinguished by the value of the third parameter as either Internalize::Member or Internalize::Function.

The family of operators operator>>() are implemented as follows:

template <class T> +inline RWriteStream& operator>>(RReadStream& aStream,T& anObject) + { + DoInternalizeL(anObject,aStream,Internalization(&anObject)); + return aStream; + }

The two variants of DoInternalizeL() are defined and implemented as:

template <class T> +inline void DoInternalizeL(T& anObject,RReadStream& aStream,Internalize::Member) + {anObject.InternalizeL(aStream);} template <class T> +inline void DoInternalizeL(T& anObject,RReadStream& aStream,Internalize::Function) + {InternalizeL(anObject,aStream);}

The variant called depends on the value returned from a call to the internal selector function, Internalization(). This selector function returns either Internalize::Function or Internalize::Member, depending on the type of anObject.

The internal selector function Internalization() is a convenience mechanism that allows the operator>>() to call either the InternalizeL() member function of a templated class or an InternalizeL() templated global function.

The store framework defines and implements a default selector function, prototyped as:

Internalize::Member Internalization(const TAny*)

By default, a call to Internalization() passing a parameter of general class type, is resolved at compile time into a call to this variant, and the return type is Internalize::Member. The store framework also defines and implements a number of other variants that take more specific argument types; for example, as part of its implementation of operator>>() for descriptors, the framework defines and implements:

Internalize::Function Internalization(const TDesC8*)
\ No newline at end of file