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

#include "oct-refcount.h"

Collaboration diagram for octave::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 octave::refcount< T >

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

Member Typedef Documentation

◆ count_type

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

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

Constructor & Destructor Documentation

◆ refcount() [1/2]

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

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

◆ refcount() [2/2]

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

◆ ~refcount()

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

Member Function Documentation

◆ operator count_type()

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

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

References octave::refcount< T >::value().

◆ operator++() [1/2]

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

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

References octave::refcount< T >::m_count.

◆ operator++() [2/2]

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

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

References octave::refcount< T >::m_count.

◆ operator--() [1/2]

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

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

References octave::refcount< T >::m_count.

◆ operator--() [2/2]

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

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

References octave::refcount< T >::m_count.

◆ operator=()

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

◆ value()

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

Member Data Documentation

◆ m_count

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

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