Template Struct subtask< ActivityT >¶
Defined in File activities.h
Struct Documentation¶
-
template<typename
ActivityT>
structudho::activities::subtask<ActivityT>¶ Spetialization for the root subtask in the task graph
- Template Parameters
ActivityT: The activity
Public Functions
-
std::shared_ptr<activity_type>
activity()¶
-
template<typename
V, typename ...DependenciesV>
self_type &done(subtask<V, DependenciesV...> &next)¶ execute task next after the current one
- Parameters
next: the next subtask
-
template<typename ...
U>
voidoperator()(U&&... u)¶ calls the
operator()()of the activity and starts executing the graph
-
self_type &
required(bool flag)¶ Set required flag on or off. If a required subtask fails then all intermediate subtask that depend on it fails and the final callback is called immediately. By default all subtasks are required
-
self_type &
cancel_if(typename activity_type::cancel_if_ftor cancelor)¶ Force cancelation of the activity even after it is successful to stop propagating to the next activities
- Parameters
f: callback which should return true to signal cancelation
-
std::shared_ptr<activity_type>
operator->()¶ returns the shared pointer to the actiivity
-
template<typename
FunctionT>
self_type &if_errored(FunctionT ftor)¶ abort if canceled if ftor returns false. f will be called with the success if it has been canceled due to error
Public Static Functions
-
template<typename
CollectorT, typename ...U>
self_typewith(CollectorT collector, U&&... u)¶ Arguments for the constructor of the Activity
Friends
- friend struct subtask