#include <ThreadFunctor.h>
Inheritance diagram for vpr::ThreadNonMemberFunctor:


Public Types | |
| typedef void(* | NonMemFunPtr )(void *) |
Public Methods | |
| ThreadNonMemberFunctor (NonMemFunPtr f, void *a=NULL) | |
| Constructor. More... | |
| virtual | ~ThreadNonMemberFunctor () |
| virtual void | operator() (void *arg) |
| Overloaded operator() used for invoking the function encapsulated by this object. More... | |
| virtual void | operator() (void) |
| Overloaded operator() used for invoking the function encapsulated by this object. More... | |
| void | setArg (void *arg) |
| Sets the argument passed to the encapsulated function. More... | |
| bool | isValid () |
| Function to see if we have a valid functor. More... | |
Public Attributes | |
| NonMemFunPtr | mFunc |
| Thread startup function (C++ linkage). More... | |
| void * | mArgument |
| Argument to thread startup function. More... | |
Converts a non-member function or a static class member function into a functor.
Definition at line 232 of file ThreadFunctor.h.
|
|
Definition at line 235 of file ThreadFunctor.h. Referenced by ThreadNonMemberFunctor. |
|
||||||||||||
|
Constructor.
Definition at line 244 of file ThreadFunctor.h. References mArgument, mFunc, and NonMemFunPtr.
|
|
|
Definition at line 250 of file ThreadFunctor.h. References mArgument, and mFunc.
|
|
|
Overloaded operator() used for invoking the function encapsulated by this object. This version takes an argument that is passed on to the function.
Implements vpr::BaseThreadFunctor. Definition at line 256 of file ThreadFunctor.h.
00257 {
00258 (*mFunc)(arg);
00259 }
|
|
|
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 261 of file ThreadFunctor.h.
00262 {
00263 (*mFunc)(mArgument);
00264 }
|
|
|
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 266 of file ThreadFunctor.h. References mArgument.
00267 {
00268 mArgument = arg;
00269 }
|
|
|
Function to see if we have a valid functor.
Implements vpr::BaseThreadFunctor. Definition at line 271 of file ThreadFunctor.h. References mArgument, mFunc, and vprASSERT.
|
|
|
Thread startup function (C++ linkage).
Definition at line 280 of file ThreadFunctor.h. Referenced by isValid, ThreadNonMemberFunctor, and ~ThreadNonMemberFunctor. |
|
|
Argument to thread startup function.
Definition at line 281 of file ThreadFunctor.h. Referenced by isValid, setArg, ThreadNonMemberFunctor, and ~ThreadNonMemberFunctor. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002