Boost.AFIO    Boost C++ Libraries
Public Member Functions | Protected Member Functions | Protected Attributes
boost::afio::enqueued_task< R()> Class Template Reference
Inheritance diagram for boost::afio::enqueued_task< R()>:
boost::afio::detail::enqueued_task_impl< R >

List of all members.

Public Member Functions

 enqueued_task (std::function< R()> _task=std::function< R()>())
 Default constructor.
void operator() ()
 Invokes the callable, setting the shared stl_future to the value it returns.
bool valid () const noexcept
 Returns true if valid.
void swap (enqueued_task_impl &o) noexcept
 Swaps contents with another instance.
void reset ()
 Resets the contents.
void set_task (std::function< R()> _task)
 Sets the task.
const shared_future< R > & get_future () const
 Returns the shared stl_future corresponding to the stl_future return value of the task.
template<class T >
void set_future_value (T v)
 Sets the shared stl_future corresponding to the stl_future return value of the task.
void set_future_value ()
void set_future_exception (exception_ptr e)
 Sets the shared stl_future corresponding to the stl_future return value of the task.
void disable_auto_set_future (bool v=true)
 Disables the task setting the shared stl_future return value.

Protected Member Functions

void validate () const

Protected Attributes

std::shared_ptr< Privatep

Detailed Description

template<class R>
class boost::afio::enqueued_task< R()>

Definition at line 185 of file afio.hpp.


Constructor & Destructor Documentation

template<class R >
boost::afio::enqueued_task< R()>::enqueued_task ( std::function< R()>  _task = std::function<R()>())

Default constructor.

Definition at line 190 of file afio.hpp.


Member Function Documentation

template<class R >
void boost::afio::enqueued_task< R()>::operator() ( )

Invokes the callable, setting the shared stl_future to the value it returns.

Definition at line 192 of file afio.hpp.

template<class R>
bool boost::afio::detail::enqueued_task_impl< R >::valid ( ) const [inherited]

Returns true if valid.

Definition at line 133 of file afio.hpp.

template<class R>
void boost::afio::detail::enqueued_task_impl< R >::swap ( enqueued_task_impl< R > &  o) [inherited]

Swaps contents with another instance.

Definition at line 135 of file afio.hpp.

template<class R>
void boost::afio::detail::enqueued_task_impl< R >::reset ( ) [inherited]

Resets the contents.

Definition at line 137 of file afio.hpp.

template<class R>
void boost::afio::detail::enqueued_task_impl< R >::set_task ( std::function< R()>  _task) [inherited]

Sets the task.

Definition at line 139 of file afio.hpp.

template<class R>
const shared_future<R>& boost::afio::detail::enqueued_task_impl< R >::get_future ( ) const [inherited]

Returns the shared stl_future corresponding to the stl_future return value of the task.

Definition at line 141 of file afio.hpp.

template<class R>
template<class T >
void boost::afio::detail::enqueued_task_impl< R >::set_future_value ( v) [inherited]

Sets the shared stl_future corresponding to the stl_future return value of the task.

Definition at line 143 of file afio.hpp.

template<class R>
void boost::afio::detail::enqueued_task_impl< R >::set_future_exception ( exception_ptr  e) [inherited]

Sets the shared stl_future corresponding to the stl_future return value of the task.

Definition at line 160 of file afio.hpp.

template<class R>
void boost::afio::detail::enqueued_task_impl< R >::disable_auto_set_future ( bool  v = true) [inherited]

Disables the task setting the shared stl_future return value.

Definition at line 169 of file afio.hpp.


January, 2014

Copyright © 2013-2014 Niall Douglas, Cork, Ireland
Copyright © 2013 Paul Kirth, California
Documentation is generated by Doxygen