Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Using TDes


Usage in a function interface

Interfaces which take narrow or wide (Unicode) text, depending on the build variant, use descriptors in the specification of that interface.

An interface which needs to access and modify either narrow text or wide (Unicode) text, depending on the build variant, uses a TDes as the argument type. All build independent concrete descriptors are derived from TDes 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(TDes& anArg);

The use of TDes means that data can be accessed and modified through the descriptor.

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

See also