iceoryx_doc  1.0.1
Public Member Functions | List of all members
iox::cxx::ReferenceCounter< T > Class Template Reference

reference counter abstraction for the usage in constructs like a shared_ptr. A pointer to a memory position where the reference counter is stored is put into the constructor and then this object performs reference counting on it. More...

#include <reference_counter.hpp>

Public Member Functions

 ReferenceCounter (T *const referenceCounter) noexcept
 increments f_referenceCounter if f_referenceCounter != nullptr More...
 
 ReferenceCounter (const ReferenceCounter &rhs) noexcept
 copy constructor, increments the rhs managed reference counter if it is != nullptr
 
 ReferenceCounter (ReferenceCounter &&f_rhs) noexcept
 move constructor, takes over the f_rhs managed reference counter
 
 ~ReferenceCounter () noexcept
 decrements f_referenceCounter if f_referenceCounter != nullptr
 
ReferenceCounteroperator= (const ReferenceCounter &rhs) noexcept
 copy assignment, increments the rhs managed reference counter if it is != nullptr
 
ReferenceCounteroperator= (ReferenceCounter &&rhs) noexcept
 move assignment
 
getValue () const noexcept
 returns the current value of the reference counter
 

Detailed Description

template<typename T>
class iox::cxx::ReferenceCounter< T >

reference counter abstraction for the usage in constructs like a shared_ptr. A pointer to a memory position where the reference counter is stored is put into the constructor and then this object performs reference counting on it.

Constructor & Destructor Documentation

◆ ReferenceCounter()

template<typename T >
iox::cxx::ReferenceCounter< T >::ReferenceCounter ( T *const  referenceCounter)
inlinenoexcept

increments f_referenceCounter if f_referenceCounter != nullptr

Parameters
[in]referenceCounterpointer to the underlying number where the reference count is stored

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