Use of the Internalize class

The implementation of the family of operators operator>>() calls the internal Symbian platform 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)
    return aStream;

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

      template <class T>
inline void DoInternalizeL(T& anObject,RReadStream& aStream,Internalize::Member)
      template <class T>
inline void DoInternalizeL(T& anObject,RReadStream& aStream,Internalize::Function)

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*)