MeVisLab Toolbox Reference
IntrusivePtrBase< Derived > Class Template Reference

A base-class enabling the use of boost::intrusive_ptr in derived classes. More...

#include <mlIntrusivePtrBase.h>

Protected Member Functions

 IntrusivePtrBase ()
 

Friends

void intrusive_ptr_add_ref (const IntrusivePtrBase< Derived > *ptr)
 Friend functions used by boost::intrusive_ptr. More...
 
void intrusive_ptr_release (const IntrusivePtrBase< Derived > *ptr)
 

Detailed Description

template<typename Derived>
class IntrusivePtrBase< Derived >

A base-class enabling the use of boost::intrusive_ptr in derived classes.

A minimal base class that provides a reference counter for use with boost::intrusive_ptr.

In order to not require virtual destructors, this class uses CRTP (curiously recurring template pattern) and expects the derived class as template argument to this base class.

Definition at line 48 of file mlIntrusivePtrBase.h.

Constructor & Destructor Documentation

◆ IntrusivePtrBase()

template<typename Derived >
IntrusivePtrBase< Derived >::IntrusivePtrBase ( )
inlineprotected

Definition at line 50 of file mlIntrusivePtrBase.h.

Friends And Related Function Documentation

◆ intrusive_ptr_add_ref

template<typename Derived >
void intrusive_ptr_add_ref ( const IntrusivePtrBase< Derived > *  ptr)
friend

Friend functions used by boost::intrusive_ptr.

Definition at line 63 of file mlIntrusivePtrBase.h.

◆ intrusive_ptr_release

template<typename Derived >
void intrusive_ptr_release ( const IntrusivePtrBase< Derived > *  ptr)
friend

Definition at line 65 of file mlIntrusivePtrBase.h.


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