Using TRefByValue<class T> Class

This document describes how to use the TRefByValue<class T> class.

Functions which take a variable number of arguments, such as TDes8::Format() , always take the first parameter as a value reference.

For example, the function TDes8::Format() is prototyped as:

      
       
      
      void Format(TRefByValue<const TDesC8> aFmt,...);
     

The first argument is a value reference for a const TDesC8 type. Just pass a parameter of this type or a parameter that can be converted to that type.

      
       
      
      _LIT(KFormat1,"%b %c %d %o %u %x");
...
tgt.Format(KFormat1,65,65,65,65,65,65);
...