4#ifndef _Stroika_Foundation_Execution_ProgressMonitor_h_
5#define _Stroika_Foundation_Execution_ProgressMonitor_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
12#include "Stroika/Foundation/Common/Common.h"
13#include "Stroika/Foundation/Containers/Sequence.h"
110 using ProgressRangeType = float;
183 nonvirtual
void Cancel ();
200 nonvirtual
operator Updater ();
220 shared_ptr<Rep_> fRep_;
244 nonvirtual
bool operator== (
const CurrentTaskInfo& rhs)
const =
default;
273 Updater (
const Updater& parentTask, ProgressRangeType fromProg, ProgressRangeType toProg,
bool restoreTaskInfoOnDTOR =
true);
275 bool restoreTaskInfoOnDTOR =
true);
278 Updater (
const shared_ptr<Rep_>& r);
284 bool operator== (
const nullptr_t)
const
286 return fRep_ ==
nullptr;
314 [[deprecated (
"Since Stroika v3.0d5 - SetProgress is cancelation point")]]
void SetCurrentProgressAndThrowIfCanceled (ProgressRangeType currentProgress);
325 nonvirtual
void CallNotifyProgress_ () const noexcept;
328 shared_ptr<Rep_> fRep_;
329 ProgressRangeType fFromProg_{0.0};
330 ProgressRangeType fToProg_{1.0};
331 optional<CurrentTaskInfo> fRestoreTaskInfo_;
338 template <
typename T>
348#include "ProgressMonitor.inl"
String is like std::u32string, except it is much easier to use, often much more space efficient,...
Simple variant-value (case variant union) object, with (variant) basic types analogous to a value in ...
nonvirtual void ThrowIfCanceled()
nonvirtual void SetProgress(ProgressRangeType p)
nonvirtual CurrentTaskInfo GetCurrentTaskInfo() const
nonvirtual ProgressRangeType GetProgress() const
nonvirtual void AddOnProgressCallback(const ChangedCallbackType &progressChangedCallback)
Thread::Ptr is a (unsynchronized) smart pointer referencing an internally synchronized std::thread ob...
Iterable<T> is a base class for containers which easily produce an Iterator<T> to traverse them.
Streams::InputStream::Ptr< T > MakeInputStreamWithProgress(const Streams::InputStream::Ptr< T > &in, ProgressMonitor::Updater progress)