vpr::BaseThreadFunctor Class Reference

Converts a function into a functor that can be passed to a extern C type function to be called by a thread creation routine. More...

#include <vpr/Thread/ThreadFunctor.h>

Inheritance diagram for vpr::BaseThreadFunctor:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~BaseThreadFunctor ()
virtual void operator() ()=0
 Overloaded operator() used for invoking the function encapsulated by this object.
virtual void operator() (void *arg)=0
 Overloaded operator() used for invoking the function encapsulated by this object.
virtual void setArg (void *)=0
 Sets the argument passed to the encapsulated function.
virtual bool isValid ()=0
 Function to see if we have a valid functor.

Detailed Description

Converts a function into a functor that can be passed to a extern C type function to be called by a thread creation routine.

Definition at line 60 of file ThreadFunctor.h.


Constructor & Destructor Documentation

virtual vpr::BaseThreadFunctor::~BaseThreadFunctor (  )  [inline, virtual]

Definition at line 64 of file ThreadFunctor.h.

00065    {
00066       ;
00067    }


Member Function Documentation

virtual void vpr::BaseThreadFunctor::operator() (  )  [pure 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.

Implemented in vpr::ThreadMemberFunctor< OBJ_TYPE >, vpr::ThreadRunFunctor< OBJ_TYPE >, vpr::ThreadNonMemberFunctor, vpr::ThreadMemberFunctor< vpr::ThreadPosix >, vpr::ThreadMemberFunctor< vpr::ThreadSGI >, and vpr::ThreadMemberFunctor< vpr::ThreadNSPR >.

virtual void vpr::BaseThreadFunctor::operator() ( void *  arg  )  [pure virtual]

Overloaded operator() used for invoking the function encapsulated by this object.

This version takes an argument that is passed on to the function.

Parameters:
arg The argument to be passed to the encapsulated function.

Implemented in vpr::ThreadMemberFunctor< OBJ_TYPE >, vpr::ThreadRunFunctor< OBJ_TYPE >, vpr::ThreadNonMemberFunctor, vpr::ThreadMemberFunctor< vpr::ThreadPosix >, vpr::ThreadMemberFunctor< vpr::ThreadSGI >, and vpr::ThreadMemberFunctor< vpr::ThreadNSPR >.

virtual void vpr::BaseThreadFunctor::setArg ( void *   )  [pure virtual]

Sets the argument passed to the encapsulated function.

This will be used when the function is invoked through the overloaded operator().

Implemented in vpr::ThreadMemberFunctor< OBJ_TYPE >, vpr::ThreadRunFunctor< OBJ_TYPE >, vpr::ThreadNonMemberFunctor, vpr::ThreadMemberFunctor< vpr::ThreadPosix >, vpr::ThreadMemberFunctor< vpr::ThreadSGI >, and vpr::ThreadMemberFunctor< vpr::ThreadNSPR >.

Referenced by vpr::ThreadPool::startFunc().

virtual bool vpr::BaseThreadFunctor::isValid (  )  [pure virtual]

Function to see if we have a valid functor.

Implemented in vpr::ThreadMemberFunctor< OBJ_TYPE >, vpr::ThreadRunFunctor< OBJ_TYPE >, vpr::ThreadNonMemberFunctor, vpr::ThreadMemberFunctor< vpr::ThreadPosix >, vpr::ThreadMemberFunctor< vpr::ThreadSGI >, and vpr::ThreadMemberFunctor< vpr::ThreadNSPR >.

Referenced by vpr::ThreadSGI::setFunctor(), vpr::ThreadPosix::setFunctor(), vpr::ThreadNSPR::setFunctor(), vpr::ThreadNSPR::start(), and vpr::vprThreadFunctorFunction().


The documentation for this class was generated from the following file:
Generated on Thu Jan 4 10:55:55 2007 for VR Juggler Portable Runtime by  doxygen 1.5.1