API Guides > ConceptRT 3.x
DelegateMethod< TargetClass, ParameterType > Class Template Reference

Delegate that is able to execute a method of an instance. More...

Detailed Description

template<class TargetClass, class ParameterType>
class ConceptRT::DelegateMethod< TargetClass, ParameterType >

Delegate that is able to execute a method of an instance.

Template Parameters
TargetClassClass type where the method is declared.
ParameterTypeType of the delegate parameter.
+ Inheritance diagram for DelegateMethod< TargetClass, ParameterType >:

Public Member Methods

 DelegateMethod ()
 Default constructor. More...
 
 DelegateMethod (TargetClass *targetObject, Method targetMethod)
 Default constructor. More...
 
void Execute (ParameterType parameter)
 Executes the delegate More...
 
bool GetDefined () const
 Query if target is defined. More...
 
void Define (TargetClass *targetObject, Method targetMethod)
 Defines. More...
 
TargetClass & GetTargetObject ()
 Gets the target object. More...
 
Method GetTargetMethod ()
 Gets the target method. More...
 

Constructor & Destructor Documentation

Default constructor.

DelegateMethod ( TargetClass *  targetObject,
Method  targetMethod 
)

Default constructor.

Parameters
targetObject[in,out] target object.
targetMethodTarget method.

Methods Documentation

void Define ( TargetClass *  targetObject,
Method  targetMethod 
)

Defines.

Parameters
targetObject[in,out] target object. Must be non-null.
targetMethodTarget method.
void Execute ( ParameterType  parameter)
virtual

Executes the delegate

Parameters
parameterThe parameter.
RT Exceptions:
RT_ERROR_OBJECT_NOT_DEFINED_PROPERLY

Implements Delegate< ParameterType >.

bool GetDefined ( ) const
virtual

Query if target is defined.

Returns
true if it defined.

Implements Delegate< ParameterType >.

Method GetTargetMethod ( )
inline

Gets the target method.

Returns
The target method.
TargetClass& GetTargetObject ( )
inline

Gets the target object.

Returns
The target object.
RT Exceptions:
RT_ERROR_OBJECT_NOT_DEFINED_PROPERLY