net_instaweb::RefCountedObj< T > Class Template Reference

#include "ref_counted_ptr.h"

List of all members.

Classes

struct  Data

Public Member Functions

 RefCountedObj (const T &val)
bool unique () const
T * get ()
const T * get () const
T * operator-> ()
const T * operator-> () const
T & operator* ()
const T & operator* () const

Protected Attributes

RefCountedPtr< Datadata_ptr_

Detailed Description

template<class T>
class net_instaweb::RefCountedObj< T >

If you can't inherit off RefCounted due to using a pre-existing class, you can use RefCountedObj instead. This however is limited to having a single type (so no polymorphism). It also has slightly different semantics in that it initializes to a default-constructed object and not NULL.


Member Function Documentation

template<class T>
bool net_instaweb::RefCountedObj< T >::unique (  )  const [inline]

Determines whether any other RefCountedObj 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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Tue May 29 16:34:15 2012 for Page Speed Optimization Libraries by  doxygen 1.6.3