Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
CCleanup Class Reference

Implements the cleanup stack. More...

#include <e32base.h>

Inheritance diagram for CCleanup:
CBase

Public Member Functions

IMPORT_C ~CCleanup ()
 Destructor.
 
IMPORT_C void NextLevel ()
 Goes to the next cleanup level.
 
IMPORT_C void PreviousLevel ()
 Goes to the previous cleanup level.
 
IMPORT_C void PushL (TAny *aPtr)
 Pushes a cleanup item onto the cleanup stack.
 
IMPORT_C void PushL (CBase *anObject)
 Pushes a cleanup item onto the cleanup stack.
 
IMPORT_C void PushL (TCleanupItem anItem)
 Pushes a cleanup item onto the cleanup stack.
 
IMPORT_C void Pop ()
 Pops a single cleanup item from the cleanup stack.
 
IMPORT_C void Pop (TInt aCount)
 Pops the specified number of cleanup items from the cleanup stack.
 
IMPORT_C void PopAll ()
 Pops all cleanup items at the current level, and then decrements the level.
 
IMPORT_C void PopAndDestroy ()
 Pops a single cleanup item from the cleanup stack, and invokes its cleanup operation.
 
IMPORT_C void PopAndDestroy (TInt aCount)
 Pops the specified number of cleanup items from the cleanup stack, and invokes their cleanup operations.
 
IMPORT_C void PopAndDestroyAll ()
 Pops all cleanup items at the current level, invokes their cleanup operations and then decrements the level.
 
IMPORT_C void Check (TAny *aExpectedItem)
 Checks that the cleanup item at the top of the cleanup stack represents a cleanup operation for the specified object.
 
- Public Member Functions inherited from CBase
 CBase ()
 Default constructor.
 
virtual IMPORT_C ~CBase ()
 Virtual destructor.
 
TAny * operator new (TUint aSize, TAny *aBase) __NO_THROW
 Initialises the object to binary zeroes.
 
TAny * operator new (TUint aSize) __NO_THROW
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TLeave)
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TUint aExtraSize) __NO_THROW
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TLeave, TUint aExtraSize)
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 

Static Public Member Functions

static IMPORT_C CCleanup * New ()
 Creates a new cleanup stack object.
 
static IMPORT_C CCleanup * NewL ()
 Creates a new cleanup stack object, and leaves if there is insufficient memory to create it.
 
- Static Public Member Functions inherited from CBase
static IMPORT_C void Delete (CBase *aPtr)
 Deletes the specified object.
 

Protected Member Functions

IMPORT_C void DoPop (TInt aCount, TBool aDestroy)
 Provides an implementation for Pop() and PopAndDestroy().
 
IMPORT_C void DoPopAll (TBool aDestroy)
 Provides an implementation for PopAll() and PopAndDestroyAll().
 
IMPORT_C CCleanup ()
 Default constructor.
 
- Protected Member Functions inherited from CBase
virtual IMPORT_C TInt Extension_ (TUint aExtensionId, TAny *&a0, TAny *a1)
 Extension function.
 

Protected Attributes

TCleanupStackItem * iBase
 Pointer to the bottom of the cleanup stack.
 
TCleanupStackItem * iTop
 Pointer to the top of the cleanup stack.
 
TCleanupStackItem * iNext
 Pointer to the next availaible slot in the cleanup stack.
 

Detailed Description

Implements the cleanup stack.

An object of this type is created and used by the cleanup stack interface, CTrapCleanup.

API status
Published to all clients. Released API.

Definition at line 1397 of file e32base.h.

Constructor & Destructor Documentation

◆ ~CCleanup()

IMPORT_C CCleanup::~CCleanup ( )

Destructor.

Pops and destroys all items from the cleanup stack and then destroys the cleanup stack itself.

(generated from Symbian Developer Library)

◆ CCleanup()

IMPORT_C CCleanup::CCleanup ( )
protected

Default constructor.

(generated from Symbian Developer Library)

Member Function Documentation

◆ Check()

IMPORT_C void CCleanup::Check ( TAny *  aExpectedItem)

Checks that the cleanup item at the top of the cleanup stack represents a cleanup operation for the specified object.

Parameters
aExpectedItemThe object which is the subject of the test.

(generated from Symbian Developer Library)

◆ DoPop()

IMPORT_C void CCleanup::DoPop ( TInt  aCount,
TBool  aDestroy 
)
protected

Provides an implementation for Pop() and PopAndDestroy().

Parameters
aCountThe number of cleanup items to be popped from the cleanup stack.
aDestroyETrue, if cleanup is to be performed; EFalse, otherwise.

(generated from Symbian Developer Library)

◆ DoPopAll()

IMPORT_C void CCleanup::DoPopAll ( TBool  aDestroy)
protected

Provides an implementation for PopAll() and PopAndDestroyAll().

Parameters
aDestroyETrue, if cleanup is to be performed; EFalse, otherwise.

(generated from Symbian Developer Library)

