SimpleITK
1.0.1
|
A class used to instantiate and generate function objects of templated member functions with two template arguments. More...
#include <sitkDualMemberFunctionFactory.h>
Public Types | |
typedef Superclass::FunctionObjectType | FunctionObjectType |
typedef TMemberFunctionPointer | MemberFunctionType |
typedef ::detail::FunctionTraits< MemberFunctionType >::ClassType | ObjectType |
typedef DualMemberFunctionFactory | Self |
typedef MemberFunctionFactoryBase< TMemberFunctionPointer, std::pair< int, int > > | Superclass |
Public Member Functions | |
DualMemberFunctionFactory (ObjectType *pObject) | |
Constructor which permanently binds the constructed object to pObject. More... | |
FunctionObjectType | GetMemberFunction (PixelIDValueType pixelID1, PixelIDValueType pixelID2, unsigned int imageDimension) |
Returns a function object for the combination of PixelID1 and PixelID2, and image dimension. More... | |
bool | HasMemberFunction (PixelIDValueType pixelID1, PixelIDValueType pixelID2, unsigned int imageDimension) const throw () |
Query to determine if an member function has been registered for pixelID1, pixelID2 and imageDimension. More... | |
template<typename TImageType1 , typename TImageType2 > | |
void | Register (MemberFunctionType pfunc, TImageType1 *, TImageType2 *) |
Registers a specific member function. More... | |
template<typename TPixelIDTypeList1 , typename TPixelIDTypeList2 , unsigned int VImageDimension, typename TAddressor > | |
void | RegisterMemberFunctions (void) |
Registers the member functions for all combinations of TPixelIDTypeList1 and PixelIDTypeList2. More... | |
template<typename TPixelIDTypeList1 , typename TPixelIDTypeList2 , unsigned int VImageDimension> | |
void | RegisterMemberFunctions (void) |
Registers the member functions for all combinations of TPixelIDTypeList1 and PixelIDTypeList2. More... | |
Protected Attributes | |
ObjectType * | m_ObjectPointer |
A class used to instantiate and generate function objects of templated member functions with two template arguments.
TMemberFunctionPointer | is the type of pointer to member function |
Example member function and pointer:
The provided Addressor will instantiate the templeted member functions by taking the address in the RegisterMethods. Later they can be retrieve with the GetMemberFunction method, which returns 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 67 of file sitkDualMemberFunctionFactory.h.
typedef Superclass::FunctionObjectType itk::simple::detail::DualMemberFunctionFactory< TMemberFunctionPointer >::FunctionObjectType |
Definition at line 78 of file sitkDualMemberFunctionFactory.h.
typedef TMemberFunctionPointer itk::simple::detail::DualMemberFunctionFactory< TMemberFunctionPointer >::MemberFunctionType |
Definition at line 76 of file sitkDualMemberFunctionFactory.h.
typedef ::detail::FunctionTraits<MemberFunctionType>::ClassType itk::simple::detail::DualMemberFunctionFactory< TMemberFunctionPointer >::ObjectType |
Definition at line 77 of file sitkDualMemberFunctionFactory.h.
typedef DualMemberFunctionFactory itk::simple::detail::DualMemberFunctionFactory< TMemberFunctionPointer >::Self |
Definition at line 74 of file sitkDualMemberFunctionFactory.h.
typedef MemberFunctionFactoryBase<TMemberFunctionPointer, std::pair<int, int> > itk::simple::detail::DualMemberFunctionFactory< TMemberFunctionPointer >::Superclass |
Definition at line 73 of file sitkDualMemberFunctionFactory.h.
itk::simple::detail::DualMemberFunctionFactory< TMemberFunctionPointer >::DualMemberFunctionFactory | ( | ObjectType * | pObject | ) |
Constructor which permanently binds the constructed object to pObject.
FunctionObjectType itk::simple::detail::DualMemberFunctionFactory< TMemberFunctionPointer >::GetMemberFunction | ( | PixelIDValueType | pixelID1, |
PixelIDValueType | pixelID2, | ||
unsigned int | imageDimension | ||
) |
Returns a function object for the combination of PixelID1 and PixelID2, and image dimension.
pixelID1 or pixelID2 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::DualMemberFunctionFactory< TMemberFunctionPointer >::HasMemberFunction | ( | PixelIDValueType | pixelID1, |
PixelIDValueType | pixelID2, | ||
unsigned int | imageDimension | ||
) | const | ||
throw | ( | ||
) |
Query to determine if an member function has been registered for pixelID1, pixelID2 and imageDimension.
void itk::simple::detail::DualMemberFunctionFactory< TMemberFunctionPointer >::Register | ( | MemberFunctionType | pfunc, |
TImageType1 * | , | ||
TImageType2 * | |||
) |
Registers a specific member function.
Registers a member function templated over TImageType1 and TImageType2
void itk::simple::detail::DualMemberFunctionFactory< TMemberFunctionPointer >::RegisterMemberFunctions | ( | void | ) |
Registers the member functions for all combinations of TPixelIDTypeList1 and PixelIDTypeList2.
With out the third template argument, the DualExecuteInternalAddressor will be used to instantiate "DualExecuteInternal" methods over the two image types referenced by all combination of type in the first list with types in the second.
The optional third template parameter provides a custom addressor.
Example usage:
or if a custom addressor is needed:
|
inline |
Registers the member functions for all combinations of TPixelIDTypeList1 and PixelIDTypeList2.
With out the third template argument, the DualExecuteInternalAddressor will be used to instantiate "DualExecuteInternal" methods over the two image types referenced by all combination of type in the first list with types in the second.
The optional third template parameter provides a custom addressor.
Example usage:
or if a custom addressor is needed:
Definition at line 135 of file sitkDualMemberFunctionFactory.h.
|
protected |
Definition at line 173 of file sitkDualMemberFunctionFactory.h.