CppCMS
Classes | Public Types | Public Member Functions | List of all members
booster::callback< Result(Params...)> Class Template Reference

This is Booster's implementation of std::tr1::callback/booster::callback. More...

#include <booster/booster/callback.h>

Classes

struct  callable_impl
 
struct  callable_impl< void, F >
 

Public Types

typedef Result result_type
 
typedef callable< Result(Params...)> callable_type
 
typedef intrusive_ptr< callable_typepointer_type
 

Public Member Functions

 callback ()
 
template<typename Call >
 callback (intrusive_ptr< Call > c)
 
template<typename Call >
 callback (std::unique_ptr< Call > ptr)
 
template<typename Call >
callback const & operator= (intrusive_ptr< Call > c)
 
template<typename Call >
callback const & operator= (std::unique_ptr< Call > c)
 
template<typename F >
 callback (F func)
 
 callback (callback const &other)
 
 callback (callback &&other)
 
template<typename F >
callback const & operator= (F func)
 
callbackoperator= (callback &&other)
 
callback const & operator= (callback const &other)
 
Result operator() (Params...args) const
 
bool empty () const
 
 operator bool () const
 
void swap (callback &other)
 
pointer_type const & get_pointer () const
 
pointer_typeget_pointer ()
 

Detailed Description

template<typename Result, typename... Params>
class booster::callback< Result(Params...)>

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:

Member Typedef Documentation

template<typename Result , typename... Params>
typedef intrusive_ptr<callable_type> booster::callback< Result(Params...)>::pointer_type

Pointer to callable object

New in CppCMS 1.2

Constructor & Destructor Documentation

template<typename Result , typename... Params>
booster::callback< Result(Params...)>::callback ( )
inline

Default constructor, creates an empty callbacks

Member Function Documentation

template<typename Result , typename... Params>
bool booster::callback< Result(Params...)>::empty ( ) const
inline

Return true if the callback is empty

template<typename Result , typename... Params>
booster::callback< Result(Params...)>::operator bool ( ) const
inline

Returns true if the callback is not empty


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