[Insight-developers] Concept checking committed

Brad King brad.king@kitware.com
Tue, 5 Mar 2002 10:37:25 -0500 (EST)


Hello, all:

I have committed the new concept checking implementation into
Code/Common/itkConceptChecking.h.  The macro names have changed to be more
consistent with ITK naming convention.  The ThresholdImageFilter in
BasicFilters provides an example of using the concept checks.

The interface is now:

itkConceptMacro(unique_name, (Concept::name_of_concept<type>));

The ThresholdImageFilter has this requirement:

itkConceptMacro(PixelTypeComparable, (Concept::Comparable<PixelType>));

The extra set of parens surrounding the concept name is required.  The
"unique_name" argument will become an enum inside the class, so any
comments preceding the macro will be attached to this enum in the doxygen
output (once I update the doxygen config to support this macro).

You should be able to read the list of concepts defined in
itkConceptChecking.h.  More can be added easily.  This header must be
included by any class that wishes to do concept checks.  Filter-specific
concepts should probably be defined right in that filter's header, but I
leave this point up for discussion if anyone has an opinion.

-Brad