SPAOP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
lowrappers::GenericServerThreadListener< T > Class Template Reference

A generic functor class for the ServerThread::Listener interface. More...

#include <GenericServerThreadListener.h>

Inheritance diagram for lowrappers::GenericServerThreadListener< T >:
Inheritance graph
[legend]
Collaboration diagram for lowrappers::GenericServerThreadListener< T >:
Collaboration graph
[legend]

Public Types

typedef int(T::* fpType )(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)
 The type of function pointer that can be passed to the constructor. More...
 

Public Member Functions

 GenericServerThreadListener (T &object, fpType fp)
 Constructor. More...
 
virtual ~GenericServerThreadListener ()
 Destructor. More...
 
virtual int callback (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)
 The callback method that will be called from the ServerThread. More...
 
- Public Member Functions inherited from lowrappers::ServerThread::Listener
virtual ~Listener ()
 

Detailed Description

template<class T>
class lowrappers::GenericServerThreadListener< T >

A generic functor class for the ServerThread::Listener interface.

See Also
lowrappers::ListenerMaker for a convenient way to use it.

Member Typedef Documentation

template<class T>
typedef int(T::* lowrappers::GenericServerThreadListener< T >::fpType)(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg)

The type of function pointer that can be passed to the constructor.

Constructor & Destructor Documentation

template<class T>
lowrappers::GenericServerThreadListener< T >::GenericServerThreadListener ( T &  object,
fpType  fp 
)
inline

Constructor.

template<class T>
virtual lowrappers::GenericServerThreadListener< T >::~GenericServerThreadListener ( )
inlinevirtual

Destructor.

Member Function Documentation

template<class T>
virtual int lowrappers::GenericServerThreadListener< T >::callback ( const char *  path,
const char *  types,
lo_arg **  argv,
int  argc,
lo_message  msg 
)
inlinevirtual

The callback method that will be called from the ServerThread.

Parameters
pathThe OSC path of the incoming message that triggered the call.
typesThe Liblo-style types string indicating the types of the recieved parameters (e.g. "iii" for three int parameters).
argvThe parameters recieved within the message (whose types will match the types string.
argcThe length of the argv array.
msgThe full message as lo_message.
Returns
0 if the message has been handled and shall not be passed to other callback methods, non-zero if the server shall try passing the message to further matching callback methods.

Implements lowrappers::ServerThread::Listener.