Bakery::sharedptr
sharedptr.h
typename T_obj T_obj
size_t typedef size_t Bakery::sharedptr< T_obj >::size_type size_type
size_type * size_type* Bakery::sharedptr< T_obj >::m_pRefCount m_pRefCount Bakery::sharedptr< T_obj >::operator= Bakery::sharedptr< T_obj >::ref Bakery::sharedptr< T_obj >::unref
T_obj * T_obj* Bakery::sharedptr< T_obj >::m_pobj m_pobj Bakery::sharedptr< T_obj >::obj Bakery::sharedptr< T_obj >::operator bool Bakery::sharedptr< T_obj >::operator* Bakery::sharedptr< T_obj >::operator-> Bakery::sharedptr< T_obj >::operator= Bakery::sharedptr< T_obj >::ref Bakery::sharedptr< T_obj >::unref
Bakery::sharedptr< T_obj >::sharedptr
()
sharedptr

Allocate a new instance.

Bakery::sharedptr< T_obj >::sharedptr
(T_obj *pobj)
sharedptr
T_obj * pobj

Take ownership.

Bakery::sharedptr< T_obj >::ref
Bakery::sharedptr< T_obj >::sharedptr
(const sharedptr &src)
sharedptr
const sharedptr & src

Share ownership.

Bakery::sharedptr< T_obj >::ref
sharedptr & sharedptr< T_obj > & Bakery::sharedptr< T_obj >::operator= (const sharedptr &src) operator= const sharedptr & src

Share ownership.

Bakery::sharedptr< T_obj >::m_pobj
Bakery::sharedptr< T_obj >::m_pRefCount
Bakery::sharedptr< T_obj >::ref
Bakery::sharedptr< T_obj >::unref
Bakery::sharedptr< T_obj >::~sharedptr
()
~sharedptr
Bakery::sharedptr< T_obj >::unref
T_obj & T_obj & Bakery::sharedptr< T_obj >::operator* () operator*

Dereferencing.

Bakery::sharedptr< T_obj >::m_pobj
const T_obj & const T_obj & Bakery::sharedptr< T_obj >::operator* () const operator*

Dereferencing.

Bakery::sharedptr< T_obj >::m_pobj
T_obj * T_obj * Bakery::sharedptr< T_obj >::operator-> () const operator->

Dereferencing.

Use the methods of the underlying instance like so:

    refptr->memberfun()

Bakery::sharedptr< T_obj >::m_pobj
Bakery::sharedptr< T_obj >::operator bool
() const
operator bool

Test whether the RefPtr<> points to any underlying instance.

Mimics usage of ordinary pointers:

    if(ptr)
    do_something();

Bakery::sharedptr< T_obj >::m_pobj
T_obj * T_obj * Bakery::sharedptr< T_obj >::obj () obj

Get the underlying instance:.

Bakery::sharedptr< T_obj >::m_pobj
const T_obj * const T_obj * Bakery::sharedptr< T_obj >::obj () const obj

Get the underlying instance:.

Bakery::sharedptr< T_obj >::m_pobj
void void Bakery::sharedptr< T_obj >::ref () ref Bakery::sharedptr< T_obj >::m_pobj Bakery::sharedptr< T_obj >::m_pRefCount Bakery::sharedptr< T_obj >::operator= Bakery::sharedptr< T_obj >::sharedptr
void void Bakery::sharedptr< T_obj >::unref () unref Bakery::sharedptr< T_obj >::m_pobj Bakery::sharedptr< T_obj >::m_pRefCount Bakery::sharedptr< T_obj >::operator= Bakery::sharedptr< T_obj >::~sharedptr

A shared reference-counting smart-pointer.

Bakery::sharedptr< T_obj >
m_pobj
T_obj
- Bakery::sharedptr
  m_pobj
- Bakery::sharedptr
  m_pRefCount
- Bakery::sharedptr
  obj
- Bakery::sharedptr
  obj
- Bakery::sharedptr
  operator bool
- Bakery::sharedptr
  operator*
- Bakery::sharedptr
  operator*
- Bakery::sharedptr
  operator->
- Bakery::sharedptr
  operator=
- Bakery::sharedptr
  ref
- Bakery::sharedptr
  sharedptr
- Bakery::sharedptr
  sharedptr
- Bakery::sharedptr
  sharedptr
- Bakery::sharedptr
  size_type
- Bakery::sharedptr
  unref
- Bakery::sharedptr
  ~sharedptr