go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elastix::DefaultConstruct< TObject > Class Template Reference

#include <elxDefaultConstruct.h>

Detailed Description

template<typename TObject>
class elastix::DefaultConstruct< TObject >

Allows default-constructing an itk::LightObject derived object without calling New(). May improve the runtime performance, by avoiding heap allocation and pointer indirection.

Follows C++ Core Guidelines, September 23, 2022, "Prefer scoped objects, don't heap-allocate unnecessarily", from http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-scoped

Note
While New() may use a factory (itk::ObjectFactory) to create the object, DefaultConstruct just default-constructs the object.

Definition at line 35 of file elxDefaultConstruct.h.

Inheritance diagram for elastix::DefaultConstruct< TObject >:

Public Member Functions

 DefaultConstruct ()=default
 
 ITK_DISALLOW_COPY_AND_MOVE (DefaultConstruct)
 
 ~DefaultConstruct () override
 

Constructor & Destructor Documentation

◆ DefaultConstruct()

template<typename TObject >
elastix::DefaultConstruct< TObject >::DefaultConstruct ( )
default

Public default-constructor. Just calls the (typically protected) default-constructor of TObject.

◆ ~DefaultConstruct()

template<typename TObject >
elastix::DefaultConstruct< TObject >::~DefaultConstruct ( )
inlineoverride

Public destructor. Just calls the (typically protected) destructor of TObject.

Definition at line 44 of file elxDefaultConstruct.h.

Member Function Documentation

◆ ITK_DISALLOW_COPY_AND_MOVE()

template<typename TObject >
elastix::DefaultConstruct< TObject >::ITK_DISALLOW_COPY_AND_MOVE ( DefaultConstruct< TObject > )


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo