SimpleITK
|
A Command class which allows setting an external function, or member function. More...
#include <sitkFunctionCommand.h>
A Command class which allows setting an external function, or member function.
Definition at line 33 of file sitkFunctionCommand.h.
Public Types | |
using | Self = FunctionCommand |
Public Member Functions | |
void | Execute () override |
FunctionCommand () | |
void | SetCallbackFunction (const std::function< void()> &) |
template<class T > | |
void | SetCallbackFunction (T *object, void(T::*pMemberFunction)()) |
void | SetCallbackFunction (void(*pFunction)()) |
void | SetCallbackFunction (void(*pFunction)(void *), void *clientData) |
~FunctionCommand () override | |
Public Member Functions inherited from itk::simple::Command | |
Command () | |
Default Constructor. More... | |
std::string | GetName () const override |
void | SetName (const std::string &n) override |
virtual | ~Command () override |
Public Member Functions inherited from itk::simple::ObjectOwnedBase | |
ObjectOwnedBase ()=default | |
virtual | ~ObjectOwnedBase ()=0 |
Public Member Functions inherited from itk::simple::NonCopyable | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
Private Types | |
using | FunctionObjectType = std::function< void()> |
Private Attributes | |
FunctionObjectType | m_Function |
Additional Inherited Members | |
Protected Member Functions inherited from itk::simple::Command | |
virtual size_t | AddProcessObject (itk::simple::ProcessObject *o) |
virtual size_t | RemoveProcessObject (const itk::simple::ProcessObject *o) |
Protected Member Functions inherited from itk::simple::ObjectOwnedBase | |
virtual size_t | AddObjectCallback (itk::Object *o, std::function< void()> onDelete) |
Register an Object and a method to call on this object's destructor. More... | |
ObjectOwnedBase (const ObjectOwnedBase &o) | |
Copy Constructor. More... | |
virtual size_t | RemoveObject (const itk::Object *) |
virtual void | SetOwnedByObjects (bool o) |
virtual bool | GetOwnedByObjects () const |
virtual void | OwnedByObjectsOn () |
virtual void | OwnedByObjectsOff () |
Protected Member Functions inherited from itk::simple::NonCopyable | |
NonCopyable ()=default | |
|
private |
Definition at line 73 of file sitkFunctionCommand.h.
Definition at line 36 of file sitkFunctionCommand.h.
|
override |
itk::simple::FunctionCommand::FunctionCommand | ( | ) |
|
overridevirtual |
The method that defines action to be taken by the command
Reimplemented from itk::simple::Command.
void itk::simple::FunctionCommand::SetCallbackFunction | ( | const std::function< void()> & | ) |
Set as a C++ function, which is compatible with lambdas.
|
inline |
Generic method to set a class's member function to be called in the Execute method.
Definition at line 51 of file sitkFunctionCommand.h.
void itk::simple::FunctionCommand::SetCallbackFunction | ( | void(*)() | pFunction | ) |
Set a C-Style function to be called in the Execute method
void itk::simple::FunctionCommand::SetCallbackFunction | ( | void(*)(void *) | pFunction, |
void * | clientData | ||
) |
Set a C-Style function with a void* clientData as an argument. The caller is responsible for managing the life of the clientData and that it's valid when Execute is called with the clientData.
|
private |
Definition at line 74 of file sitkFunctionCommand.h.