TAutoClose Class Reference

class TAutoClose

Automatically calls Close() on an object when that object goes out of scope.

The behaviour takes advantage of the fact that the compiler automatically destroys objects that go out of scope.

Public Member Functions
~TAutoClose()
voidPop()
voidPushL()
Private Member Functions
voidClose(TAny *)
Public Attributes
TiObj

Constructor & Destructor Documentation

~TAutoClose()

~TAutoClose()[inline]

Destructor.

The implementation calls Close() on iObj, the instance of the template class.

Member Functions Documentation

Close(TAny *)

voidClose(TAny *aObj)[private, static]

Parameters

TAny * aObj

Pop()

voidPop()[inline]

Pops a single cleanup item from the cleanup stack.

PushL()

voidPushL()[inline]

Pushes a cleanup item onto the cleanup stack, so that Close() is called on the templated class object, iObj, if a leave occurs.

Member Data Documentation

T iObj

TiObj

An instance of the template class.