Skip to content

Commit

Permalink
STYLE: Add itkVirtualGetNameOfClassMacro + itkOverrideGetNameOfClassM…
Browse files Browse the repository at this point in the history
…acro

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
  • Loading branch information
hjmjohnson committed Jan 27, 2025
1 parent 2b2ccb5 commit 5b4ea2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/itkAdditiveGaussianNoiseMeshFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class AdditiveGaussianNoiseMeshFilter : public MeshToMeshFilter<TInput, TOutput>
itkNewMacro(Self);

/** Run-time type information (and related methods). */
itkTypeMacro(AdditiveGaussianNoiseMeshFilter, MeshToMeshFilter);
itkOverrideGetNameOfClassMacro(AdditiveGaussianNoiseMeshFilter);

/** Mean of noise. */
itkGetConstMacro(Mean, CoordRepType);
Expand Down
2 changes: 1 addition & 1 deletion include/itkAdditiveGaussianNoiseQuadEdgeMeshFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class AdditiveGaussianNoiseQuadEdgeMeshFilter : public QuadEdgeMeshToQuadEdgeMes
itkNewMacro(Self);

/** Run-time type information (and related methods). */
itkTypeMacro(AdditiveGaussianNoiseQuadEdgeMeshFilter, QuadEdgeMeshToQuadEdgeMeshFilter);
itkOverrideGetNameOfClassMacro(AdditiveGaussianNoiseQuadEdgeMeshFilter);

/** Mean of noise. */
itkGetConstMacro(Mean, CoordRepType);
Expand Down

0 comments on commit 5b4ea2e

Please sign in to comment.