Loading...
Searching...
No Matches
ASSA::Destroyer< T > Class Template Reference

`#include <Destroyer.h>`

## Public Member Functions

| Destroyer (T *d_=0)
| Constructor.
| ~Destroyer ()
void | setGuard (T *d_)
| Transfer ownership of object T to Destroyer class.

## Private Member Functions

| Destroyer (const Destroyer< T > &)
Destroyer< T > & | operator= (const Destroyer< T > &)

## Private Attributes

T * | m_otg
| Object T to guard.

## Detailed Description

template<class T>
class ASSA::Destroyer< T >

Definition at line 24 of file Destroyer.h.

## Constructor & Destructor Documentation

## Destroyer() [1/2]

template<class T >

ASSA::Destroyer< T >::Destroyer | ( | T * | d_ = `0` | ) |

inline

Constructor.

Parameters

  d_ | pointer to the object to guard.

Definition at line 30 of file Destroyer.h.

: m_otg (d_) { /* empty */ }
ASSA::Destroyer::m_otg
T * m_otg
Object T to guard.
Definition Destroyer.h:53

## ~Destroyer()

template<class T >

ASSA::Destroyer< T >::~Destroyer | ( |  | ) |

inline

Definition at line 34 of file Destroyer.h.

{
if ( m_otg ) {
delete m_otg;
}
}

References ASSA::Destroyer< T >::m_otg.

## Destroyer() [2/2]

template<class T >

ASSA::Destroyer< T >::Destroyer | ( | const Destroyer< T > & |  | ) |

private

## Member Function Documentation

## operator=()

template<class T >

Destroyer< T > & ASSA::Destroyer< T >::operator= | ( | const Destroyer< T > & |  | ) |

private

## setGuard()

template<class T >

void ASSA::Destroyer< T >::setGuard | ( | T * | d_ | ) |

inline

Transfer ownership of object T to Destroyer class.

Parameters

  d_ | - object T to guard

Definition at line 43 of file Destroyer.h.

{
m_otg = d_;
}

References ASSA::Destroyer< T >::m_otg.

## Member Data Documentation

## m_otg

template<class T >

T* ASSA::Destroyer< T >::m_otg

private

Object T to guard.

Definition at line 53 of file Destroyer.h.

Referenced by ASSA::Destroyer< T >::setGuard(), and ASSA::Destroyer< T >::~Destroyer().

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

- Destroyer.h