Public Member Functions | Private Member Functions | Private Attributes
UDestroyer< T > Class Template Reference

#include <UDestroyer.h>

List of all members.

Public Member Functions

bool setDoomed (T *doomed)
 UDestroyer (T *doomed=0)
 ~UDestroyer ()

Private Member Functions

void operator= (const UDestroyer< T > &)
 UDestroyer (const UDestroyer< T > &)

Private Attributes

Tdoomed_

Detailed Description

template<class T>
class UDestroyer< T >

This class is used to delete a dynamically created objects. It was mainly designed to remove dynamically created Singleton. Created on the stack of a Singleton, when the application is finished, his destructor make sure that the Singleton is deleted.

Definition at line 34 of file UDestroyer.h.


Constructor & Destructor Documentation

template<class T>
UDestroyer< T >::UDestroyer ( T doomed = 0) [inline]

The constructor. Set the doomed object (take ownership of the object). The object is deleted when this object is deleted.

Definition at line 41 of file UDestroyer.h.

template<class T>
UDestroyer< T >::~UDestroyer ( ) [inline]

Definition at line 43 of file UDestroyer.h.

template<class T>
UDestroyer< T >::UDestroyer ( const UDestroyer< T > &  ) [private]

Member Function Documentation

template<class T>
void UDestroyer< T >::operator= ( const UDestroyer< T > &  ) [private]
template<class T>
bool UDestroyer< T >::setDoomed ( T doomed) [inline]

Set the doomed object. If a doomed object is already set, the function returns false.

Parameters:
doomedthe doomed object
Returns:
false if an object is already set and the new object is not null, otherwise true

Definition at line 57 of file UDestroyer.h.


Member Data Documentation

template<class T>
T* UDestroyer< T >::doomed_ [private]

Definition at line 74 of file UDestroyer.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jun 6 2019 21:59:39