#include <vpr/Thread/ThreadFunctor.h>
Inheritance diagram for vpr::ThreadRunFunctor< OBJ_TYPE >:


Public Types | |
| typedef void(OBJ_TYPE::*) | FunPtr () |
Public Member Functions | |
| ThreadRunFunctor (OBJ_TYPE *theObject) | |
| virtual | ~ThreadRunFunctor () |
| void | operator() (void *arg) |
| Overloaded operator() used for invoking the function encapsulated by this object. | |
| void | operator() () |
| Overloaded operator() used for invoking the function encapsulated by this object. | |
| virtual void | setArg (void *arg) |
| Sets the argument passed to the encapsulated function. | |
| virtual bool | isValid () |
| Function to see if we have a valid functor. | |
That is, the class must have a run() method with the following signature: void run(). No argument will be passed to the runnable object when its run() method is invoked. Instead, it is up to the class author to ensure that the object has all information it needs to do its job before the thread is spawned.
Definition at line 173 of file ThreadFunctor.h.
| typedef void(OBJ_TYPE::* ) vpr::ThreadRunFunctor< OBJ_TYPE >::FunPtr() |
Definition at line 176 of file ThreadFunctor.h.
| vpr::ThreadRunFunctor< OBJ_TYPE >::ThreadRunFunctor | ( | OBJ_TYPE * | theObject | ) | [inline] |
Definition at line 178 of file ThreadFunctor.h.
00179 : mObject(theObject) 00180 , mFunction(NULL) 00181 { 00182 mFunction = &OBJ_TYPE::run; 00183 }
| virtual vpr::ThreadRunFunctor< OBJ_TYPE >::~ThreadRunFunctor | ( | ) | [inline, virtual] |
| void vpr::ThreadRunFunctor< OBJ_TYPE >::operator() | ( | void * | arg | ) | [inline, virtual] |
Overloaded operator() used for invoking the function encapsulated by this object.
This version takes an argument that is passed on to the function.
| arg | The argument to be passed to the encapsulated function. |
Implements vpr::BaseThreadFunctor.
Definition at line 191 of file ThreadFunctor.h.
| void vpr::ThreadRunFunctor< OBJ_TYPE >::operator() | ( | ) | [inline, virtual] |
Overloaded operator() used for invoking the function encapsulated by this object.
This version takes no argument and instead passes the argument given when this object was constructed.
Implements vpr::BaseThreadFunctor.
Definition at line 197 of file ThreadFunctor.h.
| virtual void vpr::ThreadRunFunctor< OBJ_TYPE >::setArg | ( | void * | arg | ) | [inline, virtual] |
Sets the argument passed to the encapsulated function.
This will be used when the function is invoked through the overloaded operator().
Implements vpr::BaseThreadFunctor.
Definition at line 202 of file ThreadFunctor.h.
| virtual bool vpr::ThreadRunFunctor< OBJ_TYPE >::isValid | ( | ) | [inline, virtual] |
Function to see if we have a valid functor.
Implements vpr::BaseThreadFunctor.
Definition at line 207 of file ThreadFunctor.h.
References vprASSERT.
00208 { 00209 if ( (NULL == mObject) || ((OBJ_TYPE*) 0xDEADBEEF == mObject) ) 00210 { 00211 vprASSERT(NULL != mObject); 00212 vprASSERT((OBJ_TYPE*)0xDEADBEEF != mObject); 00213 return false; 00214 } 00215 else if ( (NULL == mFunction) /* || ((FunPtr) 0xDEADBEEF == mFunction) */ ) 00216 { 00217 return false; 00218 } 00219 else 00220 { 00221 return true; 00222 } 00223 }
1.5.1