SimpleITK
1.0.1
|
A class used to instantiate and generate function object to templated member functions. More...
#include <sitkMemberFunctionFactory.h>
Public Types | |
typedef Superclass::FunctionObjectType | FunctionObjectType |
typedef TMemberFunctionPointer | MemberFunctionType |
typedef ::detail::FunctionTraits< MemberFunctionType >::ClassType | ObjectType |
typedef MemberFunctionFactory | Self |
typedef MemberFunctionFactoryBase< TMemberFunctionPointer, int > | Superclass |
Public Member Functions | |
FunctionObjectType | GetMemberFunction (PixelIDValueType pixelID, unsigned int imageDimension) |
Returns a function object for the PixelIndex, and image dimension. More... | |
bool | HasMemberFunction (PixelIDValueType pixelID, unsigned int imageDimension) const throw () |
Query to determine if an member function has been registered for pixelID and imageDimension. More... | |
MemberFunctionFactory (ObjectType *pObject) | |
Constructor which permanently binds the constructed object to pObject. More... | |
template<typename TImageType > | |
void | Register (MemberFunctionType pfunc, TImageType *) |
Registers a specific member function. More... | |
template<typename TPixelIDTypeList , unsigned int VImageDimension, typename TAddressor > | |
void | RegisterMemberFunctions (void) |
Registers all member functions in TPixelIDTypeList and simple::InstantiatedPixelIDTypeList over itk::Image<Pixel, ImageDimension> More... | |
template<typename TPixelIDTypeList , unsigned int VImageDimension> | |
void | RegisterMemberFunctions (void) |
Registers all member functions in TPixelIDTypeList and simple::InstantiatedPixelIDTypeList over itk::Image<Pixel, ImageDimension> More... | |
Protected Attributes | |
ObjectType * | m_ObjectPointer |
A class used to instantiate and generate function object to templated member functions.
TMemberFunctionPointer | is the type of pointer to member function |
Example member function pointer:
The RegisterMemberFunctions instantiate the templeted member functions and registers the member function pointer, so that it be used for dispatch later. Later they can be retrieve with the GetMemberFunction methods, which return a function object with the same arguments as the templated member function pointer.
An instance of a MemberFunctionFactory is bound to a specific instance of an object, so that the returned function object does not need to have the calling object specified.
Definition at line 55 of file sitkMemberFunctionFactory.h.
typedef Superclass::FunctionObjectType itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::FunctionObjectType |
Definition at line 66 of file sitkMemberFunctionFactory.h.
typedef TMemberFunctionPointer itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::MemberFunctionType |
Definition at line 64 of file sitkMemberFunctionFactory.h.
typedef ::detail::FunctionTraits<MemberFunctionType>::ClassType itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::ObjectType |
Definition at line 65 of file sitkMemberFunctionFactory.h.
typedef MemberFunctionFactory itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::Self |
Definition at line 62 of file sitkMemberFunctionFactory.h.
typedef MemberFunctionFactoryBase<TMemberFunctionPointer, int> itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::Superclass |
Definition at line 61 of file sitkMemberFunctionFactory.h.
itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::MemberFunctionFactory | ( | ObjectType * | pObject | ) |
Constructor which permanently binds the constructed object to pObject.
FunctionObjectType itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::GetMemberFunction | ( | PixelIDValueType | pixelID, |
unsigned int | imageDimension | ||
) |
Returns a function object for the PixelIndex, and image dimension.
pixelID is the value of Image::GetPixelIDValue(), or PixelIDToPixelIDValue<PixelIDType>::Result
imageDimension is the the value returned by Image::GetDimension()
Example usage:
If the requested member function is not registered then an exception is generated. The returned function object is guaranteed to be valid.
bool itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::HasMemberFunction | ( | PixelIDValueType | pixelID, |
unsigned int | imageDimension | ||
) | const | ||
throw | ( | ||
) |
Query to determine if an member function has been registered for pixelID and imageDimension.
void itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::Register | ( | MemberFunctionType | pfunc, |
TImageType * | |||
) |
Registers a specific member function.
Registers a member function which will be dispatched to the TImageType type
void itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::RegisterMemberFunctions | ( | void | ) |
Registers all member functions in TPixelIDTypeList and simple::InstantiatedPixelIDTypeList over itk::Image<Pixel, ImageDimension>
TAddressor | is the type of a class who as a templated operator() which returns TMemberFunctionPointer, this will default to detail::MemberFunctionAddressor if not specified |
Example usage:
Example usage:
|
inline |
Registers all member functions in TPixelIDTypeList and simple::InstantiatedPixelIDTypeList over itk::Image<Pixel, ImageDimension>
TAddressor | is the type of a class who as a templated operator() which returns TMemberFunctionPointer, this will default to detail::MemberFunctionAddressor if not specified |
Example usage:
Example usage:
Definition at line 120 of file sitkMemberFunctionFactory.h.
|
protected |
Definition at line 155 of file sitkMemberFunctionFactory.h.