- Cal3D 0.11 API Reference - |
A container-safe smart pointer used for refcounted classes. More...
#include <refptr.h>
Public Types | |
typedef T | element_type |
typedef RefPtr< T > | this_type |
typedef T *this_type:: | unspecified_bool_type |
Inspired by boost's smart_ptr facilities. | |
Public Member Functions | |
RefPtr (T *ptr=0) | |
RefPtr (const RefPtr< T > &ptr) | |
template<typename U > | |
RefPtr< T > & | operator= (U *ptr) |
template<typename U > | |
RefPtr< T > & | operator= (const RefPtr< U > &ptr) |
RefPtr< T > & | operator= (const RefPtr< T > &ptr) |
Need this to override the built-in operator=. | |
bool | operator! () const |
Need this to override the built-in operator! | |
T * | operator-> () const |
T & | operator* () const |
operator unspecified_bool_type () const | |
This lets us write code like: if (ptr && ptr->valid()) | |
T * | get () const |
A container-safe smart pointer used for refcounted classes.