CCleanup Class Reference
class CCleanup : public CBase |
Implements the cleanup stack.
An object of this type is created and used by the cleanup stack interface, CTrapCleanup.
Protected Attributes |
---|
TCleanupStackItem * | iBase |
TCleanupStackItem * | iNext |
TCleanupStackItem * | iTop |
Constructor & Destructor Documentation
CCleanup()
IMPORT_C | CCleanup | ( | ) | [protected] |
~CCleanup()
Destructor.
Pops and destroys all items from the cleanup stack and then destroys the cleanup stack itself.
Member Functions Documentation
Check(TAny *)
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.
Parameters
TAny * aExpectedItem | The object which is the subject of the test. |
DoPop(TInt, TBool)
IMPORT_C void | DoPop | ( | TInt | aCount, |
| TBool | aDestroy |
| ) | [protected] |
Parameters
TInt aCount | The number of cleanup items to be popped from the cleanup stack. |
TBool aDestroy | ETrue, if cleanup is to be performed; EFalse, otherwise. |
DoPopAll(TBool)
IMPORT_C void | DoPopAll | ( | TBool | aDestroy | ) | [protected] |
Parameters
TBool aDestroy | ETrue, if cleanup is to be performed; EFalse, otherwise. |
New()
Creates a new cleanup stack object.
The cleanup stack itself is allocated with enough space initially to hold a number of stack items.
NewL()
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.
NextLevel()
Goes to the next cleanup level.
Pop()
Pops a single cleanup item from the cleanup stack.
-
panic
- E32USER-CBase 64 If there are no items on the cleanup stack.
-
panic
- E32USER-CBase 63 If a cleanup level is crossed.
Pop(TInt)
IMPORT_C void | Pop | ( | TInt | aCount | ) | |
Pops the specified number of cleanup items from the cleanup stack.
-
panic
- E32USER-CBase 70 If the specified number of cleanup items is negative.
-
panic
- E32USER-CBase 64 If the specifed number of items is greater than the number of items on the cleanup stack.
-
panic
- E32USER-CBase 63 If the specified number of items is such that it causes a cleanup level to be crossed.
Parameters
TInt aCount | The number of cleanup items to be popped from the cleanup stack. |
PopAll()
Pops all cleanup items at the current level, and then decrements the level.
PopAndDestroy()
IMPORT_C void | PopAndDestroy | ( | ) | |
Pops a single cleanup item from the cleanup stack, and invokes its cleanup operation.
-
panic
- E32USER-CBase 64 If there are no items on the cleanup stack.
-
panic
- E32USER-CBase 63 If a cleanup level is crossed.
PopAndDestroy(TInt)
IMPORT_C void | PopAndDestroy | ( | TInt | aCount | ) | |
Pops the specified number of cleanup items from the cleanup stack, and invokes their cleanup operations.
-
panic
- E32USER-CBase 70 If the specified number of cleanup items is negative.
-
panic
- E32USER-CBase 64 If the specifed number of items is greater than the number of items on the cleanup stack.
-
panic
- E32USER-CBase 63 If the specified number of items is such that it causes a cleanup level to be crossed.
Parameters
TInt aCount | The number of cleanup items to be popped from the cleanup stack. |
PopAndDestroyAll()
IMPORT_C void | PopAndDestroyAll | ( | ) | |
Pops all cleanup items at the current level, invokes their cleanup operations and then decrements the level.
PreviousLevel()
IMPORT_C void | PreviousLevel | ( | ) | |
Goes to the previous cleanup level.
-
panic
- E32USER-CBase 71 If the previous stack item does not represent a cleanup level.
PushL(TAny *)
IMPORT_C void | PushL | ( | TAny * | aPtr | ) | |
Pushes a cleanup item onto the cleanup stack.
The cleanup item represents an operation that frees the specified heap cell.
Parameters
TAny * aPtr | A pointer to a heap cell that will be freed by the cleanup operation. |
PushL(CBase *)
IMPORT_C void | 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
CBase * anObject | A pointer to CBase derived object that will be deleted by the cleanup operation. |
PushL(TCleanupItem)
Parameters
TCleanupItem anItem | Encapsulates a cleanup operation and an object on which the cleanup operation is to be performed. |
Member Data Documentation
TCleanupStackItem * iBase
TCleanupStackItem * | iBase | [protected] |
Pointer to the bottom of the cleanup stack.
TCleanupStackItem * iNext
TCleanupStackItem * | iNext | [protected] |
Pointer to the next availaible slot in the cleanup stack.
TCleanupStackItem * iTop
TCleanupStackItem * | iTop | [protected] |
Pointer to the top of the cleanup stack.
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.