|
AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.5.0
|
Wrapper for callback functions in AMPS. More...
#include <MessageRouter.hpp>
Public Member Functions | |
| Handler () | |
| Null constructor – no function is wrapped. | |
| Handler (Func func_, void *userData_) | |
| Constructor for use with a bare function pointer. More... | |
| Handler (const Handler &orig_) | |
| Copy constructor. More... | |
| template<typename T > | |
| Handler (const T &callback_) | |
| Constructor for use with a standard c++ library function object. More... | |
Wrapper for callback functions in AMPS.
Can be used to bind a function pointer with a void* to use as a callback, or if available, can wrap a std::function<Object> object, so you can supply the return value of std::bind, or even a lambda.
|
inline |
Constructor for use with a bare function pointer.
| func_ | The function pointer to bind. func must be declared:j void myFunction(Object o, void* userData); for example, void myHandler(const Message&m, void *userData); |
| userData_ | a value you'd like passed in when you're called. |
|
inline |
Copy constructor.
| orig_ | The handler to copy |
|
inline |
Constructor for use with a standard c++ library function object.
| callback_ | An object that can be assigned to a std::function |