This document is an overview of the basic types.
Provides implementation-independent versions of the C++ built-in types, defines the Symbian platform standard base class for all heap-allocated classes, and provides some useful yet simple global functions.
You should avoid using the C++ built-in types directly: always use the Symbian platform types instead.
The API defines classes and typedefs for integer, text, Boolean, and floating point types. Additionally, a utility class to help with reference arguments in variable argument functions is provided.
Heap-allocated classes base
Symbian platform requires that all classes that own dynamically allocated resources derive from a standard base class, CBase . Such classes by conventions have a C prefix to their name, and so are referred to as C classes. C classes, and their associated allocation and cleanup idioms, are fundamental to Symbian platform.
TInt is the natural machine word integer and should be used in all general contexts where integer arithmetic is desired.
TInt32 , TInt16 and TInt8 map onto C++ built-in types in most implementations. These types should only be used where the size of the integer is of first importance.
TUint is an unsigned integer of the natural machine word size. It should be used for flag and handle words, which are manipulated using bitwise and equality-comparison operations rather than arithmetic.
TUint32 , TUint16 and TUint8 are available where the specific representation width is important.
TText represents a character in the natural width for the Symbian platform build. From v5.1 onwards, this is 16 bits.
TText8 is available for build-independent 8-bit characters, and TText16 for build-independent 16-bit characters.
The TChar class wraps a character value and provides a number of utility functions to operate upon it.
TBool represents a Boolean whose value may be true or false. It is implemented as a natural machine-word integer.
TReal is a 64-bit double-precision type, used as the argument type for all math functions, and the default type of floating-point literals.
TReal64 and TReal32 are available when the precise size is important.
Value reference type
The value reference type is a utility that is provided to overcome problems with specifying a C++ reference argument before the ellipsis argument in variable argument functions.
The value reference type is provided by TRefByValue <T>.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.