|
ITK
6.0.0
Insight Toolkit
|
Go to the documentation of this file.
19 #ifndef itkSmartPointer_h
20 #define itkSmartPointer_h
24 #include <type_traits>
25 #include "itkConfigure.h"
50 template <
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>
245 template <
class T,
class TU>
249 return (l.GetPointer() == r.GetPointer());
255 return (l.GetPointer() ==
nullptr);
261 return (
nullptr == r.GetPointer());
266 template <
class T,
class TU>
270 return (l.GetPointer() != r.GetPointer());
276 return (l.GetPointer() !=
nullptr);
282 return (
nullptr != r.GetPointer());
288 template <
class T,
class TU>
292 return (l.GetPointer() < r.GetPointer());
296 template <
class T,
class TU>
300 return (l.GetPointer() > r.GetPointer());
304 template <
class T,
class TU>
308 return (l.GetPointer() <= r.GetPointer());
312 template <
class T,
class TU>
316 return (l.GetPointer() >= r.GetPointer());
319 template <
typename T>
327 template <
typename T>
void Swap(SmartPointer &other) noexcept
SmartPointer(const SmartPointer< T > &p) noexcept
bool operator<(const Index< VDimension > &one, const Index< VDimension > &two)
bool operator<=(const Index< VDimension > &one, const Index< VDimension > &two)
SmartPointer(ObjectType *p) noexcept
SmartPointer(SmartPointer< ObjectType > &&p) noexcept
SmartPointer & operator=(SmartPointer r) noexcept
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
Implements transparent reference counting.
ObjectType * Print(std::ostream &os) const
constexpr SmartPointer() noexcept=default
typename std::enable_if< std::is_convertible_v< T *, const Self * > > EnableIfConvertible
ObjectType * GetPointer() const noexcept
void UnRegister() noexcept
ObjectType & operator*() const noexcept
bool operator>=(const Index< VDimension > &one, const Index< VDimension > &two)
ObjectType * operator->() const noexcept
bool operator>(const Index< VDimension > &one, const Index< VDimension > &two)
bool operator==(const Index< VDimension > &one, const Index< VDimension > &two)
bool IsNull() const noexcept
SmartPointer(SmartPointer< T > &&p) noexcept
bool operator!=(const Index< VDimension > &one, const Index< VDimension > &two)
SmartPointer & operator=(std::nullptr_t) noexcept
void swap(Array< T > &a, Array< T > &b) noexcept
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
bool IsNotNull() const noexcept
constexpr SmartPointer(std::nullptr_t) noexcept
ObjectType * get() const noexcept