#include <arg_deep_copy.h>
Public Members | |||
body_part_ptr () | |||
Default 0 initialisation. | |||
explicit | body_part_ptr (pointee_type* p) throw () | ||
Construct owining p. | |||
const pointee_type* | get () const | ||
Return contents (const). | |||
pointee_type* | get () | ||
Return contents (non-const). | |||
const pointee_type* | operator-> () const | ||
Indirection operator(const). | |||
pointee_type* | operator-> () | ||
Indirection operator (non-const). | |||
const pointee_type& | operator * () const | ||
Dereference operator(const). | |||
pointee_type& | operator * () | ||
Dereference operator (non-const). | |||
pointee_type* | release () | ||
Release ownership (and becomes 0). | |||
void | reset (pointee_type* p) throw () | ||
Delete existing contents (and take ownership of p). | |||
void | swap (deep_copy_ptr<pointee_type>& with) throw () | ||
Swaps contents with "with". | |||
operator deep_copy_ptr () | |||
Conversion to a non-const deep_copy_ptr. |
(A non-const body_part_ptr behaves as a deep_copy_ptr while a const one provides const access to the referenced object.)
The correct algorithm for copying is resolved by using the arg::deep_copy() template. This means that the referenced object will be copied using the copy construction unless it is tagged by inheriting from arg::cloneable or an overload of arg::deep_copy() is provided.
All methods support the strong exception safety guarantee with the proviso that the referenced type must have a non-throwing destructor.
template<class pointee_type> arg::body_part_ptr<pointee_type>::body_part_ptr<pointee_type> () |
Default 0 initialisation.
template<class pointee_type> explicit arg::body_part_ptr<pointee_type>::body_part_ptr<pointee_type> (pointee_type * p) throw () |
Construct owining p.
template<class pointee_type> const pointee_type * arg::body_part_ptr<pointee_type>::get () const [inline]
|
Return contents (const).
template<class pointee_type> pointee_type * arg::body_part_ptr<pointee_type>::get () [inline]
|
Return contents (non-const).
template<class pointee_type> const pointee_type * arg::body_part_ptr<pointee_type>::operator-> () const [inline]
|
Indirection operator(const).
template<class pointee_type> pointee_type * arg::body_part_ptr<pointee_type>::operator-> () [inline]
|
Indirection operator (non-const).
template<class pointee_type> const pointee_type & arg::body_part_ptr<pointee_type>::operator * () const [inline]
|
Dereference operator(const).
template<class pointee_type> pointee_type & arg::body_part_ptr<pointee_type>::operator * () [inline]
|
Dereference operator (non-const).
template<class pointee_type> pointee_type * arg::body_part_ptr<pointee_type>::release () [inline]
|
Release ownership (and becomes 0).
template<class pointee_type> void arg::body_part_ptr<pointee_type>::reset (pointee_type * p) throw () [inline]
|
Delete existing contents (and take ownership of p).
template<class pointee_type> void arg::body_part_ptr<pointee_type>::swap (deep_copy_ptr<pointee_type>& with) throw () [inline]
|
Swaps contents with "with".
template<class pointee_type> arg::body_part_ptr<pointee_type>::operator deep_copy_ptr<pointee_type>& () [inline]
|
Conversion to a non-const deep_copy_ptr.