SPAOP
|
A namespace for C++ wrappers for the Liblo library. More...
Classes | |
class | Address |
A wrapper for Liblo's lo_address. More... | |
class | GenericServerThreadListener |
A generic functor class for the ServerThread::Listener interface. More... | |
class | Message |
A wrapper of Liblo's lo_message. More... | |
class | ServerThread |
A server thread with Liblo-style callback capabilities. More... | |
Functions | |
template<class T > | |
ServerThread::Listener * | ListenerMaker (T &object, int(T::*fp)(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)) |
A function that conveniently wraps up a GenericServerThreadListener. More... | |
A namespace for C++ wrappers for the Liblo library.
Liblo is a library for sending and receiving OSC messages.
ServerThread::Listener* lowrappers::ListenerMaker | ( | T & | object, |
int(T::*)(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg) | fp | ||
) |
A function that conveniently wraps up a GenericServerThreadListener.
For example, let's say you have this class:
You can now create a ServerThread::Listener whose callback method calls a Foo instance's bar method like this:
Keep in mind that this creates a (tiny) object that must be deleted when its not needed anymore!
object | The object whose method shall be called as a callback from a ServerThread. |
fp | A function pointer pointing to the method of object that shall be called from a ServerThread. Must match the signature of ServerThread::Listener::callback, i.e. return int and accept parameters (const char*, const char*, lo_arg**, int, lo_message). |