Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
TAutoClose< T > Class Template Reference

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

#include <e32base.h>

Public Member Functions

 ~TAutoClose ()
 Destructor.
 
void PushL ()
 Pushes a cleanup item onto the cleanup stack, so that Close() is called on the templated class object, iObj, if a leave occurs.
 
void Pop ()
 Pops a single cleanup item from the cleanup stack.
 

Public Attributes

T iObj
 An instance of the template class.
 

Detailed Description

template<class T>
class TAutoClose< T >

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.

API status
Published to all clients. Released API.

Definition at line 1482 of file e32base.h.

Constructor & Destructor Documentation

◆ ~TAutoClose()

template<class T >
TAutoClose< T >::~TAutoClose ( )
inline

Destructor.

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

(generated from Symbian Developer Library)

Member Function Documentation

◆ Pop()

template<class T >
void TAutoClose< T >::Pop ( )
inline

Pops a single cleanup item from the cleanup stack.

(generated from Symbian Developer Library)

◆ PushL()

template<class T >
void TAutoClose< T >::PushL ( )
inline

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

(generated from Symbian Developer Library)

Member Data Documentation

◆ iObj

template<class T >
T TAutoClose< T >::iObj

An instance of the template class.

Definition at line 1505 of file e32base.h.


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