CppCMS
|
This is Booster's implementation of std::tr1::callback/booster::callback. More...
#include <booster/booster/callback.h>
Public Types | |
typedef Result | result_type |
Public Member Functions | |
callback () | |
template<typename F > | |
callback (F func) | |
callback (callback const &other) | |
template<typename F > | |
callback const & | operator= (F func) |
callback const & | operator= (callback const &other) |
result_type | operator() (Params...params) const |
bool | empty () const |
operator bool () const | |
void | swap (callback &other) |
This is Booster's implementation of std::tr1::callback/booster::callback.
This callback is created from generic object that can be "called" i.e. a class with operator() or callback pointer that has same signature as the callback.
See: http://www.boost.org/doc/html/function.html
Notes:
typedef Result booster::callback< Result(Params...)>::result_type |
Type of result, for use with boost::bind
booster::callback< Result(Params...)>::callback | ( | ) |
Default constructor, creates an empty callbacks
booster::callback< Result(Params...)>::callback | ( | F | func | ) |
Creates a callback from a callbackal func of type F. func should be copyable. It is copied and stored inside callback object.
booster::callback< Result(Params...)>::callback | ( | callback< Result(Params...)> const & | other | ) |
Copy callback, Copies underlying callbackal object.
bool booster::callback< Result(Params...)>::empty | ( | ) | const |
Return true if the callback is empty
booster::callback< Result(Params...)>::operator bool | ( | ) | const |
Returns true if the callback is not empty
result_type booster::callback< Result(Params...)>::operator() | ( | Params... | params | ) | const |
Calls underling callbackal object. If the callback is empty, throws bad_callback_call.
callback const& booster::callback< Result(Params...)>::operator= | ( | F | func | ) |
Assign a callbackal func of type F. func should be copyable. It is copied and stored inside callback object.
callback const& booster::callback< Result(Params...)>::operator= | ( | callback< Result(Params...)> const & | other | ) |
Assignment operator. Copies underlying callbackal object.
void booster::callback< Result(Params...)>::swap | ( | callback< Result(Params...)> & | other | ) |
Swaps two callbackal object. Does not throw.