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

An atomic counter class that actually does nothing, doesn't count at all. More...

#include <atomic_counter.hpp>

Inheritance diagram for jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::noop_atomic_ctr_base< V, LkT >:
[legend]
Collaboration diagram for jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::noop_atomic_ctr_base< V, LkT >:
[legend]

Public Types

typedef sp_counter_itf_type< V > base_t
 
typedef LkT lock_traits
 
typedef lock_traits::recursive_critical_section_type atomic_t
 
typedef base_t::value_type value_type
 
- Public Types inherited from jmmcg::LIBJMMCG_VER_NAMESPACE::sp_counter_itf_type< V >
typedef V 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

constexpr noop_atomic_ctr_base () noexcept(true)=default
 
value_type sp_count () const noexcept(true) override __attribute__((const))
 
constexpr value_type get () const noexcept(true) __attribute__((const))
 
bool sp_noop_ctr () const noexcept(true) override __attribute__((const))
 
bool __fastcall operator< (const value_type) const noexcept(true) override __attribute__((const))
 
bool __fastcall operator> (const value_type) const noexcept(true) override __attribute__((const))
 
bool __fastcall operator>= (const value_type) const noexcept(true) override __attribute__((const))
 
value_type __fastcall FORCE_INLINE operator++ () noexcept(true)
 
value_type __fastcall FORCE_INLINE operator-- () noexcept(true)
 
- Public Member Functions inherited from jmmcg::LIBJMMCG_VER_NAMESPACE::sp_counter_itf_type< V >
virtual ~sp_counter_itf_type ()
 
virtual value_type sp_acquire () noexcept(true)
 
virtual bool sp_release () 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)
 

Static Public Attributes

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

Additional Inherited Members

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

Detailed Description

template<class V, class LkT>
class jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::noop_atomic_ctr_base< V, LkT >

An atomic counter class that actually does nothing, doesn't count at all.

Note that this class is a valid value-type.

Definition at line 548 of file atomic_counter.hpp.

Member Typedef Documentation

◆ atomic_t

template<class V , class LkT >
typedef lock_traits::recursive_critical_section_type jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::noop_atomic_ctr_base< V, LkT >::atomic_t

Definition at line 552 of file atomic_counter.hpp.

◆ base_t

template<class V , class LkT >
typedef sp_counter_itf_type<V> jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::noop_atomic_ctr_base< V, LkT >::base_t

Definition at line 550 of file atomic_counter.hpp.

◆ lock_traits

template<class V , class LkT >
typedef LkT jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::noop_atomic_ctr_base< V, LkT >::lock_traits

Definition at line 551 of file atomic_counter.hpp.

◆ value_type

Definition at line 553 of file atomic_counter.hpp.

Constructor & Destructor Documentation

◆ noop_atomic_ctr_base()

template<class V , class LkT >
constexpr jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::noop_atomic_ctr_base< V, LkT >::noop_atomic_ctr_base ( )
constexprdefaultnoexcept

Member Function Documentation

◆ get()

template<class V , class LkT >
constexpr value_type jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::noop_atomic_ctr_base< V, LkT >::get ( ) const
inlineconstexprnoexcept

Definition at line 565 of file atomic_counter.hpp.

◆ operator++()

template<class V , class LkT >
value_type __fastcall FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::noop_atomic_ctr_base< V, LkT >::operator++ ( )
inlinenoexcept

Definition at line 582 of file atomic_counter.hpp.

◆ operator--()

template<class V , class LkT >
value_type __fastcall FORCE_INLINE jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::noop_atomic_ctr_base< V, LkT >::operator-- ( )
inlinenoexcept

Definition at line 585 of file atomic_counter.hpp.

◆ operator<()

template<class V , class LkT >
bool __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::noop_atomic_ctr_base< V, LkT >::operator< ( const  value_type) const
inlineoverridevirtualnoexcept

Reimplemented from jmmcg::LIBJMMCG_VER_NAMESPACE::sp_counter_itf_type< V >.

Definition at line 572 of file atomic_counter.hpp.

◆ operator>()

template<class V , class LkT >
bool __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::noop_atomic_ctr_base< V, LkT >::operator> ( const  value_type) const
inlineoverridevirtualnoexcept

Reimplemented from jmmcg::LIBJMMCG_VER_NAMESPACE::sp_counter_itf_type< V >.

Definition at line 575 of file atomic_counter.hpp.

◆ operator>=()

template<class V , class LkT >
bool __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::noop_atomic_ctr_base< V, LkT >::operator>= ( const  value_type) const
inlineoverridevirtualnoexcept

Reimplemented from jmmcg::LIBJMMCG_VER_NAMESPACE::sp_counter_itf_type< V >.

Definition at line 578 of file atomic_counter.hpp.

◆ sp_count()

template<class V , class LkT >
value_type jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::noop_atomic_ctr_base< V, LkT >::sp_count ( ) const
inlineoverridevirtualnoexcept

Reimplemented from jmmcg::LIBJMMCG_VER_NAMESPACE::sp_counter_itf_type< V >.

Definition at line 562 of file atomic_counter.hpp.

◆ sp_noop_ctr()

template<class V , class LkT >
bool jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::noop_atomic_ctr_base< V, LkT >::sp_noop_ctr ( ) const
inlineoverridevirtualnoexcept

This is a hack: we could use a dynamic_cast to check this, but in GCC dynamic_casts involve strcmps which may be slowish, so use a virtual thunk instead, which should be faster.

Reimplemented from jmmcg::LIBJMMCG_VER_NAMESPACE::sp_counter_itf_type< V >.

Definition at line 568 of file atomic_counter.hpp.

Member Data Documentation

◆ memory_access_mode

To assist in allowing compile-time computation of the algorithmic order of the threading model.

Definition at line 558 of file atomic_counter.hpp.


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