Skip to content

Commit 44ddf63

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 6c7c214 commit 44ddf63

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/itkHighPriorityRealTimeClock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class PerformanceBenchmarking_EXPORT HighPriorityRealTimeClock : public RealTime
4646
using ConstPointer = SmartPointer<const Self>;
4747

4848
/** Method for defining the name of the class */
49-
itkTypeMacro(HighPriorityRealTimeClock, RealTimeClock);
49+
itkOverrideGetNameOfClassMacro(HighPriorityRealTimeClock);
5050

5151
/** Method for creation through the object factory */
5252
itkNewMacro(Self);

src/PerformanceBenchmarkingInformation.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public:
8282
using MapType = std::map<MapKeyType, MapStorageType >;
8383

8484
/** Run-time type information (and related methods). */
85-
itkTypeMacro(PerformanceBenchmarkingInformation, Object);
85+
itkOverrideGetNameOfClassMacro(PerformanceBenchmarkingInformation);
8686

8787
/** Returns the global instance */
8888
static Pointer New();

0 commit comments

Comments
 (0)