SimpleITK  1.0.1
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
itk::simple::FunctionCommand Class Reference

A Command class which allows setting an external function, or member function. More...

#include <sitkFunctionCommand.h>

+ Inheritance diagram for itk::simple::FunctionCommand:
+ Collaboration diagram for itk::simple::FunctionCommand:

Public Types

typedef FunctionCommand Self

Public Member Functions

virtual void Execute (void)
 FunctionCommand ()
template<class T >
void SetCallbackFunction (T *object, void(T::*pMemberFunction)())
void SetCallbackFunction (void(*pFunction)())
void SetCallbackFunction (void(*pFunction)(void *), void *clientData)
- Public Member Functions inherited from itk::simple::Command
 Command ()
 Default Constructor. More...
virtual std::string GetName () const
virtual void SetName (const std::string &name)
virtual ~Command (void)

Private Types

typedef nsstd::function< void()> FunctionObjectType

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 bool GetOwnedByProcessObjects () const
virtual void OwnedByProcessObjectsOff ()
virtual void OwnedByProcessObjectsOn ()
virtual size_t RemoveProcessObject (const itk::simple::ProcessObject *o)
virtual void SetOwnedByProcessObjects (bool o)
- Protected Member Functions inherited from itk::simple::NonCopyable
 NonCopyable ()

Detailed Description

A Command class which allows setting an external function, or member function.

Definition at line 33 of file sitkFunctionCommand.h.

Member Typedef Documentation

typedef nsstd::function<void()> itk::simple::FunctionCommand::FunctionObjectType

Definition at line 65 of file sitkFunctionCommand.h.

Definition at line 38 of file sitkFunctionCommand.h.

Constructor & Destructor Documentation

itk::simple::FunctionCommand::FunctionCommand ( )

Member Function Documentation

virtual void itk::simple::FunctionCommand::Execute ( void  )

The method that defines action to be taken by the command

Reimplemented from itk::simple::Command.

template<class T >
void itk::simple::FunctionCommand::SetCallbackFunction ( T *  object,
void(T::*)()  pMemberFunction 

Generic method to set a class's member function to be called in the Execute method.

Definition at line 48 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.

Member Data Documentation

FunctionObjectType itk::simple::FunctionCommand::m_Function

Definition at line 66 of file sitkFunctionCommand.h.

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