Slicer
5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Macros | |
#define | VTK_SINGLETON_CXX(NAME) |
#define | VTK_SINGLETON_DECLARE(NAME) |
#define | VTK_SINGLETON_DECLARE_INITIALIZER(EXPORT_DIRECTIVE, NAME) |
#define | VTK_SINGLETON_INITIALIZER_CXX(NAME) |
See https://www.parashift.com/c++-faq-lite/ctors.html#faq-10.12 and https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Nifty_Counter
Inspired from VTK/Utilities/kwsys/SystemTools class
#define VTK_SINGLETON_CXX | ( | NAME | ) |
This should be added at the end of the CXX file
Definition at line 129 of file vtkSingleton.h.
#define VTK_SINGLETON_DECLARE | ( | NAME | ) |
Should be included as a class protected member
Definition at line 37 of file vtkSingleton.h.
#define VTK_SINGLETON_DECLARE_INITIALIZER | ( | EXPORT_DIRECTIVE, | |
NAME | |||
) |
Help macro allowing to declare the utility class to make sure NAME is initialized before it is used.
Should be added at the bottom of the header file, after the class declaration
The instance (NAME##Initializer
) will show up in any translation unit that uses NAME. It will make sure NAME is initialized before it is used.
Definition at line 53 of file vtkSingleton.h.
#define VTK_SINGLETON_INITIALIZER_CXX | ( | NAME | ) |
Implementation of NAME##Initialize
class.
Macro used by VTK_SINGLETON_DEFINE. See below.
NAME##Initialize::Count
and NAME::Instance
Must NOT be initialized. Default initialization to zero is necessary. Definition at line 77 of file vtkSingleton.h.