SObjectizer  5.5
Public Member Functions | Private Attributes | List of all members
so_5::atomic_refcounted_t Class Reference

The base class for the object with a reference counting. More...

#include <atomic_refcounted.hpp>

Inheritance diagram for so_5::atomic_refcounted_t:
so_5::abstract_message_box_t so_5::agent_t so_5::coop_dereg_notificators_container_t so_5::coop_reg_notificators_container_t so_5::disp::adv_thread_pool::impl::agent_queue_t so_5::disp::reuse::thread_pool_stats::queue_description_holder_t so_5::disp::thread_pool::impl::agent_queue_t so_5::impl::mbox_core_t so_5::message_t so_5::msg_tracing::filter_t so_5::timer_t

Public Member Functions

 atomic_refcounted_t (const atomic_refcounted_t &)=delete
 
atomic_refcounted_toperator= (const atomic_refcounted_t &)=delete
 
 atomic_refcounted_t () noexcept
 Default constructor. More...
 
 ~atomic_refcounted_t () noexcept=default
 Destructor. More...
 
void inc_ref_count () noexcept
 Increments reference count. More...
 
unsigned long dec_ref_count () noexcept
 Decrement reference count. More...
 

Private Attributes

atomic_counter_t m_ref_counter
 Object reference count. More...
 

Detailed Description

The base class for the object with a reference counting.

Should be used as a base class. The smart reference for such objects should be defined for derived classes (for example agent_ref_t).

Constructor & Destructor Documentation

◆ atomic_refcounted_t() [1/2]

so_5::atomic_refcounted_t::atomic_refcounted_t ( const atomic_refcounted_t )
delete

Disabled.

◆ atomic_refcounted_t() [2/2]

so_5::atomic_refcounted_t::atomic_refcounted_t ( )
inlinenoexcept

Default constructor.

Sets reference counter to 0.

◆ ~atomic_refcounted_t()

so_5::atomic_refcounted_t::~atomic_refcounted_t ( )
defaultnoexcept

Destructor.

Do nothing.

Member Function Documentation

◆ dec_ref_count()

unsigned long so_5::atomic_refcounted_t::dec_ref_count ( )
inlinenoexcept

Decrement reference count.

Returns
Value of reference counter after decrement.

◆ inc_ref_count()

void so_5::atomic_refcounted_t::inc_ref_count ( )
inlinenoexcept

Increments reference count.

◆ operator=()

atomic_refcounted_t& so_5::atomic_refcounted_t::operator= ( const atomic_refcounted_t )
delete

Disabled.

Member Data Documentation

◆ m_ref_counter

atomic_counter_t so_5::atomic_refcounted_t::m_ref_counter
private

Object reference count.


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