|
DUDS
|
Distributed Update of Data from Something
|
A weak reference to a Something object. More...
#include <SomethingRef.hpp>
Public Member Functions | |
| SomethingWeakRef ()=default | |
| Makes an uninitalized reference to nothing. More... | |
| SomethingWeakRef (const SomethingRef &)=default | |
| The default copy constructor. More... | |
| SomethingWeakRef (const weak_ptr< ST > &s) | |
| Makes a new reference to Something from a weak pointer. More... | |
| SomethingWeakRef (const shared_ptr< ST > &s) | |
| Makes a new reference to Something from a shared pointer. More... | |
| bool | expired () const noexcept |
| Tells if the weak pointer to Something has expired. More... | |
| shared_ptr< ST > | lock () const noexcept |
| Attempts to obtain a shared pointer to the referenced Something. More... | |
| template<class S > | |
| bool | operator!= (const S &s) const |
| Something objects are compared using their UUID. More... | |
| template<class S > | |
| bool | operator< (const S &s) const |
| Something objects are compared using their UUID. More... | |
| template<class S > | |
| bool | operator<= (const S &s) const |
| Something objects are compared using their UUID. More... | |
| template<class S > | |
| bool | operator== (const S &s) const |
| Something objects are compared using their UUID. More... | |
| template<class S > | |
| bool | operator> (const S &s) const |
| Something objects are compared using their UUID. More... | |
| template<class S > | |
| bool | operator>= (const S &s) const |
| Something objects are compared using their UUID. More... | |
| void | reset () noexcept |
| Loses the reference to Something. More... | |
| const boost::uuids::uuid & | uuid () const |
| Returns the object's unique identifier. More... | |
| const weak_ptr< ST > | weak () const |
| Returns the weak pointer to Something. More... | |
Private Attributes | |
| boost::uuids::uuid | someId |
| A unique identifier for Something that is valid across all peers. More... | |
| weak_ptr< ST > | wp |
| A weak pointer to a Something. More... | |
A weak reference to a Something object.
This object has its own copy of the Something's UUID and can be compared with Something and SomethingRef objects based on the UUID without accessing the referenced Something. This allows for containers that hold sets of sorted Something objects without managing the memory or lifespan of the objects.
Definition at line 39 of file SomethingRef.hpp.
|
default |
Makes an uninitalized reference to nothing.
|
default |
The default copy constructor.
|
inline |
Makes a new reference to Something from a weak pointer.
| s | The weak pointer to Something. |
| err? | The provided weak pointer cannot produce a shared pointer. |
Definition at line 63 of file SomethingRef.hpp.
|
inline |
Makes a new reference to Something from a shared pointer.
| s | The shared pointer to Something. |
| err? | The provided shared pointer points to nothing. |
Definition at line 77 of file SomethingRef.hpp.
|
inlinenoexcept |
Tells if the weak pointer to Something has expired.
Definition at line 99 of file SomethingRef.hpp.
|
inlinenoexcept |
Attempts to obtain a shared pointer to the referenced Something.
Definition at line 107 of file SomethingRef.hpp.
|
inline |
Something objects are compared using their UUID.
Definition at line 158 of file SomethingRef.hpp.
|
inline |
Something objects are compared using their UUID.
Definition at line 123 of file SomethingRef.hpp.
|
inline |
Something objects are compared using their UUID.
Definition at line 137 of file SomethingRef.hpp.
|
inline |
Something objects are compared using their UUID.
Definition at line 151 of file SomethingRef.hpp.
|
inline |
Something objects are compared using their UUID.
Definition at line 130 of file SomethingRef.hpp.
|
inline |
Something objects are compared using their UUID.
Definition at line 144 of file SomethingRef.hpp.
|
inlinenoexcept |
Loses the reference to Something.
Definition at line 115 of file SomethingRef.hpp.
|
inline |
Returns the object's unique identifier.
Definition at line 87 of file SomethingRef.hpp.
|
inline |
Returns the weak pointer to Something.
Definition at line 93 of file SomethingRef.hpp.
|
private |
A unique identifier for Something that is valid across all peers.
Definition at line 43 of file SomethingRef.hpp.
Referenced by duds::SomethingRef< ST >::reset(), and duds::SomethingWeakRef< ST >::uuid().
|
private |
A weak pointer to a Something.
Definition at line 47 of file SomethingRef.hpp.
Referenced by duds::SomethingWeakRef< ST >::weak().