#include <backgroundentry.h>
Interface to announce background entries with progress management.
Public Types | |
enum class | STATECHANGE { ACTIVE_ADDED , ACTIVE_REMOVED , HISTORY_ADDED , HISTORY_REMOVED , CANCELDELEGATE_CHANGED } |
Public Member Functions | |
enum maxon::BackgroundProgressInterface::STATECHANGE | MAXON_ENUM_LIST_CLASS (STATECHANGE) |
MAXON_METHOD Result< BackgroundProgressRef > | AddActiveEntry (const String &title, Bool sendToHistory=true) |
MAXON_METHOD Result< void > | RemoveActiveEntry (const BackgroundProgressRef &entry) |
MAXON_METHOD Result< Bool > | GetActiveEntries (const ValueReceiver< const BackgroundProgressRef & > &entry) const |
MAXON_METHOD Int | GetActiveCount () const |
MAXON_METHOD Result< Bool > | GetHistoryEntries (const ValueReceiver< const BackgroundEntryRef & > &entry) const |
MAXON_METHOD Int | GetHistoryCount () const |
MAXON_METHOD Result< void > | RemoveHistoryEntry (const BackgroundEntryRef &entry) |
MAXON_METHOD Result< void > | ClearHistory () |
MAXON_OBSERVABLE (void, ObservableStateChanged,(STATECHANGE state, const BackgroundEntryRef &entry), ObservableCombinerRunAllComponent) | |
MAXON_OBSERVABLE (void, ObservableTotalProgressNotification,(const BackgroundProgressRef &ref, Float percent), ObservableCombinerRunAllComponent) | |
Static Public Member Functions | |
static MAXON_METHOD BackgroundProgressRef | GetMaster () |
Private Member Functions | |
MAXON_INTERFACE (BackgroundProgressInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.backgroundprogress", MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel")) | |
Private Member Functions inherited from BackgroundEntryInterface | |
enum maxon::BackgroundEntryInterface::STATE | MAXON_ENUM_FLAGS_CLASS (STATE) |
MAXON_METHOD String | GetName () const |
MAXON_METHOD UniversalDateTime | GetStartTime () const |
MAXON_METHOD TimeValue | GetDuration () const |
MAXON_METHOD STATE | GetState () |
MAXON_METHOD Result< Bool > | GetStates (const ValueReceiver< STATE, const String & > &state) const |
MAXON_METHOD Int | GetStateCount () const |
MAXON_METHOD Result< void > | AddState (STATE state, const String &message) |
Additional Inherited Members | |
Private Types inherited from BackgroundEntryInterface | |
enum class | STATE { NONE , SUCCEEDED , CANCELED , WARNING , ERROR } |
|
strong |
|
private |
enum maxon::BackgroundProgressInterface::STATECHANGE MAXON_ENUM_LIST_CLASS | ( | STATECHANGE | ) |
|
static |
GetMaster returns the master instance of this implementation. this instance is used to visualize entries in the task manager.
MAXON_METHOD Result<BackgroundProgressRef> AddActiveEntry | ( | const String & | title, |
Bool | sendToHistory = true |
||
) |
AddActiveEntry adds a new active entry to the list. The object is stored only as WeakRef. So you take the ownership. Important: The last reference to the object will remove the object from the active list.
[in] | title | Text with the human readable name of the action. |
[in] | sendToHistory | True if the entry should be moved to the history list after it's done. |
MAXON_METHOD Result<void> RemoveActiveEntry | ( | const BackgroundProgressRef & | entry | ) |
RemoveActiveEntry removes the entry from the active list and moves it to the history. You can use this before the the last reference dies.
[in] | entry | Entry to remove from the active list. |
MAXON_METHOD Result<Bool> GetActiveEntries | ( | const ValueReceiver< const BackgroundProgressRef & > & | entry | ) | const |
MAXON_METHOD Int GetActiveCount | ( | ) | const |
GetActiveCount returns the number of active elements.
MAXON_METHOD Result<Bool> GetHistoryEntries | ( | const ValueReceiver< const BackgroundEntryRef & > & | entry | ) | const |
GetHistoryEntries calls the ValueReceiver for each history entry.
[in] | entry | Delegate which is called for every entry in the list. |
MAXON_METHOD Int GetHistoryCount | ( | ) | const |
GetHistoryCount returns the number of history entries.
MAXON_METHOD Result<void> RemoveHistoryEntry | ( | const BackgroundEntryRef & | entry | ) |
RemoveHistoryEntry removes the given entry from the history
[in] | entry | Entry to remove. |
MAXON_METHOD Result<void> ClearHistory | ( | ) |
ClearHistory removes all history entries.
MAXON_OBSERVABLE | ( | void | , |
ObservableStateChanged | , | ||
(STATECHANGE state, const BackgroundEntryRef &entry) | , | ||
ObservableCombinerRunAllComponent | |||
) |
ObservableStateChanged observable is called if the object adds or removes entries.
MAXON_OBSERVABLE | ( | void | , |
ObservableTotalProgressNotification | , | ||
(const BackgroundProgressRef &ref, Float percent) | , | ||
ObservableCombinerRunAllComponent | |||
) |
ObservableTotalProgressNotification observable is called if the overall progress of one of the elements changed.