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 Types

enum [anonymous]

Values:

enumerator kInvalidStamp

Public Functions

SyncStamp() noexcept = default

Constructor.

inline SyncStamp(Stamp id) noexcept

Construct in sync with given stamp.

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 bool inSync(const SyncStamp &syncStamp) const noexcept

Check if two sync stamp are in sync.

inline void sync(const Stamp &id) noexcept

Synchronize this instance with given stamp.

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 Stamp toStamp() const noexcept

Explicit call to convert to Stamp class.

inline std::string toString() const noexcept

Convert to string for debugging.