|
Bifrost SDK
Bifrost SDK documentation
|
Class managing (with unique ownership) a concrete ITaskObserver. More...
#include <TaskObserver.h>
Public Member Functions | |
| AMINO_CORE_SHARED_DECL | TaskObserver () noexcept |
| Default constructor (constructs a noop observer). More... | |
| AMINO_CORE_SHARED_DECL | TaskObserver (TaskObserver &&) noexcept |
| Move constructor. More... | |
| AMINO_CORE_SHARED_DECL TaskObserver & | operator= (TaskObserver &&o) noexcept |
| Move assignment operator. More... | |
| AMINO_CORE_SHARED_DECL | ~TaskObserver () |
| Destructor. More... | |
| TaskNotifier | getNotifier () const |
| Create and return a notifier associated with this observer. More... | |
| AMINO_CORE_SHARED_DECL bool | isInUse () const |
| Whether this TaskObserver has a TaskNotifier in use. More... | |
| AMINO_CORE_SHARED_DECL void | reset () noexcept |
| Reset the observer to a noop observer. More... | |
| TaskObserver (TaskObserver const &)=delete | |
| TaskObserver is not copy-constructible. More... | |
| TaskObserver & | operator= (TaskObserver const &)=delete |
| TaskObserver is not copy-assignable. More... | |
| AMINO_CORE_SHARED_DECL bool | isValid () const |
| Whether this observer is valid (wraps a concrete non-null ITaskObserver). More... | |
| operator bool () const | |
| Whether this observer is valid (wraps a concrete non-null ITaskObserver). More... | |
Static Public Member Functions | |
| template<typename T , typename... Args> | |
| static TaskObserverT< T > | make (Args &&... args) |
Create a new concrete task observer of type T. More... | |
Class managing (with unique ownership) a concrete ITaskObserver.
This class is intented to be kept on the "client" side and uniquely manages the life-scope of a ITaskObserver. Computation tasks on the other hand will take a TaskNotifier (which only references the ITaskObserver (non-owning)) to report progress. The "client" side may destroy the TaskObserver managed at any time, in which case the notifications will just stop being sent. The destruction may block until current callback call (from the TaskNotifier) is complete (if any).
Definition at line 143 of file TaskObserver.h.
|
noexcept |
Default constructor (constructs a noop observer).
|
noexcept |
Move constructor.
| AMINO_CORE_SHARED_DECL Amino::TaskObserver::~TaskObserver | ( | ) |
Destructor.
|
delete |
TaskObserver is not copy-constructible.
|
inline |
Create and return a notifier associated with this observer.
Definition at line 546 of file TaskObserver.h.
| AMINO_CORE_SHARED_DECL bool Amino::TaskObserver::isInUse | ( | ) | const |
Whether this TaskObserver has a TaskNotifier in use.
TaskObserver can only have one TaskNotifier in use at a time.
| AMINO_CORE_SHARED_DECL bool Amino::TaskObserver::isValid | ( | ) | const |
Whether this observer is valid (wraps a concrete non-null ITaskObserver).
|
inlinestatic |
Create a new concrete task observer of type T.
Forwards the arguments to the constructor of T.
T. Definition at line 536 of file TaskObserver.h.
|
inlineexplicit |
Whether this observer is valid (wraps a concrete non-null ITaskObserver).
Definition at line 183 of file TaskObserver.h.
|
noexcept |
Move assignment operator.
Referenced by Amino::TaskObserverT< T >::operator=().
|
delete |
TaskObserver is not copy-assignable.
|
noexcept |
Reset the observer to a noop observer.