Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
|
Class to describe a target object and a method of it, to be called at a later time. More...
#include <hdicoreCallback.h>
Public Member Functions | |
__Callback (TargetType *target_, ActionType action_) | |
__Callback constructor | |
__Callback (TargetType *target_, ConstActionType action_) | |
__Callback (const __Callback< TargetType > &cb_) | |
__Callback copy constructor | |
virtual | ~__Callback () |
__Callback destructor; no-op at this time | |
virtual __Callback< TargetType > * | clone () const |
Convenience method to clone a __Callback object. | |
virtual void | execute () const |
Executes the callback. | |
Public Member Functions inherited from hdi::core::Callback | |
virtual void | execute () const =0 |
Pure virtual callback execution method, so __Callback objects can be stored as Callback*. | |
virtual Callback * | clone () const =0 |
Pure virtual callback cloning method, so __Callback objects can be stored as Callback*. | |
virtual | ~Callback () |
Callback destructor, no-op at this time. | |
Additional Inherited Members | |
Protected Member Functions inherited from hdi::core::Callback | |
Callback () | |
Callback constructor, no-op at this time. | |
Class to describe a target object and a method of it, to be called at a later time.
C++ has no callbacks (in the sense of an action [method] of a target [object]), so we had to roll our own. You can use this class directly, but the HDI_CORE_CALLBACK macro is easier.
|
inlineexplicit |
__Callback constructor
Constructs a __Callback object from a target (object) and action (method) for the target
target_ | Object pointer, whose method (action_) will be called, once executed |
action_ | Function/method pointer, which will be called on target_, once executed |
|
inline |
__Callback copy constructor
Use to create a new __Callback object that points to the same target (object) and action (method) as the original
cb_ | Existing __Callback object to be copied |
|
inlinevirtual |
__Callback destructor; no-op at this time
|
inlinevirtual |
Convenience method to clone a __Callback object.
Clones the __Callback object, such that a new duplicated object is created that points to the same target (object) and action (method)
Implements hdi::core::Callback.
|
inlinevirtual |
Executes the callback.
Calls the specified action (method) of the target (object)
Implements hdi::core::Callback.