ITK  4.1.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
itk::CStyleCommand Class Reference

#include <itkCommand.h>

+ Inheritance diagram for itk::CStyleCommand:
+ Collaboration diagram for itk::CStyleCommand:

List of all members.

Public Types

typedef SmartPointer< SelfPointer
typedef CStyleCommand Self
typedef void(* FunctionPointer )(Object *, const EventObject &, void *)
typedef void(* ConstFunctionPointer )(const Object *, const EventObject &, void *)
typedef void(* DeleteDataFunctionPointer )(void *)

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
virtual const char * GetNameOfClass () const
void SetClientData (void *cd)
void SetClientDataDeleteCallback (DeleteDataFunctionPointer f)
void SetCallback (FunctionPointer f)
void SetConstCallback (ConstFunctionPointer f)
void Execute (Object *caller, const EventObject &event)
void Execute (const Object *caller, const EventObject &event)

Static Public Member Functions

static Pointer New ()

Protected Member Functions

 CStyleCommand ()
 ~CStyleCommand ()

Protected Attributes

FunctionPointer m_Callback
void * m_ClientData
DeleteDataFunctionPointer m_ClientDataDeleteCallback
ConstFunctionPointer m_ConstCallback

Detailed Description

A Command subclass that calls a pointer to a C function.

CStyleCommand calls a pointer to a C function with the following arguments void func(Object *,void *clientdata) The clientdata is data that the command wants passed to itself each time.

Definition at line 352 of file itkCommand.h.


Member Typedef Documentation

typedef void( * itk::CStyleCommand::ConstFunctionPointer)(const Object *, const EventObject &, void *)

Typedefs for C-style callbacks.

Definition at line 357 of file itkCommand.h.

Typedefs for C-style callbacks.

Definition at line 359 of file itkCommand.h.

typedef void( * itk::CStyleCommand::FunctionPointer)(Object *, const EventObject &, void *)

Typedefs for C-style callbacks.

Definition at line 356 of file itkCommand.h.

Reimplemented from itk::Command.

Definition at line 364 of file itkCommand.h.

Standard class typedefs.

Reimplemented from itk::Command.

Definition at line 363 of file itkCommand.h.


Constructor & Destructor Documentation

itk::CStyleCommand::CStyleCommand ( ) [inline, protected]

Definition at line 408 of file itkCommand.h.

itk::CStyleCommand::~CStyleCommand ( ) [inline, protected]

Definition at line 414 of file itkCommand.h.

References m_ClientData, and m_ClientDataDeleteCallback.


Member Function Documentation

virtual::itk::LightObject::Pointer itk::CStyleCommand::CreateAnother ( void  ) const [virtual]

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

void itk::CStyleCommand::Execute ( Object caller,
const EventObject event 
) [inline, virtual]

Execute the callback function.

Implements itk::Command.

Definition at line 388 of file itkCommand.h.

References m_Callback, and m_ClientData.

void itk::CStyleCommand::Execute ( const Object caller,
const EventObject event 
) [inline, virtual]

Execute the callback function with a const Object

Implements itk::Command.

Definition at line 398 of file itkCommand.h.

References m_ClientData, and m_ConstCallback.

virtual const char* itk::CStyleCommand::GetNameOfClass ( ) const [virtual]

Run-time type information (and related methods).

Reimplemented from itk::Command.

static Pointer itk::CStyleCommand::New ( ) [static]

Method for creation through the object factory.

Reimplemented from itk::Object.

Set the C callback function pointer to be called at Execute time.

Definition at line 377 of file itkCommand.h.

References m_Callback.

void itk::CStyleCommand::SetClientData ( void *  cd) [inline]

Set the client data that will be passed into the C function when it is called.

Definition at line 374 of file itkCommand.h.

References m_ClientData.

Set the callback to delete the client data.

Definition at line 384 of file itkCommand.h.

References m_ClientDataDeleteCallback.

Set the C callback function pointer to be called at Execute time.

Definition at line 379 of file itkCommand.h.

References m_ConstCallback.


Member Data Documentation

Definition at line 423 of file itkCommand.h.

Referenced by Execute(), and SetCallback().

Definition at line 422 of file itkCommand.h.

Referenced by Execute(), SetClientData(), and ~CStyleCommand().

Definition at line 425 of file itkCommand.h.

Referenced by SetClientDataDeleteCallback(), and ~CStyleCommand().

Definition at line 424 of file itkCommand.h.

Referenced by Execute(), and SetConstCallback().


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