GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
refcount< T > Class Template Reference

#include "oct-refcount.h"

Collaboration diagram for refcount< T >:

Public Types

typedef T count_type
 

Public Member Functions

 refcount (const refcount &)=delete
 
 refcount (count_type initial_count)
 
 ~refcount (void)=default
 
 operator count_type (void) const
 
count_type operator++ (int)
 
count_type operator++ (void)
 
count_type operator-- (int)
 
count_type operator-- (void)
 
refcountoperator= (const refcount &)=delete
 
count_type value (void) const
 

Private Attributes

std::atomic< T > m_count
 

Detailed Description

template<typename T>
class refcount< T >

Definition at line 38 of file oct-refcount.h.

Member Typedef Documentation

◆ count_type

template<typename T >
typedef T refcount< T >::count_type

Definition at line 42 of file oct-refcount.h.

Constructor & Destructor Documentation

◆ refcount() [1/2]

template<typename T >
refcount< T >::refcount ( count_type  initial_count)
inline

Definition at line 44 of file oct-refcount.h.

◆ refcount() [2/2]

template<typename T >
refcount< T >::refcount ( const refcount< T > &  )
delete

◆ ~refcount()

template<typename T >
refcount< T >::~refcount ( void  )
default

Member Function Documentation

◆ operator count_type()

template<typename T >
refcount< T >::operator count_type ( void  ) const
inline

Definition at line 80 of file oct-refcount.h.

References refcount< T >::value().

◆ operator++() [1/2]

template<typename T >
count_type refcount< T >::operator++ ( int  )
inline

Definition at line 60 of file oct-refcount.h.

References refcount< T >::m_count.

◆ operator++() [2/2]

template<typename T >
count_type refcount< T >::operator++ ( void  )
inline

Definition at line 55 of file oct-refcount.h.

References refcount< T >::m_count.

◆ operator--() [1/2]

template<typename T >
count_type refcount< T >::operator-- ( int  )
inline

Definition at line 70 of file oct-refcount.h.

References refcount< T >::m_count.

◆ operator--() [2/2]

template<typename T >
count_type refcount< T >::operator-- ( void  )
inline

Definition at line 65 of file oct-refcount.h.

References refcount< T >::m_count.

◆ operator=()

template<typename T >
refcount& refcount< T >::operator= ( const refcount< T > &  )
delete

◆ value()

template<typename T >
count_type refcount< T >::value ( void  ) const
inline

Definition at line 75 of file oct-refcount.h.

References refcount< T >::m_count.

Referenced by refcount< T >::operator count_type().

Member Data Documentation

◆ m_count

template<typename T >
std::atomic<T> refcount< T >::m_count
private

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