Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <e32def.h>

__MUTABLE

Interface status: deprecated

__MUTABLE

Description

[Top]


CONST_CAST

Interface status: deprecated

CONST_CAST (type, exp) (const_cast<type>(exp))

Description

Parameters

type

exp

[Top]


STATIC_CAST

Interface status: deprecated

STATIC_CAST (type, exp) (static_cast<type>(exp))

Description

Parameters

type

exp

[Top]


REINTERPRET_CAST

Interface status: deprecated

REINTERPRET_CAST (type, exp) (reinterpret_cast<type>(exp))

Description

Parameters

type

exp

[Top]


MUTABLE_CAST

Interface status: deprecated

MUTABLE_CAST (type, exp) (const_cast<type>(exp))

Description

Parameters

type

exp

[Top]


GLREF_D

Interface status: deprecated

GLREF_D extern

Description

[Top]


GLDEF_D

Interface status: deprecated

GLDEF_D

Description

[Top]


LOCAL_D

Interface status: deprecated

LOCAL_D static

Description

[Top]


GLREF_C

Interface status: deprecated

GLREF_C extern

Description

[Top]


GLDEF_C

Interface status: deprecated

GLDEF_C

Description

[Top]


LOCAL_C

Interface status: deprecated

LOCAL_C static

Description

[Top]


FOREVER

Interface status: deprecated

FOREVER for(;;)

Description

[Top]


TRUE

TRUE 1

Description

Symbolic definition for a true value.

[Top]


FALSE

FALSE 0

Description

Symbolic definition for a false value.

[Top]


NULL

NULL 0

Description

Symbolic definition for a NULL value.

[Top]


VA_START

VA_START (ap, pn) ((ap)[0]=(TInt8 *)&pn+((sizeof(pn)+sizeof(TInt)-1)&~(sizeof(TInt)-1)),(void)0)

Description

A macro used by Symbian OS code for handling a variable argument list in a function call.

Sets a pointer to point to the first of the variable arguments.

Typical usage:

Foo(CAbcdef aAbcdef,...)
   {
   VA_LIST list;
   VA_START(list, aAbcdef);
   // other code
   } 

Parameters

ap

A pointer used to hold the address of an argument in the variable argument list. After execution of the code generated by this macro, the pointer points to the first argument in the variable argument list. This symbol is usually declared as a VA_LIST type.

pn

The argument that immediately precedes the variable argument list.

[Top]


VA_ARG

VA_ARG (ap, type) ((ap)[0]+=((sizeof(type)+sizeof(TInt)-1)&~(sizeof(TInt)-1)),(*(type *)((ap)[0]-((sizeof(type)+sizeof(TInt)-1)&~(sizeof(TInt)-1)))))

Description

A macro used by Symbian OS code for handling a variable argument list in a function call.

Increments a pointer to a variable argument list to point to the next argument in the list. The current argument is assumed to be of a type defined by the second parameter to this macro.

Typical usage:

Foo(CAbcdef aAbcdef,...)
   {
   VA_LIST list;
   VA_START(list, aAbcdef);
   ...
   TInt x = VA_ARG(list,TInt);
   ...
   const TDesC *pS=VA_ARG(aList,const TDesC*);
   ... 
   etc
   } 

Parameters

ap

A pointer used to hold the address of an argument in the variable argument list. It is assumed to point to the current argument in the variable argument list. After execution of the code generated by this macro, the pointer points to the next argument in the list. This symbol is usually declared as a VA_LIST type.

type

The type of the current argument. This can be any valid type, for example, TInt, const TDesC*, etc.

[Top]


VA_END

VA_END (ap) ((ap)[0]=0,(void)0)

Description

A macro used by Symbian OS code for handling a variable argument list in a function call.

Sets a pointer to zero.

Parameters

ap

A pointer used to hold the address of an argument in the variable argument list. After execution of the code generated by this macro, the pointer is reset to 0. This symbol is usually declared as a VA_LIST type.

[Top]


_FOFF

_FOFF (c, f) (((TInt)&(((c *)0x1000)->f))-0x1000)

Description

Calculates the offset of member f within class c.

This is used in the TSglQueTSglQue and TDblQueTDblQue constructors to set the offset of the link object from the start of a list element.

