2 #ifndef vil_smart_ptr_h_ 3 #define vil_smart_ptr_h_ 23 # include <vcl_msvc_warnings.h> 88 explicit operator bool ()
const 89 {
return (
ptr_ !=
nullptr) ? true :
false; }
93 {
return (
ptr_ !=
nullptr) ? false :
true; }
140 static void ref (T *p);
141 static void unref(T *p);
167 #define VIL_SMART_PTR_INSTANTIATE(T) \ 168 extern "please include vil/vil_smart_ptr.hxx instead" 170 #endif // vil_smart_ptr_h_
bool operator>=(vil_smart_ptr< T >const &p) const
A templated smart pointer class.
bool operator!() const
Inverse bool.
T & operator *() const
Dereferencing the pointer.
bool operator>(vil_smart_ptr< T >const &p) const
bool operator==(T const *p, vil_smart_ptr< T > const &a)
Comparison of pointer with smart-pointer (cannot be a member function).
T * operator ->() const
These methods all return the raw/dumb pointer.
vil_smart_ptr(vil_smart_ptr< T > const &p)
bool operator!=(T const *p) const
Do a shallow inequality.
bool operator==(vil_smart_ptr< T >const &p) const
Do a shallow equality.
bool operator!=(T const *p, vil_smart_ptr< T > const &a)
bool operator<(vil_smart_ptr< T >const &p) const
bool operator<=(vil_smart_ptr< T >const &p) const
std::ostream & operator<<(std::ostream &, vil_smart_ptr< T > const &)
bool operator!=(vil_smart_ptr< T >const &p) const
Do a shallow inequality.
T * as_pointer() const
These methods all return the raw/dumb pointer.
T * ptr_
Pointer to object, or 0.
vil_smart_ptr< T > & operator=(vil_smart_ptr< T > const &r)
Assignment.
bool operator==(T const *p) const
Do a shallow equality.
T * ptr() const
These methods all return the raw/dumb pointer.