Key type

This document describes the types of keys available.

Keys can be one of three types, selected by choosing the appropriate constructor:

  • Descriptor type

  • Text type

  • Numeric type

Descriptor type

The key is defined to be a descriptor, i.e. an object derived from TDesC. In practice, a descriptor key within an array element is one of the types: TPtrC, TPtr, TBufC or TBuf (but not an HBufC).

For a Unicode build, they are defined as TDesc16, TPtrC16, TPtr16, TBufC16 and TBuf16 respectively, while for a non-Unicode build, they are defined as TDesc8 TPtrC8, TPtr8, TBufC8 and TBuf8 respectively.

Text type

The key is defined to be of type TText. For a Unicode build, TText is defined as TText16 while for a non-Unicode build, it is defined as TText8.

Numeric type

The key is defined to be of type: TInt, TInt8, TInt16, TInt32, TInt64, TUint, TUint8, TUint16 or TUint32.