Parameters

c

The name of the class.

f

The name of the member within the specified class.

See also:

[Top]


MAKE_TINT64

MAKE_TINT64 (h, l) ( (_MAKE_TINT64_ZX(h)<<32) | _MAKE_TINT64_ZX(l) )

Description

Parameters

h

l

[Top]


MAKE_TUINT64

MAKE_TUINT64 (h, l) ( (_MAKE_TUINT64_ZX(h)<<32) | _MAKE_TUINT64_ZX(l) )

Description

Parameters

h

l

[Top]


I64HIGH

I64HIGH (x) ( (TUint32)((x)>>32) )

Description

Generates code to access the high order 32 bits of a 64 bit number.

Parameters

x

[Top]


I64LOW

I64LOW (x) ( (TUint32)(x) )

Description

Generates code to access the low order 32 bits of a 64 bit number.

Parameters

x

[Top]


I64INT

I64INT (x) ( (TInt)(x) )

Description

Generates code to cast a 64 bit value as an signed integer.

Parameters

x

[Top]


I64REAL

I64REAL (x) ( (TReal)(x) )

Description

Generates code to cast a 64 bit value as a TReal type.

Parameters

x

[Top]


I64LSR

I64LSR (x, shift) ( *reinterpret_cast<TUint64*>(&(x)) >>= (shift) )

Description

Generates code to logically shift a 64 bit integer right.

Parameters

x

shift

[Top]


I64MUL10

I64MUL10 (x) ( (x) *= 10 )

Description

Generates code to multiply a 64 bit integer by 10.

Parameters

x

[Top]


I64DIVMOD

I64DIVMOD (x, divisor, remainder) ( ((remainder) = (x) % (divisor), (x) /= (divisor)) )

Description

Generates code to divide a 64 bit integer by another and find the remainder.

Parameters

x

divisor

remainder

[Top]


I64DOUBLECAST

I64DOUBLECAST (x) ( static_cast<TInt64>(x) )

Description

Generates code to cast a double to a 64 bit integer.

Parameters

x

[Top]


_L8

Interface status: deprecated Use _LIT8 instead.

_L8 (a) (TPtrC8((const TText8 *)(a)))

Description

8-bit literal.

The macro defines an explicit 8-bit constant literal which is suitable for non-Unicode literal text, regardless of the build.

Parameters

a

[Top]


_S8

_S8 (a) ((const TText8 *)a)

Description

Defines an explicit 8-bit string which is suitable when non-Unicode text is required, regardless of the build.

This is used by the deprecated literal descriptor _L8.

Parameters

a

[Top]


_LIT8

_LIT8 (name, s) const static TLitC8<sizeof(s)> name={sizeof(s)-1,s}

Description

Constructs a constant literal descriptor of type TLitC8<TInt> with the specified name and text.

The 8-bit build variant is generated for both non-Unicode and Unicode builds.

Parameters

name

The name of the C++ variable to be generated.

s

The literal text enclosed within a pair of double quotes.

[Top]


_L16

Interface status: deprecated Use _LIT16 instead.

