Rosetta
|
FunctorSequence is essentially a subroutine-like construct that allow you to call sequence of function one-by-one. It guarantee that the next in line function will be called only after all previous calls has finished. More...
#include <functor.h>
Public Types | |
using | ValueType = FunctorSP |
![]() | |
enum class | State { _none_ , _running_ , _finished_ } |
Signals | |
void | next () |
execute each time when new item starts running More... | |
![]() | |
void | started () |
indicate start of this Functor, emitted only once More... | |
void | tick () |
Might be emitted periodically if Functor have loops. At least one tick() event is guaranteed to happened between start and finish. More... | |
void | finished () |
indicate end of this Functor execution, emitted only once More... | |
void | final () |
last emitted singal, before Functor consider fully done, emitted only once More... | |
Public Member Functions | |
FunctorSequence (QString const &name, std::initializer_list< ValueType > sequence) | |
void | add_functor (ValueType const &v) |
std::pair< int, int > | progress () const override |
Functor (QString const &name, QObject *parent=Q_NULLPTR) | |
![]() | |
Functor (QString const &name, QObject *parent=Q_NULLPTR) | |
State | state () const |
return current state More... | |
bool | is_running () const |
return true if Functor is now executing More... | |
bool | is_finished () const |
return true if Functor is finished More... | |
QString | name () const |
void | execute () |
Private Slots | |
void | run () override |
Private Attributes | |
std::vector< ValueType > | sequence_ |
Additional Inherited Members | |
![]() | |
void | finish () |
change state to finished More... | |
![]() | |
void | state (State state) |
FunctorSequence is essentially a subroutine-like construct that allow you to call sequence of function one-by-one. It guarantee that the next in line function will be called only after all previous calls has finished.
ui::task::FunctorSequence::FunctorSequence | ( | QString const & | name, |
std::initializer_list< ValueType > | sequence | ||
) |
void ui::task::FunctorSequence::add_functor | ( | ValueType const & | v | ) |
References sequence_, and kmeans_adaptive_kernel_density_bb_dependent_rotlib::v.
|
inline |
|
signal |
execute each time when new item starts running
Referenced by run().
|
overridevirtual |
Reimplemented from ui::task::Functor.
References create_a3b_hbs::f, ui::task::Functor::is_finished(), ui::task::Functor::is_running(), create_a3b_hbs::r, sequence_, and predPRE::t.
Referenced by job_manager.CommandRunner::poll().
|
overrideprivateslot |
|
private |
Referenced by add_functor(), progress(), and run().