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);
180 template<
typename T >
181 std::ostream & operator<<(std::ostream & os, SmartPointer< T > p)
195 #ifdef ITK_SP_NULLPTR
196 #undef ITK_SP_NULLPTR
198 #ifdef ITK_SP_NOEXECPT
199 #undef ITK_SP_NOEXCEPT
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