_L16 (a) (TPtrC16((const TText16 *)L ## a))

Description

16-bit literal.

The macro defines an explicit 16-bit constant literal which is suitable for Unicode literal text, regardless of the build.

Parameters

a

[Top]


_S16

_S16 (a) ((const TText16 *)L ## a)

Description

Defines an explicit 16-bit string which is suitable when Unicode text is required, regardless of the build.

This is used by the deprecated literal descriptor _L16.

Parameters

a

[Top]


_LIT16

_LIT16 (name, s) const static TLitC16<sizeof(L##s)/2> name={sizeof(L##s)/2-1,L##s}

Description

Constructs a constant literal descriptor of type TLitC16<TInt> with the specified name and text.

The 16-bit build variant is generated for both non-Unicode and Unicode builds.

Parameters

name

The name of the C++ variable to be generated.

s

The literal text enclosed within a pair of double quotes.

[Top]


_L

Interface status: deprecated Use _LIT instead.

_L (a) (TPtrC((const TText *)L ## a))

Description

Build independent literal.

The macro defines either an 8-bit constant literal (for non-Unicode text), or a 16-bit constant literal (for Unicode text) depending on the build.

Parameters

a

[Top]


_S

_S (a) ((const TText *)L ## a)

Description

Defines either an 8-bit string (for non-Unicode text), or a 16-bit string (for Unicode text) depending on the build.

This is used by the deprecated build independent literal _L.

Parameters

a

[Top]


_LIT

_LIT (name, s) const static TLitC<sizeof(L##s)/2> name={sizeof(L##s)/2-1,L##s}

Description

Constructs a build independent constant literal descriptor of type TLitC<TInt> with the specified name and text.

An 8-bit build variant is generated for a non-Unicode build; A 16-bit build variant is generated for a Unicode build.

Parameters

name

The name of the C++ variable to be generated.

s

The literal text enclosed within a pair of double quotes.

[Top]


__ASSERT_ALWAYS

__ASSERT_ALWAYS (c, p) (void)((c)||(p,0))

Description

Asserts that a condition is true.

Code is generated for all builds.

This macro is used as a C++ statement to assert the truth of some condition, and to take appropriate action if the condition is false. Unlike __ASSERT_DEBUG it is defined in both release and debug builds.

The most common use for this macro is to check that the external environment of a function or class is behaving as expected; for example, that parameters passed to a function are credible, or that called functions are behaving as expected; the macro is commonly placed at the beginning of a function.

The effect of the macro is to generate code which tests the conditional expression c; if the expression is false, then function p is called. In the majority of cases, the function p is one that raises a panic.

Note that the macro definition is, in effect, equivalent to:

if !(c)p;

Parameters

c

a conditional expression which results in true or false.

p

a function which is called if the conditional expression c is false.

[Top]


__UHEAP_MARK

__UHEAP_MARK

Description

Marks the start of checking the current thread's heap.

This macro is defined only for debug builds.

This macro must be matched by a corresponding call to __UHEAP_MARKEND or __UHEAP_MARKENDC.

Calls to this macro can be nested but each call must be matched by corresponding call to __UHEAP_MARKEND or __UHEAP_MARKENDC.

See also:

[Top]


__UHEAP_CHECK

__UHEAP_CHECK (aCount)

Description

Checks that the number of allocated cells at the current nested level on the current thread's heap is the same as the specified value.

This macro is defined only for debug builds.

The macro also takes the name of the file containing this source code statement and the line number of this source code statement; they are displayed as part of the panic category, if the checks fail.

The macro assumes that:

1. the heap being checked is a user heap

2. checking is being done for the number of allocated cells at the current nested level; i.e. that aCountAll is set to false

3. the line number is the line number of this source code statement.

4. the file name is the full path name of the file containing this source statement

Parameters

aCount

The number of heap cells expected to be allocated at the current nest level.

See also:

[Top]


__UHEAP_CHECKALL

__UHEAP_CHECKALL (aCount)

Description

Checks that the total number of allocated cells on the current thread's heap is the same as the specified value.

This macro is defined only for debug builds.

The macro also takes the name of the file containing this source code statement and the line number of this source code statement; they are displayed as part of the panic category, if the checks fail.

Parameters

aCount

The total number of heap cells expected to be allocated.

See also:

[Top]


__UHEAP_MARKEND

__UHEAP_MARKEND

Description

Marks the end of checking the current thread's heap.

The macro expects zero heap cells to remain allocated at the current nest level. This macro is defined only for debug builds.

This macro must match an earlier call to __UHEAP_MARK.

See also:

[Top]


__UHEAP_MARKENDC

__UHEAP_MARKENDC (aCount)

Description

Marks the end of checking the current thread's heap.

The macro expects aCount heap cells to remain allocated at the current nest level.

This macro must match an earlier call to __UHEAP_MARK.

Parameters

aCount

The number of heap cells expected to remain allocated at the current nest level.

See also:

[Top]


__UHEAP_FAILNEXT

__UHEAP_FAILNEXT (aCount)

Description

Simulates heap allocation failure for the current thread's heap.

The failure occurs on the next call to new or any of the functions which allocate memory from the heap. This macro is defined only for debug builds.

Parameters

aCount

Determines when the allocation will fail. Heap allocation fails on attempt number aCount - later allocations will succeed. For example, if aCount is 3, then heap allocation fails on the 3rd attempt, but all subsequent allocations succeed.

See also:

[Top]


__UHEAP_BURSTFAILNEXT

__UHEAP_BURSTFAILNEXT (aCount, aBurst)

Description

Simulates heap allocation failure for the current thread's heap.

The failures will occur for aBurst times from the next call to new or any of the functions which allocate memory from the heap. This macro is defined only for debug builds.

Parameters

aCount

Determines when the allocation will fail. Heap allocation fails on attempt number aCount - later allocations will succeed. For example, if aCount is 3, then heap allocation fails on the 3rd attempt, but all subsequent allocations succeed. Note when used with RHeapRHeap the maximum value aBurst can be set to is KMaxTUint16.

aBurst

The number of consecutive allocations that will fail. Note when used with RHeapRHeap the maximum value aBurst can be set to is KMaxTUint16.

See also:

[Top]


__UHEAP_SETFAIL

__UHEAP_SETFAIL (aType, aRate)

Description

Simulates heap allocation failure for the current thread's heap.

The failure occurs on subsequent calls to new or any of the functions which allocate memory from the heap. This macro is defined only for debug builds.

Parameters

aType

The type of failure to be simulated.

aRate

The failure rate.

See also:

[Top]


__UHEAP_SETBURSTFAIL

__UHEAP_SETBURSTFAIL (aType, aRate, aBurst)

Description

Simulates heap allocation failure for the current thread's heap.

The failure occurs on subsequent calls to new or any of the functions which allocate memory from the heap. This macro is defined only for debug builds.

Parameters

aType

The type of failure to be simulated.

aRate

The failure rate. Note when used with RHeapRHeap the maximum value aRate can be set to is KMaxTUint16.

aBurst

The number of consecutive allocations that will fail. Note when used with RHeapRHeap the maximum value aBurst can be set to is KMaxTUint16.

See also:

[Top]


__UHEAP_RESET

__UHEAP_RESET

Description

Cancels simulated heap allocation failure for the current thread's heap.

This macro is defined only for debug builds.

See also:

[Top]


__UHEAP_TOTAL_RESET

__UHEAP_TOTAL_RESET

Description

Cancels simulated heap allocation failure for the current thread's heap. It walks the the heap and sets the nesting level for all allocated cells to zero.

This macro is defined only for debug builds.

[Top]


__UHEAP_CHECKFAILURE

__UHEAP_CHECKFAILURE ((TUint)0)

Description

Returns the number of heap allocation failures the current debug allocator fail function has caused so far.

This is intended to only be used with fail types RAllocator::EFailNext, RAllocator::EBurstFailNext, RAllocator::EDeterministic and RAllocator::EBurstDeterministic. The return value is unreliable for all other fail types.

See also:

[Top]


__KHEAP_CHECKFAILURE

__KHEAP_CHECKFAILURE ((TUint)0)

Description

Returns the number of kernel heap allocation failures the current debug allocator fail function has caused so far.

This is intended to only be used with fail types RAllocator::EFailNext, RAllocator::EBurstFailNext, RAllocator::EDeterministic and RAllocator::EBurstDeterministic. The return value is unreliable for all other fail types.

See also:

[Top]


__RHEAP_MARK

__RHEAP_MARK (aHeap)

Description

Marks the start of heap checking for the specific heap.

This macro is defined only for debug builds.

This macro must be matched by a corresponding call to __RHEAP_MARKEND or __RHEAP_MARKENDC.

Calls to this macro can be nested but each call must be matched by corresponding call to __RHEAP_MARKEND or __RHEAP_MARKENDC.

Parameters

aHeap

A pointer to the specific RHeapRHeap

See also:

[Top]


__RHEAP_CHECK

__RHEAP_CHECK (aHeap, aCount)

Description

Checks that the number of allocated cells at the current nested level on the specified heap is the same as the specified value.

The macro also takes the name of the file containing this source code statement and the line number of this source code statement; they are displayed as part of the panic category, if the checks fail.

This macro is defined only for debug builds.

Parameters

aHeap

A pointer to the specific RHeapRHeap.

aCount

The number of heap cells expected to be allocated at the current nest level.

See also:

[Top]


__RHEAP_CHECKALL

__RHEAP_CHECKALL (aHeap, aCount)

Description

Checks that the total number of allocated cells on the specified heap is the same as the specified value.

The macro also takes the name of the file containing this source code statement and the line number of this source code statement; they are displayed as part of the panic category, if the checks fail.

This macro is defined only for debug builds.

Parameters

aHeap

A pointer to the specific RHeapRHeap.

aCount

The total number of heap cells expected to be allocated.

See also:

[Top]


__RHEAP_MARKEND

__RHEAP_MARKEND (aHeap)

Description

Marks the end of heap checking for the specific heap.

The macro expects zero heap cells to remain allocated at the current nest level. This macro is defined only for debug builds.

This macro must match an earlier call to __RHEAP_MARK.

Parameters

aHeap

A pointer to the specific RHeapRHeap.

See also:

[Top]


__RHEAP_MARKENDC

__RHEAP_MARKENDC (aHeap, aCount)

Description

Marks the end of heap checking for the specific heap.

The macro expects aCount heap cells to remain allocated at the current nest level. This macro is defined only for debug builds.

This macro must match an earlier call to __RHEAP_MARK.

Parameters

aHeap

A pointer to the specific RHeapRHeap.

aCount

The number of heap cells expected to remain allocated at the current nest level

See also:

[Top]


__RHEAP_FAILNEXT

__RHEAP_FAILNEXT (aHeap, aCount)

Description

Simulates an allocation failure for the specific heap.

The failure occurs on the next call to new or any of the functions which allocate memory from the heap. This macro is defined only for debug builds.

Parameters

aHeap

A pointer to the specific RHeapRHeap.

aCount

The rate of failure - heap allocation fails every aCount attempt.

See also:

[Top]


__RHEAP_BURSTFAILNEXT

__RHEAP_BURSTFAILNEXT (aHeap, aCount, aBurst)

Description

Simulates aBurst allocation failures for the specific heap.

The failure occurs on the next call to new or any of the functions which allocate memory from the heap. This macro is defined only for debug builds.

Parameters

aHeap

A pointer to the specific RHeapRHeap.

aCount

The heap allocation will fail after aCount-1 allocation attempts. Note when used with RHeapRHeap the maximum value aCount can be set to is KMaxTUint16.

aBurst

The number of consecutive allocations that will fail. Note when used with RHeapRHeap the maximum value aBurst can be set to is KMaxTUint16.

See also:

[Top]


__RHEAP_SETFAIL

__RHEAP_SETFAIL (aHeap, aType, aRate)

Description

Simulates an allocation failure for the specific heap.

The failure occurs on subsequent calls to new or any of the functions which allocate memory from the heap. This macro is defined only for debug builds.

Parameters

aHeap

A pointer to the specific RHeapRHeap.

aType

The type of failure to be simulated.

aRate

The failure rate.

See also:

[Top]


__RHEAP_SETBURSTFAIL

__RHEAP_SETBURSTFAIL (aHeap, aType, aRate, aBurst)

Description

Simulates an allocation failure for the specific heap.

The failure occurs on subsequent calls to new or any of the functions which allocate memory from the heap. This macro is defined only for debug builds.

Parameters

aHeap

A pointer to the specific RHeapRHeap.

aType

The type of failure to be simulated.

aRate

The failure rate. Note when used with RHeapRHeap the maximum value aRate can be set to is KMaxTUint16.

aBurst

The number of consecutive allocations that will fail. Note when used with RHeapRHeap the maximum value aBurst can be set to is KMaxTUint16.

See also:

[Top]


__RHEAP_RESET

__RHEAP_RESET (aHeap)

Description

Cancels simulated allocation failure for the specific heap.

This macro is defined only for debug builds.

Parameters

aHeap

A pointer to the specific RHeapRHeap.

See also:

[Top]


__RHEAP_TOTAL_RESET

__RHEAP_TOTAL_RESET (aHeap)

Description

Cancels simulated allocation failure for the specific heap. It walks the the heap and sets the nesting level for all allocated cells to zero.

This macro is defined only for debug builds.

Parameters

aHeap

A pointer to the specific RHeapRHeap.

See also:

[Top]


__RHEAP_CHECKFAILURE

__RHEAP_CHECKFAILURE (aHeap) ((TUint)0)

Description

Returns the number of heap allocation failures the current debug allocator fail function has caused so far.

This is intended to only be used with fail types RAllocator::EFailNext, RAllocator::EBurstFailNext, RAllocator::EDeterministic and RAllocator::EBurstDeterministic. The return value is unreliable for all other fail types.

Parameters

aHeap

See also:

[Top]


UNICODE

Interface status: deprecated

UNICODE

Description

[Top]


ASSERT

ASSERT (x) __ASSERT_DEBUG(x,User::Invariant())

Description

Generates _ASSERT_DEBUG code that calls User::Invariant() if the specified condition is not true.

Parameters

x

A conditional expression which results in true or false.

[Top]


__ASSERT_COMPILE

__ASSERT_COMPILE (x) void __compile_time_assert(int __check[(x)?1:-1])

Description

Asserts that a condition is true at compilation time.

Parameters

x

Condition to assert

[Top]


Typedef TAny

typedef void TAny;

Description

Pointer to any type.

TAny* is equivalent to void* in standard C or C++. TAny* is used in preference to void* because it is more suggestive of the actual meaning, e.g. TAny* foo();.

TAny is not used where it really means "nothing", as in the declaration of functions which do not return a value; void is used instead, e.g. void Foo();.

[Top]


Typedef TInt8

typedef signed char TInt8;

Description

8-bit signed integer type, used in Symbian OS to mean an 8-bit signed integer, independent of the implementation.

[Top]


Typedef TUint8

typedef unsigned char TUint8;

Description

8-bit unsigned integer type; used in Symbian OS to mean an 8-bit unsigned integer, independent of the implementation.

[Top]


Typedef TInt16

typedef short int TInt16;

Description

16-bit signed integer type, used in Symbian OS to mean a 16-bit signed integer, independent of the implementation.

[Top]


Typedef TUint16

typedef unsigned short int TUint16;

Description

16-bit unsigned integer type. used in Symbian OS to mean a 16-bit unsigned integer, independent of the implementation.

[Top]


Typedef TInt32

typedef long int TInt32;

Description

32-bit signed integer type, used in Symbian OS to mean a 32-bit signed integer, independent of the implementation.

[Top]


Typedef TUint32

typedef unsigned long int TUint32;

Description

32-bit unsigned integer type; used in Symbian OS to mean a 32-bit unsigned integer, independent of the implementation.

[Top]


Typedef TInt

typedef signed int TInt;

Description

Signed integer type of the natural machine word length.

This is as defined by the C++ implementation's int type. In all implementations, this is guaranteed to be at least 32 bits.

A TInt should be used in preference to a sized integer (TInt32, TInt16) for all general use. Sized integers should only be used when packing is essential. C++'s type conversion rules imply that all sized integers smaller than the natural machine word are in any case broadened to the natural machine word size when passed as function parameters.

A TInt should be used in preference to an unsigned integer (TUint) for all general use. Unsigned integers should only be used for flags (which use Boolean operations but not arithmetic) and, in very rare cases, for numbers whose range exceeds that available from signed integers. Although it is natural to attempt to use unsigned integers for quantities which cannot by nature be negative, the C++ language does not provide the support necessary to enforce the "expected" behaviour in these circumstances, and experience has shown that it is better to use signed integers unless there is good reason not to.

See also:

[Top]


Typedef TUint

typedef unsigned int TUint;

Description

Unsigned integer type of the natural machine word length.

This is guaranteed to be at least 32 bits in all implementations.

In almost all circumstances, a TInt should be used in preference to a TUint. The main exception is in flags bytes.

[Top]


Typedef TReal32

typedef float TReal32;

Description

32-bit floating point number, providing IEEE754 single precision on all Symbian OS implementations.

TReal should normally be used in preference to TReal32.

Use of floating-point numbers should generally be avoided unless a natural part of the problem specification. Most Symbian OS implementations do not have a hardware floating point unit: as a result, their floating-point performance is hundreds of times slower than integer performance.

[Top]


Typedef TReal64

typedef double TReal64;

Description

64-bit floating point number, providing IEEE754 double precision on all Symbian OS implementations.

Use of floating-point numbers should generally be avoided unless a natural part of the problem specification. Most Symbian OS implementations do not have a hardware floating point unit: as a result, their floating-point performance is hundreds of times slower than integer performance.

This type is identical to TReal.

[Top]


Typedef TReal

typedef double TReal;

Description

64-bit floating point number; identical to TReal64.

Use of floating-point numbers should generally be avoided unless a natural part of the problem specification. Most Symbian OS implementations do not have a hardware floating point unit: as a result, their floating-point performance is hundreds of times slower than integer performance.

Most serious floating-point calculations require double-precision. All standard math functions (see MathMath class) take double-precision arguments. Single-precision should only be used where space and performance are at a premium, and when their limited precision is acceptable.

See also:

[Top]


Typedef TText8

typedef unsigned char TText8;

Description

8-bit unsigned character.

Use instead of C++ built-in char type because it is guaranteed to be unsigned. Use instead of TInt8 where the application is really for text rather than 8-bit arithmetic or binary quantities.

For most purposes, you should use TText rather than TText8. TText is mapped onto either TText8 or TText16 depending on whether a non-Unicode or Unicode variant is being built. Use TText8 only when you are dealing explicitly with 8-bit text, regardless of build.

[Top]


Typedef TText16

typedef unsigned short int TText16;

Description

16-bit unsigned character.

Use instead of C++ wchar_t type because it is guaranteed to be unsigned. Use instead of TInt16 where the application is really for text rather than 8-bit arithmetic or binary quantities.

For most purposes, you should use TText rather than TText16. TText is mapped onto either TText8 or TText16 depending on whether a non-Unicode or Unicode variant is being built. Use TText16 only when you are dealing explicitly with 16-bit text, regardless of build.

[Top]


Typedef TBool

typedef int TBool;

Description

Boolean type which takes the value either ETrue or EFalse.

Although only a single bit would theoretically be necessary to represent a Boolean, a machine word is used instead, so that these quantities can be easily passed. Also, TBool must map onto int because of C++'s interpretation of operands in conditional expressions.

On implementations of Symbian OS in which the compiler supports the ANSI-recommended bool type, TBool will be typedef'ed to bool instead of int.

[Top]


Typedef TInt64

typedef Int64 TInt64;

Description

Defines a 64-bit signed integer type.

NOTE: For those migrating from versions of Symbian OS before 8.1b (i.e. 8.1a, 7.0s etc) TInt64 is now defined as a built-in type instead of as a class type. This means that the member functions of the old TInt64 class are no longer exported from EUSER.LIB, and represents a compatibility break.

To ease migration of source code, a number of macros are provided. Similar macros have also been defined in Symbian OS versions 7.0s and 8.1a, but implemented in terms of the old TInt64 class. This is important for code that is common to : one or both of these Symbian OS versions, and to 8.1b and subsequent versions.

The following list shows the new macros and the functions that they replace. It also shows some alternative techniques. In this list: x, v and r are declared as TInt64, c is declared as TInt, High and Low are declared as TUint.

OLD USAGE                      REPLACEMENT

TInt64(High,Low);               MAKE_TINT64(High,Low);
x.Set(High,Low);                MAKE_TINT64(High,Low);
x.Low();                        I64LOW(x);
x.High();                       I64HIGH(x); 
x.GetTInt();                    I64INT(x); 
x.GetTReal();                   I64REAL(x); 
x.Lsr(c);                       I64LSR(x,c); 
x.Mul10();                      x*=10; 
x.MulTop(a);                    I64MULTOP(x,a); 
x.DivMod(v,r);                  r=x%v; x/=v;

[Top]


Typedef TUint64

typedef Uint64 TUint64;

Description

Defines a 64-bit unsigned integer type.

[Top]


Typedef TText

typedef TText16 TText;

Description

Build independent general text character.

In non-Unicode builds, this is mapped to TText8. In Unicode builds, this is mapped to TText16. Use the classes with explicit width only when you wish the width to be independent of the build variant.

Use this class rather than TCharTChar for general use.

[Top]


Typedef VA_LIST

typedef TInt8* VA_LIST[1];

Description

Defines a 'C' style array of pointers to TInt8 types.

The type is most commonly used by code that needs to deal with a variable number of arguments passed to a function.

See also:


e32def.h Global variables