sbRunnableMethod3_< ResultType, TargetType, Param1Type, Param2Type, Param3Type, Arg1Type, Arg2Type, Arg3Type, MethodType > Class Template Reference

#include <sbThreadUtils.h>

Inheritance diagram for sbRunnableMethod3_< ResultType, TargetType, Param1Type, Param2Type, Param3Type, Arg1Type, Arg2Type, Arg3Type, MethodType >:
[legend]
Collaboration diagram for sbRunnableMethod3_< ResultType, TargetType, Param1Type, Param2Type, Param3Type, Arg1Type, Arg2Type, Arg3Type, MethodType >:
[legend]

Public Types

typedef sbRunnableMethod_
< ResultType, TargetType,
MethodType > 
BaseType
 

Public Member Functions

 sbRunnableMethod3_ (TargetType &aTarget, MethodType aMethod, Param1Type aArg1, Param2Type aArg2, Param3Type aArg3, const char *aName=NULL)
 
- Public Member Functions inherited from sbRunnableMethod_< ResultType, TargetType, MethodType >
 sbRunnableMethod_ (TargetType &aTarget, MethodType aMethod, const char *aName)
 
- Public Member Functions inherited from sbRunnable_< ResultType >
 sbRunnable_ (const char *aName)
 
NS_IMETHOD Run ()
 
ResultType Wait ()
 
PRBool Wait (PRIntervalTime aTimeout, ResultType &aResult)
 
- Public Member Functions inherited from sbRunnable
 sbRunnable (const char *aName)
 
NS_IMETHOD Run ()
 
PRBool Wait (PRIntervalTime aTimeout)
 

Protected Member Functions

virtual ResultType OnRun ()
 

Additional Inherited Members

- Protected Attributes inherited from sbRunnableMethod_< ResultType, TargetType, MethodType >
nsRefPtr< TargetType > mTarget
 
MethodType mMethod
 

Detailed Description

template<typename ResultType, typename TargetType, typename Param1Type, typename Param2Type, typename Param3Type, typename Arg1Type = Param1Type, typename Arg2Type = Param2Type, typename Arg3Type = Param3Type, typename MethodType = ResultType (TargetType::*) (Param1Type, Param2Type, Param3Type)>
class sbRunnableMethod3_< ResultType, TargetType, Param1Type, Param2Type, Param3Type, Arg1Type, Arg2Type, Arg3Type, MethodType >

A subclass template of sbRunnableMethod_<> for methods that take three arguments. Use the optional Arg*Types to specify the types used to curry arguments if any should differ from the corresponding Param*Type.

For example, if Param2Type is nsISupports *, Arg2Type can be set to nsRefPtr<nsISupports> to ensure that the runnable retains a reference to the argument for the life of the runnable.

Definition at line 1037 of file sbThreadUtils.h.

Member Typedef Documentation

template<typename ResultType , typename TargetType , typename Param1Type , typename Param2Type , typename Param3Type , typename Arg1Type = Param1Type, typename Arg2Type = Param2Type, typename Arg3Type = Param3Type, typename MethodType = ResultType (TargetType::*) (Param1Type, Param2Type, Param3Type)>
typedef sbRunnableMethod_<ResultType, TargetType, MethodType> sbRunnableMethod3_< ResultType, TargetType, Param1Type, Param2Type, Param3Type, Arg1Type, Arg2Type, Arg3Type, MethodType >::BaseType

Definition at line 1041 of file sbThreadUtils.h.

Constructor & Destructor Documentation

template<typename ResultType , typename TargetType , typename Param1Type , typename Param2Type , typename Param3Type , typename Arg1Type = Param1Type, typename Arg2Type = Param2Type, typename Arg3Type = Param3Type, typename MethodType = ResultType (TargetType::*) (Param1Type, Param2Type, Param3Type)>
sbRunnableMethod3_< ResultType, TargetType, Param1Type, Param2Type, Param3Type, Arg1Type, Arg2Type, Arg3Type, MethodType >::sbRunnableMethod3_ ( TargetType &  aTarget,
MethodType  aMethod,
Param1Type  aArg1,
Param2Type  aArg2,
Param3Type  aArg3,
const char *  aName = NULL 
)
inline

Capture the object and method to call and the arguments to pass

Definition at line 1047 of file sbThreadUtils.h.

Member Function Documentation

template<typename ResultType , typename TargetType , typename Param1Type , typename Param2Type , typename Param3Type , typename Arg1Type = Param1Type, typename Arg2Type = Param2Type, typename Arg3Type = Param3Type, typename MethodType = ResultType (TargetType::*) (Param1Type, Param2Type, Param3Type)>
virtual ResultType sbRunnableMethod3_< ResultType, TargetType, Param1Type, Param2Type, Param3Type, Arg1Type, Arg2Type, Arg3Type, MethodType >::OnRun ( )
inlineprotectedvirtual

Invokes the captured method on the captured object with the captured arguments and returns its result. A subclass that overrides this function should eventually delegate to it.

Implements sbRunnableMethod_< ResultType, TargetType, MethodType >.

Definition at line 1067 of file sbThreadUtils.h.


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