Template Struct activity

Inheritance Relationships

Base Types

  • public std::enable_shared_from_this< DerivedT >

  • public udho::activities::result< SuccessDataT, FailureDataT > (Template Struct result)

Struct Documentation

template<typename DerivedT, typename SuccessDataT = void, typename FailureDataT = void>
struct udho::activities::activity : public std::enable_shared_from_this<DerivedT>, public udho::activities::result<SuccessDataT, FailureDataT>

An activity A must subclass from activity<A, SuccessA, FailureA> assuming SuccessA and FailureA are the types that contains the relevant information regarding its success or failure. The activity A must overload a no argument operator()() which initiates the activity. After the activity is initiated either success() or failure() methods must be called in order to signal its completion. The activity A must take the collector as the first argument to its constructor, which is passed to the base class activity<A, SuccessA, FailureA>. Hence its prefered to take the first parameter to the constructor as template parameter.

Template Parameters
  • DerivedT: Activity Class

  • SuccessDataT: data associated to the activity if the activity succeeds

  • FailureDataT: data associated to the activity if the activity fails

Public Types

typedef std::shared_ptr<DerivedT> derived_ptr_type

Public Functions

template<typename StoreT>
activity(StoreT &store)
derived_ptr_type self()

shared_ptr to this