sbRunnableMethod4_< ResultType, TargetType, Param1Type, Param2Type, Param3Type, Param4Type, Arg1Type, Arg2Type, Arg3Type, Arg4Type, MethodType > Class Template Reference

#include <sbThreadUtils.h>

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

Public Types

typedef sbRunnableMethod_
< ResultType, TargetType,
MethodType > 
BaseType
 

Public Member Functions

 sbRunnableMethod4_ (TargetType &aTarget, MethodType aMethod, Param1Type aArg1, Param2Type aArg2, Param3Type aArg3, Param4Type aArg4, 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 Param4Type, typename Arg1Type = Param1Type, typename Arg2Type = Param2Type, typename Arg3Type = Param3Type, typename Arg4Type = Param4Type, typename MethodType = ResultType (TargetType::*) (Param1Type, Param2Type, Param3Type, Param4Type)>
class sbRunnableMethod4_< ResultType, TargetType, Param1Type, Param2Type, Param3Type, Param4Type, Arg1Type, Arg2Type, Arg3Type, Arg4Type, MethodType >

A subclass template of sbRunnableMethod_<> for methods that take four 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 1104 of file sbThreadUtils.h.

Member Typedef Documentation

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

Definition at line 1108 of file sbThreadUtils.h.

Constructor & Destructor Documentation

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

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

Definition at line 1114 of file sbThreadUtils.h.

Member Function Documentation

template<typename ResultType , typename TargetType , typename Param1Type , typename Param2Type , typename Param3Type , typename Param4Type , typename Arg1Type = Param1Type, typename Arg2Type = Param2Type, typename Arg3Type = Param3Type, typename Arg4Type = Param4Type, typename MethodType = ResultType (TargetType::*) (Param1Type, Param2Type, Param3Type, Param4Type)>
virtual ResultType sbRunnableMethod4_< ResultType, TargetType, Param1Type, Param2Type, Param3Type, Param4Type, Arg1Type, Arg2Type, Arg3Type, Arg4Type, 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 1136 of file sbThreadUtils.h.


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