RxCpp
The Reactive Extensions for Native (RxCpp) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in both C and C++.
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
rxcpp::schedulers::schedulable Class Reference

#include <rx-scheduler.hpp>

Inheritance diagram for rxcpp::schedulers::schedulable:
Inheritance graph
[legend]
Collaboration diagram for rxcpp::schedulers::schedulable:
Collaboration graph
[legend]

Public Types

typedef composite_subscription::weak_subscription weak_subscription
 
typedef scheduler_base::clock_type clock_type
 
- Public Types inherited from rxcpp::schedulers::schedulable_base
typedef tag_schedulable schedulable_tag
 
- Public Types inherited from rxcpp::schedulers::worker_base
typedef tag_worker worker_tag
 
- Public Types inherited from rxcpp::subscription_base
typedef tag_subscription subscription_tag
 
- Public Types inherited from rxcpp::schedulers::action_base
typedef tag_action action_tag
 

Public Member Functions

 ~schedulable ()
 
 schedulable ()
 
 schedulable (worker q, action a)
 action and worker share lifetime More...
 
 schedulable (composite_subscription cs, worker q, action a)
 action and worker have independent lifetimes More...
 
 schedulable (schedulable scbl, worker q, action a)
 inherit lifetimes More...
 
const composite_subscriptionget_subscription () const
 
composite_subscriptionget_subscription ()
 
const worker get_worker () const
 
worker get_worker ()
 
const actionget_action () const
 
actionget_action ()
 
auto set_recursed (const recurse &r) const -> decltype(recursed_scope.reset(r))
 
bool is_recursed () const
 
void operator() () const
 
bool is_subscribed () const
 
weak_subscription add (subscription s) const
 
template<class F >
auto add (F f) const -> typename std::enable_if< rxcpp::detail::is_unsubscribe_function< F >::value, weak_subscription >::type
 
void remove (weak_subscription w) const
 
void clear () const
 
void unsubscribe () const
 
clock_type::time_point now () const
 
void schedule () const
 put this on the queue of the stored scheduler to run asap More...
 
void schedule (clock_type::time_point when) const
 put this on the queue of the stored scheduler to run at the specified time More...
 
void schedule (clock_type::duration when) const
 put this on the queue of the stored scheduler to run after a delay from now More...
 
void operator() (const recurse &r) const
 invokes the action More...
 

Static Public Member Functions

static schedulable empty (worker sc)
 

Member Typedef Documentation

Constructor & Destructor Documentation

rxcpp::schedulers::schedulable::~schedulable ( )
inline
rxcpp::schedulers::schedulable::schedulable ( )
inline
rxcpp::schedulers::schedulable::schedulable ( worker  q,
action  a 
)
inline

action and worker share lifetime

rxcpp::schedulers::schedulable::schedulable ( composite_subscription  cs,
worker  q,
action  a 
)
inline

action and worker have independent lifetimes

rxcpp::schedulers::schedulable::schedulable ( schedulable  scbl,
worker  q,
action  a 
)
inline

inherit lifetimes

Member Function Documentation

weak_subscription rxcpp::schedulers::schedulable::add ( subscription  s) const
inline
template<class F >
auto rxcpp::schedulers::schedulable::add ( f) const -> typename std::enable_if<rxcpp::detail::is_unsubscribe_function<F>::value, weak_subscription>::type
inline
void rxcpp::schedulers::schedulable::clear ( ) const
inline
static schedulable rxcpp::schedulers::schedulable::empty ( worker  sc)
inlinestatic
const action& rxcpp::schedulers::schedulable::get_action ( ) const
inline
action& rxcpp::schedulers::schedulable::get_action ( )
inline
const composite_subscription& rxcpp::schedulers::schedulable::get_subscription ( ) const
inline
composite_subscription& rxcpp::schedulers::schedulable::get_subscription ( )
inline
const worker rxcpp::schedulers::schedulable::get_worker ( ) const
inline
worker rxcpp::schedulers::schedulable::get_worker ( )
inline
bool rxcpp::schedulers::schedulable::is_recursed ( ) const
inline
bool rxcpp::schedulers::schedulable::is_subscribed ( ) const
inline
clock_type::time_point rxcpp::schedulers::schedulable::now ( ) const
inline
void rxcpp::schedulers::schedulable::operator() ( ) const
inline

requests tail-recursion of the same action this will exit the process if called when is_recursed() is false. Note: to improve perf it is not required to call is_recursed() before calling this operator. Context is sufficient. The schedulable passed to the action by the scheduler will return true from is_recursed()

void rxcpp::schedulers::schedulable::operator() ( const recurse r) const
inline

invokes the action

void rxcpp::schedulers::schedulable::remove ( weak_subscription  w) const
inline
void rxcpp::schedulers::schedulable::schedule ( ) const
inline

put this on the queue of the stored scheduler to run asap

void rxcpp::schedulers::schedulable::schedule ( clock_type::time_point  when) const
inline

put this on the queue of the stored scheduler to run at the specified time

void rxcpp::schedulers::schedulable::schedule ( clock_type::duration  when) const
inline

put this on the queue of the stored scheduler to run after a delay from now

auto rxcpp::schedulers::schedulable::set_recursed ( const recurse r) const -> decltype(recursed_scope.reset(r))
inline
void rxcpp::schedulers::schedulable::unsubscribe ( ) const
inline

The documentation for this class was generated from the following file: