libcommonc++  0.7
RunnableClosure< T, A > Class Template Reference

An adapter object similar to RunnableDelegate that additionally takes an arbitrary argument which will be passed to the member function. More...

#include <Runnable.h++>

Inheritance diagram for RunnableClosure< T, A >:
Collaboration diagram for RunnableClosure< T, A >:

Public Member Functions

 RunnableClosure (T *object, void(T::*func)(A), A argument)
 Construct a new RunnableClosure which will call a method on another object with the given argument. More...
 
void run ()
 Entry point. More...
 

Detailed Description

template<class T, typename A>
class ccxx::RunnableClosure< T, A >

An adapter object similar to RunnableDelegate that additionally takes an arbitrary argument which will be passed to the member function.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ RunnableClosure()

RunnableClosure ( T *  object,
void(T::*)(A)  func,
argument 
)
inline

Construct a new RunnableClosure which will call a method on another object with the given argument.

Parameters
objectThe object.
funcA member function (method) in the object which will be called by run().
argumentThe argument that will be passed to the member function.

Member Function Documentation

◆ run()

void run ( )
inlinevirtual

Entry point.

Implements Runnable.


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