Skip to content

Commit f45fb3a

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 8f409b4 commit f45fb3a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

include/itkOpenSlideImageIO.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class IOOpenSlide_EXPORT OpenSlideImageIO : public ImageIOBase
6464
itkNewMacro(Self);
6565

6666
/** Run-time type information (and related methods). */
67-
itkTypeMacro(OpenSlideImageIO, ImageIOBase);
67+
itkOverrideGetNameOfClassMacro(OpenSlideImageIO);
6868

6969
using ArrayOfExtensionsType = Superclass::ArrayOfExtensionsType;
7070

include/itkOpenSlideImageIOFactory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class IOOpenSlide_EXPORT OpenSlideImageIOFactory : public ObjectFactoryBase
5252
static OpenSlideImageIOFactory* FactoryNew() { return new OpenSlideImageIOFactory;}
5353

5454
/** Run-time type information (and related methods). */
55-
itkTypeMacro(OpenSlideImageIOFactory, ObjectFactoryBase);
55+
itkOverrideGetNameOfClassMacro(OpenSlideImageIOFactory);
5656

5757
/** Register one factory of this type */
5858
static void RegisterOneFactory()

0 commit comments

Comments
 (0)