e32base.h File Reference

Typedef TBufRep

typedef CBufBase *(*TBufRep

IsLocalHandle ( TInt )

TBool IsLocalHandle(TIntaHandle)[inline]

SetLocalHandle ( TInt & )

voidSetLocalHandle(TInt &aHandle)[inline]

UnSetLocalHandle ( TInt & )

voidUnSetLocalHandle(TInt &aHandle)[inline]

Typedef TCleanupOperation

typedef void(*TCleanupOperation

Defines a function which takes a single argument of type TAny* and returns void.

An argument of this type is required by the constructors of a TCleanupItem object.

NONSHARABLE_CLASS ( TCleanupTrapHandler )

NONSHARABLE_CLASS(TCleanupTrapHandler)

Implementation for a handler to work with the TRAP mechanism.

This class does not normally need to be used or accessed directly by applications and third party code.

CleanupDeletePushL ( T * )

voidCleanupDeletePushL(T *aPtr)[inline]

Constructs and pushes a TCleanupItem object onto the cleanup stack.

The TCleanupItem encapsulates:

  • the pointer aPtr to the object of type class T which is to be cleaned up

  • an associated cleanup operation.

The cleanup operation is the private static function Delete() of the templated class CleanupDelete, and is called as a result of a subsequent call to CleanupStack::PopAndDestroy().

CleanupDelete::Delete() is passed a pointer to the class T object to be cleaned up, and the function implements cleanup by deleting the passed object.

An example of its use:

...
CTestOne* one = new (ELeave) CTestOne;
CleanupDeletePushL(one);
...
CleanupStack::PopAndDestroy(); // <--- results in "one" being deleted.
...

See also: TCleanupItem CleanupDelete CleanupStack::PopAndDestroy()

Parameters
aPtrA pointer to a templated class T type object for which the cleanup item is being created.

CleanupArrayDeletePushL ( T * )

voidCleanupArrayDeletePushL(T *aPtr)[inline]

Constructs and pushes a TCleanupItem object onto the cleanup stack.

The TCleanupItem encapsulates:

  • the pointer aPtr to an array of type class T objects to be cleaned up

  • an associated cleanup operation.

The cleanup operation is the private static function ArrayDelete() of the templated class CleanupArrayDelete, and is called as a result of a subsequent call to CleanupStack::PopAndDestroy().

CleanupArrayDelete::ArrayDelete() is passed a pointer to the array of class T objects to be cleaned up, and the function implements cleanup by deleting the passed array using the delete [] operator.

An example of its use:

...
RTestOne* one = new (ELeave) RTestOne [KSomeArraySize];
CleanupArrayDeletePushL(one);
... // Do something with the object.........
CleanupStack::PopAndDestroy(); // <--- results in the array "one" being deleted.
...

See also: TCleanupItem CleanupArrayDelete CleanupStack::PopAndDestroy()

Parameters
aPtrA pointer to an array of class T type objects for which the cleanup item is being created.

CleanupClosePushL ( T & )

voidCleanupClosePushL(T &aRef)[inline]

Constructs and pushes a TCleanupItem object onto the cleanup stack.

The TCleanupItem encapsulates:

1. a reference aRef to the object of type class T which is to be cleaned up

2. an associated cleanup operation.

The cleanup operation is the private static function Close() of the templated class CleanupClose and is invoked as a result of a subsequent call to CleanupStack::PopAndDestroy().

CleanupClose::Close() is passed a pointer to the class T object to be cleaned up, and the function implements cleanup by calling Close() on the passed object. The class T object must, therefore, define and implement (or inherit) a Close() member function.

An example of its use:

class RTestTwo;
	{
public :
    ...
	IMPORT_C void Close();
	...
	}
...
RTestTwo two;
CleanupClosePushL(two);
...
CleanupStack::PopAndDestroy(); // <--- results in Close() being called on "two".
......

In practice, this type of cleanup operation is commonly applied to handles to resources; if such handles are constructed on the program stack, then it is important that such handles are closed.

See also: TCleanupItem CleanupClose CleanupStack::PopAndDestroy()

Parameters
aRefA reference to a class T type object for which the cleanup item is being created.

CleanupReleasePushL ( T & )

voidCleanupReleasePushL(T &aRef)[inline]

Constructs and pushes a TCleanupItem object onto the cleanup stack.

The TCleanupItem encapsulates:

1. a reference aRef to the object of type class T which is to be cleaned up

2. an associated cleanup operation.

The cleanup operation is the private static function Release() of the templated class CleanupRelease and is invoked as a result of a subsequent call to CleanupStack::PopAndDestroy().

CleanupRelease::Release() is passed a pointer to the class T object to be cleaned up, and the function implements cleanup by calling Release() on the passed object. The class T object must, therefore, define and implement (or inherit) a Release() member function.

An example of its use:

class RTestThree;
	{
public :
    ...
	IMPORT_C void Release();
	...
	}
...
RTestThree three;
CleanupReleasePushL(three);
...
CleanupStack::PopAndDestroy(); // <--- results in Release() being called on "three".
......

See also: TCleanupItem CleanupRelease CleanupStack::PopAndDestroy()

Parameters
aRefA reference to a class T type object for which the cleanup item is being created.