19#ifndef itkSmartPointer_h
20#define itkSmartPointer_h
25#include "itkConfigure.h"
50template <
typename TObjectType>
73 template <typename T, typename = typename EnableIfConvertible<T>::type>
84 p.m_Pointer =
nullptr;
88 template <typename T, typename = typename EnableIfConvertible<T>::type>
92 p.m_Pointer =
nullptr;
119 operator bool() const noexcept
201#if !defined(ITK_LEGACY_REMOVE)
214 other.m_Pointer = tmp;
221 template <
typename T>
245template <
class T,
class TU>
249 return (l.GetPointer() == r.GetPointer());
255 return (l.GetPointer() ==
nullptr);
261 return (
nullptr == r.GetPointer());
266template <
class T,
class TU>
270 return (l.GetPointer() != r.GetPointer());
276 return (l.GetPointer() !=
nullptr);
282 return (
nullptr != r.GetPointer());
288template <
class T,
class TU>
292 return (l.GetPointer() < r.GetPointer());
296template <
class T,
class TU>
300 return (l.GetPointer() > r.GetPointer());
304template <
class T,
class TU>
308 return (l.GetPointer() <= r.GetPointer());
312template <
class T,
class TU>
316 return (l.GetPointer() >= r.GetPointer());
Implements transparent reference counting.
ObjectType & operator*() const noexcept
SmartPointer & operator=(SmartPointer r) noexcept
constexpr SmartPointer(std::nullptr_t) noexcept
ObjectType * GetPointer() const noexcept
SmartPointer(const SmartPointer< T > &p) noexcept
SmartPointer(ObjectType *p) noexcept
void UnRegister() noexcept
bool IsNull() const noexcept
ObjectType * get() const noexcept
SmartPointer(SmartPointer< ObjectType > &&p) noexcept
ObjectType * operator->() const noexcept
void Swap(SmartPointer &other) noexcept
bool IsNotNull() const noexcept
typename std::enable_if< std::is_convertible_v< T *, TObjectType * > > EnableIfConvertible
ObjectType * Print(std::ostream &os) const
SmartPointer(SmartPointer< T > &&p) noexcept
constexpr SmartPointer() noexcept=default
SmartPointer & operator=(std::nullptr_t) noexcept
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
void swap(Array< T > &a, Array< T > &b) noexcept
bool operator>(const Index< VDimension > &one, const Index< VDimension > &two)
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
bool operator<=(const Index< VDimension > &one, const Index< VDimension > &two)
bool operator==(const Index< VDimension > &one, const Index< VDimension > &two)
bool operator!=(const Index< VDimension > &one, const Index< VDimension > &two)
bool operator<(const Index< VDimension > &one, const Index< VDimension > &two)
bool operator>=(const Index< VDimension > &one, const Index< VDimension > &two)