18 #ifndef __itkSmartPointer_h
19 #define __itkSmartPointer_h
42 #if __cplusplus >= 201103L
48 #define SP_ITK_NULLPTR nullptr
50 #define SP_ITK_NULLPTR NULL
52 template<
typename TObjectType >
96 template<
typename TR >
98 {
return (
m_Pointer == static_cast< const ObjectType * >( r ) ); }
100 template<
typename TR >
102 {
return (
m_Pointer != static_cast< const ObjectType * >( r ) ); }
149 ( *m_Pointer ).Print(os);
177 template<
typename T >
178 std::ostream & operator<<(std::ostream & os, SmartPointer< T > p)
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 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