mcrl2::utilities::shared_reference =============================================================================== Include file: .. code-block:: c++ #include "mcrl2/utilities/shared_reference.h .. cpp:class:: mcrl2::utilities::shared_reference A reference counted reference to a shared_reference_counted object. Similar to a shared_ptr except that reference counts are only atomic when thread safety is desired and that it stores the reference count in the inherited object. Private attributes ------------------------------------------------------------------------------- .. cpp:member:: utilities::tagged_pointer< T > mcrl2::utilities::shared_reference::m_reference Public member functions ------------------------------------------------------------------------------- .. cpp:function:: bool defined() const Check whether the shared_reference has a valid reference. .. cpp:function:: T* get() const noexcept .. cpp:function:: bool operator!=(const shared_reference< T > &other) const noexcept .. cpp:function:: T& operator*() const noexcept .. cpp:function:: T* operator->() const noexcept .. cpp:function:: bool operator<(const shared_reference< T > &other) const noexcept .. cpp:function:: bool operator<=(const shared_reference< T > &other) const noexcept .. cpp:function:: shared_reference& operator=(const shared_reference< T > &other) noexcept Copy assignment constructor. .. cpp:function:: shared_reference& operator=(shared_reference< T > &&other) noexcept Move assignment constructor. .. cpp:function:: bool operator==(const shared_reference< T > &other) const noexcept .. cpp:function:: bool operator>(const shared_reference< T > &other) const noexcept .. cpp:function:: bool operator>=(const shared_reference &other) const noexcept .. cpp:function:: shared_reference() noexcept The default constructor. .. cpp:function:: shared_reference(const shared_reference< T > &other) noexcept Copy constructor. .. cpp:function:: shared_reference(shared_reference< T > &&other) noexcept Move constructor. .. cpp:function:: shared_reference(T *reference) noexcept Takes ownership of the passed reference, which means that its reference count is incremented. .. cpp:function:: void swap(shared_reference< T > &other) Swaps *this with the other shared reference. Prevents the change of any reference count adaptations .. cpp:function:: void tag() const .. cpp:function:: bool tagged() const noexcept .. cpp:function:: void untag() const .. cpp:function:: ~shared_reference()