diff -r 000000000000 -r 89d6a7a84779 Symbian3/SDK/Source/GUID-7830BAAB-40DD-5E55-84B5-8DCA888E68E7.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-7830BAAB-40DD-5E55-84B5-8DCA888E68E7.dita Thu Jan 21 18:18:20 2010 +0000 @@ -0,0 +1,26 @@ + + + + + +Using +TDesCUse TDesC for interfaces which take narrow or wide (Unicode) text, +depending on the build variant, but does not change the data. +
Usage in a +function interface

An interface which needs access to either narrow +text or wide (Unicode) text, depending on the build variant, but which does +not need to change that data in any way, can use a TDesC as +the argument type. All build independent concrete descriptors are derived +from TDesC which means that the interface can accept any +build independent descriptor.

The following code fragment shows the +most common function prototype pattern.

void ClassX::foo(const TDesC& anArg);

The use of TDesC ensures that the data cannot be modified +through the descriptor; const is an extra guarantee that +the data cannot be changed.

If the interface is to handle explicit +8 bit or explicit 16 bit data, regardless of the build variant, then use TDesC8 or TDesC16 instead.

+
\ No newline at end of file