Public Member Functions | Private Attributes | List of all members
xsens::JanitorDeleteNull< T > Class Template Reference

Memory releasing and nulling janitor class. More...

#include <xsens_janitors.h>

Public Member Functions

void disable (void)
 Disables the memory releasing and nulling. More...
 
void enable (void)
 Enables the memory releasing and nulling. More...
 
 JanitorDeleteNull (T *&control, bool enabl=true)
 Constructor. More...
 
T * operator-> ()
 
const T * operator-> () const
 
 ~JanitorDeleteNull ()
 Destructor. More...
 

Private Attributes

T *& m_control
 
bool m_enabled
 

Detailed Description

template<class T>
class xsens::JanitorDeleteNull< T >

Memory releasing and nulling janitor class.

This class can be used to make sure that the associated object is deleted when the janitor leaves scope and the referenced pointer is set to NULL.

Definition at line 265 of file xsens_janitors.h.

Constructor & Destructor Documentation

◆ JanitorDeleteNull()

template<class T >
xsens::JanitorDeleteNull< T >::JanitorDeleteNull ( T *&  control,
bool  enabl = true 
)
inline

Constructor.

Definition at line 274 of file xsens_janitors.h.

◆ ~JanitorDeleteNull()

template<class T >
xsens::JanitorDeleteNull< T >::~JanitorDeleteNull ( )
inline

Destructor.

Definition at line 283 of file xsens_janitors.h.

Member Function Documentation

◆ disable()

template<class T >
void xsens::JanitorDeleteNull< T >::disable ( void  )
inline

Disables the memory releasing and nulling.

Definition at line 294 of file xsens_janitors.h.

◆ enable()

template<class T >
void xsens::JanitorDeleteNull< T >::enable ( void  )
inline

Enables the memory releasing and nulling.

Definition at line 301 of file xsens_janitors.h.

◆ operator->() [1/2]

template<class T >
T* xsens::JanitorDeleteNull< T >::operator-> ( )
inline
Returns
A pointer to the data. This does not detach/copy the data.

Definition at line 315 of file xsens_janitors.h.

◆ operator->() [2/2]

template<class T >
const T* xsens::JanitorDeleteNull< T >::operator-> ( ) const
inline
Returns
A const pointer to the data. This does not detach/copy the data.

Definition at line 308 of file xsens_janitors.h.

Member Data Documentation

◆ m_control

template<class T >
T*& xsens::JanitorDeleteNull< T >::m_control
private

Definition at line 268 of file xsens_janitors.h.

◆ m_enabled

template<class T >
bool xsens::JanitorDeleteNull< T >::m_enabled
private

Definition at line 269 of file xsens_janitors.h.


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


xsens_mti_driver
Author(s):
autogenerated on Sun Sep 3 2023 02:43:23