Skip to content

Commit ec1c8c8

Browse files
committed
STYLE: Add itkVirtualGetNameOfClassMacro + itkOverrideGetNameOfClassMacro
Added two new macro's, intended to replace the old 'itkTypeMacro' and 'itkTypeMacroNoParent'. The main aim is to be clearer about what those macro's do: add a virtual 'GetNameOfClass()' member function and override it. Unlike 'itkTypeMacro', 'itkOverrideGetNameOfClassMacro' does not have a 'superclass' parameter, as it was not used anyway. Note that originally 'itkTypeMacro' did not use its 'superclass' parameter either, looking at commit 699b66cb04d410e555656828e8892107add38ccb, Will Schroeder, June 27, 2001: https://github.com/InsightSoftwareConsortium/ITK/blob/699b66cb04d410e555656828e8892107add38ccb/Code/Common/itkMacro.h#L331-L337
1 parent 1570924 commit ec1c8c8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/itkFDFImageIO.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class IOFDF_EXPORT FDFImageIO : public ImageIOBase
4545
itkNewMacro(Self);
4646

4747
/** Run-time type information (and related methods). */
48-
itkTypeMacro(FDFImageIO, ImageIOBase);
48+
itkOverrideGetNameOfClassMacro(FDFImageIO);
4949

5050
bool
5151
SupportsDimension(unsigned long dim) override

include/itkFDFImageIOFactory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class IOFDF_EXPORT FDFImageIOFactory : public ObjectFactoryBase
4848
itkFactorylessNewMacro(Self);
4949

5050
/** Run-time type information (and related methods). */
51-
itkTypeMacro(FDFImageIOFactory, ObjectFactoryBase);
51+
itkOverrideGetNameOfClassMacro(FDFImageIOFactory);
5252

5353
/** Register one factory of this type */
5454
static void

0 commit comments

Comments
 (0)