mcrl2::utilities::shared_reference_counted =============================================================================== Include file: .. code-block:: c++ #include "mcrl2/utilities/shared_reference.h .. cpp:class:: mcrl2::utilities::shared_reference_counted Stores a reference count that can be incremented and decremented. The template variable is such that reference_count_changes corresponds to the amount of times the reference count of type T changed. Protected types ------------------------------------------------------------------------------- .. cpp:type:: mcrl2::utilities::shared_reference_counted::SizeType typedef for :cpp:type:`typename std::conditional\< ThreadSafe, std::atomic\< std::size_t >, std::size_t >::type` Protected attributes ------------------------------------------------------------------------------- .. cpp:member:: SizeType mcrl2::utilities::shared_reference_counted::m_reference_count Public member functions ------------------------------------------------------------------------------- .. cpp:function:: void decrement_reference_count() const Decrement the reference count by one. .. cpp:function:: void increment_reference_count() const Increment the reference count by one. .. cpp:function:: std::size_t reference_count() const Obtain the reference count. .. cpp:function:: shared_reference_counted() Public static member functions ------------------------------------------------------------------------------- .. cpp:function:: static void count_reference_count_changes() Increment the number of reference count changes. .. cpp:function:: static std::atomic& reference_count_changes() Obtain the number of times that this reference count has changed.