◆ New()

static IMPORT_C CCleanup * CCleanup::New ( )
static

Creates a new cleanup stack object.

The cleanup stack itself is allocated with enough space initially to hold a number of stack items.

(generated from Symbian Developer Library)

◆ NewL()

static IMPORT_C CCleanup * CCleanup::NewL ( )
static

Creates a new cleanup stack object, and leaves if there is insufficient memory to create it.

The cleanup stack itself is allocated with enough space initially to hold a number of stack items.

(generated from Symbian Developer Library)

◆ NextLevel()

IMPORT_C void CCleanup::NextLevel ( )

Goes to the next cleanup level.

(generated from Symbian Developer Library)

◆ Pop() [1/2]

IMPORT_C void CCleanup::Pop ( )

Pops a single cleanup item from the cleanup stack.

Panic condition: E32USER-CBase 64 If there are no items on the cleanup stack.

Panic condition: E32USER-CBase 63 If a cleanup level is crossed.

(generated from Symbian Developer Library)

◆ Pop() [2/2]

IMPORT_C void CCleanup::Pop ( TInt  aCount)

Pops the specified number of cleanup items from the cleanup stack.

Parameters
aCountThe number of cleanup items to be popped from the cleanup stack.

Panic condition: E32USER-CBase 70 If the specified number of cleanup items is negative.

Panic condition: E32USER-CBase 64 If the specifed number of items is greater than the number of items on the cleanup stack.

Panic condition: E32USER-CBase 63 If the specified number of items is such that it causes a cleanup level to be crossed.

(generated from Symbian Developer Library)

◆ PopAll()

IMPORT_C void CCleanup::PopAll ( )

Pops all cleanup items at the current level, and then decrements the level.

(generated from Symbian Developer Library)

◆ PopAndDestroy() [1/2]

IMPORT_C void CCleanup::PopAndDestroy ( )

Pops a single cleanup item from the cleanup stack, and invokes its cleanup operation.

Panic condition: E32USER-CBase 64 If there are no items on the cleanup stack.

Panic condition: E32USER-CBase 63 If a cleanup level is crossed.

(generated from Symbian Developer Library)

◆ PopAndDestroy() [2/2]

IMPORT_C void CCleanup::PopAndDestroy ( TInt  aCount)

Pops the specified number of cleanup items from the cleanup stack, and invokes their cleanup operations.

Parameters
aCountThe number of cleanup items to be popped from the cleanup stack.

Panic condition: E32USER-CBase 70 If the specified number of cleanup items is negative.

Panic condition: E32USER-CBase 64 If the specifed number of items is greater than the number of items on the cleanup stack.

Panic condition: E32USER-CBase 63 If the specified number of items is such that it causes a cleanup level to be crossed.

(generated from Symbian Developer Library)

◆ PopAndDestroyAll()

IMPORT_C void CCleanup::PopAndDestroyAll ( )

Pops all cleanup items at the current level, invokes their cleanup operations and then decrements the level.

(generated from Symbian Developer Library)

◆ PreviousLevel()

IMPORT_C void CCleanup::PreviousLevel ( )

Goes to the previous cleanup level.

Panic condition: E32USER-CBase 71 If the previous stack item does not represent a cleanup level.

(generated from Symbian Developer Library)

◆ PushL() [1/3]

IMPORT_C void CCleanup::PushL ( CBase *  anObject)

Pushes a cleanup item onto the cleanup stack.

The cleanup item represents an operation that deletes the specified CBase derived object.

Parameters
anObjectA pointer to CBase derived object that will be deleted by the cleanup operation.

(generated from Symbian Developer Library)

◆ PushL() [2/3]

IMPORT_C void CCleanup::PushL ( TAny *  aPtr)

Pushes a cleanup item onto the cleanup stack.

The cleanup item represents an operation that frees the specified heap cell.

Parameters
aPtrA pointer to a heap cell that will be freed by the cleanup operation.

(generated from Symbian Developer Library)

◆ PushL() [3/3]

IMPORT_C void CCleanup::PushL ( TCleanupItem  anItem)

Pushes a cleanup item onto the cleanup stack.

The cleanup item represents a call back operation that performs the required cleanup.

CleanupClosePushL CleanupReleasePushL CleanupDeletePushL

Parameters
anItemEncapsulates a cleanup operation and an object on which the cleanup operation is to be performed.

(generated from Symbian Developer Library)

Member Data Documentation

◆ iBase

TCleanupStackItem* CCleanup::iBase
protected

Pointer to the bottom of the cleanup stack.

Definition at line 1435 of file e32base.h.

◆ iNext

TCleanupStackItem* CCleanup::iNext
protected

Pointer to the next availaible slot in the cleanup stack.

Definition at line 1447 of file e32base.h.

◆ iTop

TCleanupStackItem* CCleanup::iTop
protected

Pointer to the top of the cleanup stack.

Definition at line 1441 of file e32base.h.


The documentation for this class was generated from the following files: