18 #ifndef __itkSmartPointer_h
19 #define __itkSmartPointer_h
42 template<
typename TObjectType >
86 template<
typename TR >
88 {
return (
m_Pointer == static_cast< const ObjectType * >( r ) ); }
90 template<
typename TR >
92 {
return (
m_Pointer != static_cast< const ObjectType * >( r ) ); }
128 if ( tmp ) { tmp->UnRegister(); }
144 ( *m_Pointer ).Print(os);
165 template<
typename T >
166 std::ostream & operator<<(std::ostream & os, SmartPointer< T > p)
SmartPointer & operator=(const SmartPointer &r)
bool operator<(const SmartPointer &r) const
SmartPointer(ObjectType *p)
SmartPointer(const SmartPointer< ObjectType > &p)
ObjectType * GetPointer() const
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