omni::graph::exec::unstable::SyncStamp
Defined in omni/graph/exec/unstable/Stamp.h
-
class SyncStamp
Watcher of a mutating resource. Observes a resources Stamp and detects if it has changed.
Used always in pair with Stamp class to detect changes in a resource. See Stamp’s docs for an explanation on how this object is used during invalidation.
This object is ABI-safe and can be passed by pointer or value through the ABI. However, it is more common to pass Stamp through the ABI rather than this object.
Public Functions
-
SyncStamp() noexcept = default
Constructor.
-
inline bool inSync(const Stamp &id) const noexcept
Check if two classes are in sync. Always return false if this instance is having invalid stamp stored.
-
inline void sync(const SyncStamp &syncStamp) noexcept
Synchronize this instance with given sync stamp.
-
inline bool makeSync(const Stamp &id) noexcept
In one call test and synchronize the stamp. After this call this instance is guaranteed to be in sync with given id.
- Returns
False if stamps were in sync and true otherwise.
-
inline bool isValid() const noexcept
Is this sync stamp valid.
-
inline void invalidate() noexcept
Invalidate stored stamp.
-
inline std::string toString() const noexcept
Convert to string for debugging.
-
SyncStamp() noexcept = default