Skip to content

Commit

Permalink
DOC: Replace itkTypeMacro with itkOverrideGetNameOfClassMacro
Browse files Browse the repository at this point in the history
Following ITK pull request InsightSoftwareConsortium/ITK#4373
commit InsightSoftwareConsortium/ITK@2c264ea
"STYLE: Replace itkTypeMacro calls with `itkOverrideGetNameOfClassMacro`"
  • Loading branch information
N-Dekker committed Jan 2, 2024
1 parent 5ca0c63 commit 5428594
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions SoftwareGuide/Cover/Source/ModelBasedSegmentation.cxx
Expand Up @@ -39,7 +39,7 @@ class IterationCallback : public itk::Command
using Pointer = itk::SmartPointer<Self>;
using ConstPointer = itk::SmartPointer<const Self>;

itkTypeMacro(IterationCallback, Superclass);
itkOverrideGetNameOfClassMacro(IterationCallback);
itkNewMacro(Self);

/** Type defining the optimizer */
Expand Down Expand Up @@ -118,7 +118,7 @@ class SimpleImageToSpatialObjectMetric : public itk::ImageToSpatialObjectMetric<
itkNewMacro(Self);

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

enum
{
Expand Down
11 changes: 5 additions & 6 deletions SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex
Expand Up @@ -2109,7 +2109,7 @@ \subsection{Indentation and Tabs}
itkNewMacro(Self);
/** Run-time type information (and related methods) */
itkTypeMacro(SpecializedFilter, ImageToImageFilter);
itkOverrideGetNameOfClassMacro(SpecializedFilter);
...
};
Expand Down Expand Up @@ -2228,7 +2228,7 @@ \subsection{White Spaces}
itkNewMacro(Self);
/** Run-time type information (and related methods) */
itkTypeMacro(SpecializedFilter, ImageToImageFilter);
itkOverrideGetNameOfClassMacro(SpecializedFilter);
// ...
};
Expand Down Expand Up @@ -3228,9 +3228,8 @@ \section{Using Standard Macros}
\item \code{itkNewMacro(T)}: Creates the static class method \code{New()}
that interacts with the object factory to instantiate objects. The method
returns a \code{SmartPointer<T>} properly reference counted.
\item \code{itkTypeMacro(thisClass, superclass)}: Adds standard methods a
class, mainly type information. Adds the \code{GetNameOfClass()} method to the
class.
\item \code{itkOverrideGetNameOfClassMacro(thisClass)}: Adds an override of
the \code{GetNameOfClass()} method to the class.
\item \code{ITK\_DISALLOW\_COPY\_AND\_ASSIGN(TypeName)}: Disallow copying by
declaring copy constructor and assignment operator deleted. This must be
declared in the \textbf{public} section.
Expand Down Expand Up @@ -3297,7 +3296,7 @@ \section{Using Standard Macros}
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(Image, ImageBase);
itkOverrideGetNameOfClassMacro(Image);
\end{minted}
\normalsize
Expand Down
2 changes: 1 addition & 1 deletion SoftwareGuide/Latex/DevelopmentGuidelines/WriteAFilter.tex
Expand Up @@ -532,7 +532,7 @@ \section{Filter Conventions}
itkNewMacro(Self);

/** Run-time type information (and related methods). */
itkTypeMacro(ExampleImageFilter, ImageToImageFilter);
itkOverrideGetNameOfClassMacro(ExampleImageFilter);
\end{minted}

The default constructor should be \code{protected}, and provide sensible
Expand Down

0 comments on commit 5428594

Please sign in to comment.