SObjectizer  5.8
Loading...
Searching...
No Matches
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::abstract_sink_owner_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::nef_thread_pool::impl::agent_queue_with_preallocated_finish_demand_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.
 
 ~atomic_refcounted_t () noexcept=default
 Destructor.
 
void inc_ref_count () noexcept
 Increments reference count.
 
unsigned long dec_ref_count () noexcept
 Decrement reference count.
 

Private Attributes

atomic_counter_t m_ref_counter
 Object reference count.
 

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).

Definition at line 34 of file atomic_refcounted.hpp.

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.

Definition at line 50 of file atomic_refcounted.hpp.

◆ ~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.

Definition at line 70 of file atomic_refcounted.hpp.

◆ inc_ref_count()

void so_5::atomic_refcounted_t::inc_ref_count ( )
inlinenoexcept

Increments reference count.

Definition at line 60 of file atomic_refcounted.hpp.

◆ 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.

Definition at line 77 of file atomic_refcounted.hpp.


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