# RefPointer Class Template Reference

Templated smart pointer class. More...

`#include <yateclass.h>`

Inheritance diagram for RefPointer:

List of all members.

## Public Member Functions

| RefPointer ()
| RefPointer (const RefPointer< Obj > &value)
| RefPointer (Obj *object)
| ~RefPointer ()
RefPointer< Obj > & | operator= (const RefPointer< Obj > &value)
RefPointer< Obj > & | operator= (Obj *object)
| operator Obj * () const
Obj * | operator-> () const
Obj & | operator * () const

## Protected Member Functions

Obj * | pointer () const
void | assign (Obj *object=0)

## Detailed Description

### template<class Obj = RefObject>
class TelEngine::RefPointer< Obj >

Templated smart pointer class.

## Constructor & Destructor Documentation

RefPointer | ( |  | ) | `[inline]`

Default constructor - creates a null smart pointer

RefPointer | ( | const RefPointer< Obj > & | value | ) | `[inline]`

Copy constructor, references the object

Parameters:

  | value | Original RefPointer

RefPointer | ( | Obj * | object | ) | `[inline]`

Constructs an initialized smart pointer, references the object

Parameters:

  | object | Pointer to object

~RefPointer | ( |  | ) | `[inline]`

Destructs the pointer and dereferences the object

## Member Function Documentation

Obj* pointer | ( |  | ) | const`[inline, protected]`

Retrive the stored pointer

Returns:
  A typed pointer

void assign | ( | Obj * | object = `0` | ) | `[inline, protected]`

Set a new stored pointer

Parameters:

  | object | Pointer to the new stored object

RefPointer<Obj>& operator= | ( | const RefPointer< Obj > & | value | ) | `[inline]`

Assignment from smart pointer

RefPointer<Obj>& operator= | ( | Obj * | object | ) | `[inline]`

Assignment from regular pointer

operator Obj * | ( |  | ) | const`[inline]`

Conversion to regular pointer operator

Returns:
  The stored pointer

Obj* operator-> | ( |  | ) | const`[inline]`

Member access operator

Obj& operator * | ( |  | ) | const`[inline]`

Dereferencing operator

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

- yateclass.h