Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members Related Pages

# aka2::deep_ptr< T > Class Template Reference

smart pointer with deep copy. More...

`#include <deep_ptr.h>`

List of all members.

## Public Methods
| deep_ptr (T *ptr=0)
| deep_ptr (const deep_ptr &rhs)
void | reset (T *ptr=0)
const deep_ptr< T > & | operator= (const deep_ptr< T > &rhs)
bool | operator== (const deep_ptr< T > &rhs)
T * | get () const
T & | operator * () const
T * | operator-> () const

## Detailed Description

### template<class T>
class aka2::deep_ptr< T >

smart pointer with deep copy.

Deep ptr is a smart pointer, but it replicate object on copy (deep copy).

Definition at line 19 of file deep_ptr.h.

## Constructor & Destructor Documentation

template<class T>
aka2::deep_ptr< T >::deep_ptr | ( | T * | ptr = 0 | ) | `[inline, explicit]`

  | constructor Parameters:
  ptr | pointer
Definition at line 27 of file deep_ptr.h.

template<class T>
aka2::deep_ptr< T >::deep_ptr | ( | const deep_ptr< T > & | rhs | ) | `[inline]`

  | copy constructor Instance(ptr_) in deep_ptr<> is replicated. Parameters:
  rhs | to copy
Definition at line 38 of file deep_ptr.h. References aka2::deep_ptr< T >::ptr_.

## Member Function Documentation

template<class T>
T* aka2::deep_ptr< T >::get | ( |  | ) | const`[inline]`

| getter for pointer Returns: pointer Definition at line 81 of file deep_ptr.h.

template<class T>
T& aka2::deep_ptr< T >::operator * | ( |  | ) | const`[inline]`

| dereference operator Returns: T& Definition at line 87 of file deep_ptr.h.

template<class T>
T* aka2::deep_ptr< T >::operator-> | ( |  | ) | const`[inline]`

| arrow operator Returns: T* Definition at line 92 of file deep_ptr.h.

template<class T>
const deep_ptr<T>& aka2::deep_ptr< T >::operator= | ( | const deep_ptr< T > & | rhs | ) | `[inline]`

  | substution operator Parameters:
  rhs | to copy
Returns: *this Definition at line 59 of file deep_ptr.h. References aka2::deep_ptr< T >::ptr_.

template<class T>
bool aka2::deep_ptr< T >::operator== | ( | const deep_ptr< T > & | rhs | ) | `[inline]`

  | equality operator Parameters:
  rhs | to compare
Returns: true if pointer value is the same, otherwise false. Definition at line 73 of file deep_ptr.h. References aka2::deep_ptr< T >::ptr_.

template<class T>
void aka2::deep_ptr< T >::reset | ( | T * | ptr = 0 | ) | `[inline]`

  | reset with another pointer. Parameters:
  ptr | pointer
Definition at line 49 of file deep_ptr.h.

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

- deep_ptr.h