BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslalg::AutoScalarDestructor< OBJECT_TYPE > Class Template Reference

#include <bslalg_autoscalardestructor.h>

Public Member Functions

 AutoScalarDestructor (OBJECT_TYPE *object)
 
 ~AutoScalarDestructor ()
 
void release ()
 
void reset (OBJECT_TYPE *object)
 

Detailed Description

template<class OBJECT_TYPE>
class bslalg::AutoScalarDestructor< OBJECT_TYPE >

This class provides a specialized proctor object that, upon destruction and unless the release method is called, destroys the guarded object of the parameterized OBJECT_TYPE.

See bslalg_autoscalardestructor

Constructor & Destructor Documentation

◆ AutoScalarDestructor()

template<class OBJECT_TYPE >
bslalg::AutoScalarDestructor< OBJECT_TYPE >::AutoScalarDestructor ( OBJECT_TYPE *  object)
inline

Create a guard object, proctoring the specified object of the parameterized OBJECT_TYPE (if non-zero), that will invoke the destructor of object upon destruction.

◆ ~AutoScalarDestructor()

template<class OBJECT_TYPE >
bslalg::AutoScalarDestructor< OBJECT_TYPE >::~AutoScalarDestructor ( )
inline

Call the destructor on the object of the parameterized OBJECT_TYPE that is proctored by this guard object, if any, and destroy this object.

Member Function Documentation

◆ release()

template<class OBJECT_TYPE >
void bslalg::AutoScalarDestructor< OBJECT_TYPE >::release ( )
inline

Set the address of the object proctored by this guard object to 0, thereby releasing from management the object currently managed by this proctor, if any.

◆ reset()

template<class OBJECT_TYPE >
void bslalg::AutoScalarDestructor< OBJECT_TYPE >::reset ( OBJECT_TYPE *  object)
inline

Set this guard object to manage the specified object, thereby releasing from management any object currently managed by this proctor, if any.


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