18 #ifndef itkSmartPointer_h
19 #define itkSmartPointer_h
42 #if __cplusplus >= 201103L
48 #define ITK_SP_NULLPTR nullptr
49 #define ITK_SP_NOEXCEPT noexcept
51 #define ITK_SP_NULLPTR NULL
52 #define ITK_SP_NOEXCEPT
54 template<
typename TObjectType >
99 template<
typename TR >
101 {
return (
m_Pointer == static_cast< const ObjectType * >( r ) ); }
103 template<
typename TR >
105 {
return (
m_Pointer != static_cast< const ObjectType * >( r ) ); }
152 ( *m_Pointer ).Print(os);
158 #if ! defined ( ITK_FUTURE_LEGACY_REMOVE )
187 template<
typename T >
188 std::ostream & operator<<(std::ostream & os, SmartPointer< T > p)
202 #ifdef ITK_SP_NULLPTR
203 #undef ITK_SP_NULLPTR
205 #ifdef ITK_SP_NOEXECPT
206 #undef ITK_SP_NOEXCEPT
void Swap(SmartPointer &other)
SmartPointer & operator=(const SmartPointer &r)
void swap(SmartPointer &other)
bool operator<(const SmartPointer &r) const
SmartPointer(ObjectType *p)
SmartPointer(const SmartPointer< ObjectType > &p)
ObjectType * GetPointer() const
void UnRegister() ITK_SP_NOEXCEPT
void swap(Array< T > &a, Array< T > &b)
bool operator>=(const SmartPointer &r) const
ObjectType * operator->() const
bool operator<=(const SmartPointer &r) const
bool operator!=(TR r) const
bool operator>(const SmartPointer &r) const
Implements transparent reference counting.
ObjectType * Print(std::ostream &os) const
SmartPointer & operator=(ObjectType *r)
bool operator==(TR r) const