Page Speed Optimization Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Friends | List of all members
net_instaweb::RefCountedPtr< T > Class Template Reference

#include "ref_counted_ptr.h"

Public Member Functions

 RefCountedPtr (T *t)
 RefCountedPtr (const RefCountedPtr< T > &src)
template<class U >
 RefCountedPtr (const RefCountedPtr< U > &src)
RefCountedPtr< T > & operator= (const RefCountedPtr< T > &other)
template<class U >
RefCountedPtr< T > & operator= (const RefCountedPtr< U > &other)
T * operator-> () const
T * get () const
bool unique () const
template<typename U >
RefCountedPtr< U > StaticCast () const
void clear ()
void reset (T *ptr)
void reset (const RefCountedPtr &src)


template<class U >
class RefCountedPtr

Detailed Description

template<class T>
class net_instaweb::RefCountedPtr< T >

Template class to help make reference-counted pointers. You can use a typedef or subclass RefCountedPtr<YourClass>. YourClass has to inherit off RefCounted<T>.

Member Function Documentation

template<class T>
RefCountedPtr<T>& net_instaweb::RefCountedPtr< T >::operator= ( const RefCountedPtr< T > &  other)

ref before deref to deal with self-assignment.

template<class T>
bool net_instaweb::RefCountedPtr< T >::unique ( ) const

Determines whether any other RefCountedPtr objects share the same storage. This can be used to create copy-on-write semantics if desired.

The documentation for this class was generated from the following file: