libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::intrusive::node_details_itf< LkT > Class Template Reference

Singly-linked intrusive node details. Inherit from this to provide the linkage structure and object-lifetime semantics of the list, which are specifically shared_ptr semantics. More...

#include <intrusive.hpp>

Inheritance diagram for jmmcg::LIBJMMCG_VER_NAMESPACE::intrusive::node_details_itf< LkT >:
[legend]
Collaboration diagram for jmmcg::LIBJMMCG_VER_NAMESPACE::intrusive::node_details_itf< LkT >:
[legend]

Public Types

using base_t = sp_counter_itf_type< long >
 
using lock_traits = LkT
 
using atomic_ctr_t = base_t
 
using atomic_ptr_t = typename lock_traits::template atomic< node_details_itf * >
 
- Public Types inherited from jmmcg::LIBJMMCG_VER_NAMESPACE::sp_counter_itf_type< long >
typedef long value_type
 
typedef default_delete< sp_counter_itf_typedeleter_t
 The default deletion method for objects that inherit from this intrusively-counted type, which is just heap-deletion, if the objects are heap-allocated. More...
 

Public Member Functions

virtual ~node_details_itf () noexcept(true) FORCE_INLINE
 
virtual tstring to_string () const noexcept(false) FORCE_INLINE
 
- Public Member Functions inherited from jmmcg::LIBJMMCG_VER_NAMESPACE::sp_counter_itf_type< long >
virtual ~sp_counter_itf_type ()
 
virtual value_type sp_count () const noexcept(true)
 
virtual value_type sp_acquire () noexcept(true)
 
virtual bool sp_release () noexcept(true)
 
virtual bool sp_noop_ctr () const noexcept(true)
 
virtual bool __fastcall operator< (const value_type) const noexcept(true)
 
virtual bool __fastcall operator> (const value_type) const noexcept(true)
 
virtual bool __fastcall operator>= (const value_type) const noexcept(true)
 
constexpr bool FORCE_INLINE operator== (const value_type v) const noexcept(true)
 
virtual void deleter ()
 Call the correct deleter_t object to delete the object. More...
 
virtual tstring sp_to_string () const noexcept(false)
 

Public Attributes

atomic_ptr_t next
 

Protected Member Functions

 node_details_itf () noexcept(true) FORCE_INLINE
 
- Protected Member Functions inherited from jmmcg::LIBJMMCG_VER_NAMESPACE::sp_counter_itf_type< long >
constexpr sp_counter_itf_type () noexcept(true)
 

Additional Inherited Members

- Static Public Attributes inherited from jmmcg::LIBJMMCG_VER_NAMESPACE::sp_counter_itf_type< long >
static constexpr ppd::generic_traits::memory_access_modes memory_access_mode
 

Detailed Description

template<class LkT>
class jmmcg::LIBJMMCG_VER_NAMESPACE::intrusive::node_details_itf< LkT >

Singly-linked intrusive node details. Inherit from this to provide the linkage structure and object-lifetime semantics of the list, which are specifically shared_ptr semantics.

The use of the shared_ptr is very important: it solves the ABA problem that this implementation would otherwise suffer from.

Definition at line 43 of file intrusive.hpp.

Member Typedef Documentation

◆ atomic_ctr_t

Definition at line 47 of file intrusive.hpp.

◆ atomic_ptr_t

template<class LkT >
using jmmcg::LIBJMMCG_VER_NAMESPACE::intrusive::node_details_itf< LkT >::atomic_ptr_t = typename lock_traits::template atomic<node_details_itf *>

Definition at line 48 of file intrusive.hpp.

◆ base_t

Definition at line 45 of file intrusive.hpp.

◆ lock_traits

Definition at line 46 of file intrusive.hpp.

Constructor & Destructor Documentation

◆ ~node_details_itf()

template<class LkT >
virtual jmmcg::LIBJMMCG_VER_NAMESPACE::intrusive::node_details_itf< LkT >::~node_details_itf ( )
inlinevirtualnoexcept

Definition at line 52 of file intrusive.hpp.

◆ node_details_itf()

Member Function Documentation

◆ to_string()

Member Data Documentation

◆ next


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