21 #ifndef STLPLUS_SMART_PTR 22 #define STLPLUS_SMART_PTR 63 template<
typename T,
typename C,
typename COUNTER>
103 operator bool(
void)
const;
106 bool null(
void)
const;
113 const T& operator*(
void) const throw(null_dereference);
116 T* operator->(
void) throw(null_dereference);
117 const T* operator->(
void) const throw(null_dereference);
125 T&
value(
void) throw(null_dereference);
126 const T&
value(
void) const throw(null_dereference);
132 void set(T* data = 0);
153 inline
void clear(
void);
189 template <typename T>
193 T* operator() (
const T& from)
throw()
201 template <
typename T>
205 T* operator() (
const T& from)
throw()
213 template <
typename T>
217 T* operator() (
const T& ) throw(illegal_copy)
219 throw illegal_copy(
"no_copy functor called");
227 template <
typename T,
typename COUNTER = mrpt::synch::CAtomicCounter>
242 template <
typename T,
typename COUNTER = mrpt::synch::CAtomicCounter>
257 template <
typename T,
typename COUNTER = mrpt::synch::CAtomicCounter>
smart_ptr_nocopy(T *data)
smart_ptr_holder< T, COUNTER > * m_holder
smart_ptr_clone< T > & operator=(const smart_ptr_clone< T > &r)
void set_value(const T &data)
unsigned alias_count(void) const
const T & const_reference
void * handle(void) const
smart_ptr< T > & operator=(const T &data)
bool operator!(void) const
smart_ptr_nocopy< T > & operator=(const smart_ptr_nocopy< T > &r)
void alias(const smart_ptr_base< T, C, COUNTER > &)
smart_ptr_clone(const T &data)
smart_ptr< T > & operator=(const smart_ptr< T > &r)
smart_ptr_nocopy< T > & operator=(const T &data)
bool aliases(const smart_ptr_base< T, C, COUNTER > &) const
void make_alias(void *handle)
smart_ptr_nocopy(const T &data)
void copy(const smart_ptr_base< T, C, COUNTER > &)
smart_ptr_clone< T > & operator=(const T &data)