22 #ifndef __SharedPtr_hh__
23 #define __SharedPtr_hh__
25 #include "bias_config.h"
27 #include <Base/Debug/Error.hh>
60 std::ostream& operator<<(std::ostream& os, const SharedPtr<T>& t);
61 template <
class T,
class U>
63 template <
class T,
class U>
121 bool operator<(const SharedPtr<U>& rs)
const;
123 bool operator<=(const SharedPtr<U>& rs)
const;
145 friend std::ostream& operator<<<>(std::ostream& os,
const SharedPtr<T>& t);
167 #include "SharedPtrImpl.hh"
169 #endif // __SharedPtr_hh__
T * Get(SharedPtr< T > &t)
bool operator!=(const SharedPtr< U > &rs) const
pointer with reference count and automatic deletion
bool operator!() const
enable the expression "if (!ptr)"
bool operator==(const SharedPtr< U > &rs) const
comparisons
SharedPtr< T > DynamicCast(const SharedPtr< U > &src)
SharedPtr< T > & operator=(const SharedPtr< T > &sp)
SharedPtr< T > ConstCast(const SharedPtr< U > &rs)
eqivalent to *this = const_cast<SharedPtr<T> >(rs)
unsigned RefCount(const SharedPtr< T > &t)
SharedPtr< T > DynamicCast(const SharedPtr< U > &rs)
eqivalent to *this = dynamic_cast<SharedPtr<T> >(rs)
bool operator>=(const SharedPtr< U > &rs) const
bool operator>(const SharedPtr< U > &rs) const
pool ptr to the data and the reference count
SharedPtr< T > ConstCast(const SharedPtr< U > &src)