#include <Rep.h>

Public Member Functions | |
| operator const void * () const | |
Protected Member Functions | |
| BasicRepPtr () | |
| BasicRepPtr (Rep *ptr) | |
| BasicRepPtr (const BasicRepPtr &rhs) | |
| BasicRepPtr & | operator= (const BasicRepPtr &rhs) |
| ~BasicRepPtr () | |
| Rep * | repPtr () const |
Private Member Functions | |
| void | _assign (Rep *new_r) |
Private Attributes | |
| Rep * | _ptr |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const BasicRepPtr &obj) |
A BasicRepPtr is explicity constructed from a Rep*. It references Rep while it holds the pointer and adjusts the reference counter on copy and assignment.
It may serve as base for template classes operating on data classes derived from Rep. For example VarPtr.
| BasicRepPtr::BasicRepPtr | ( | ) | [inline, protected] |
Default ctor: NULL
| BasicRepPtr::BasicRepPtr | ( | Rep * | ptr | ) | [inline, explicit, protected] |
References RepPtrStore< _Tp, _Bt >::_assign().
| BasicRepPtr::BasicRepPtr | ( | const BasicRepPtr & | rhs | ) | [inline, protected] |
References RepPtrStore< _Tp, _Bt >::_assign(), and _ptr.
| BasicRepPtr::~BasicRepPtr | ( | ) | [inline, protected] |
References RepPtrStore< _Tp, _Bt >::_assign().
| BasicRepPtr::operator const void * | ( | ) | const [inline] |
Allow easy test for NULL.
| BasicRepPtr& BasicRepPtr::operator= | ( | const BasicRepPtr & | rhs | ) | [inline, protected] |
References RepPtrStore< _Tp, _Bt >::_assign(), and _ptr.
| Rep* BasicRepPtr::repPtr | ( | ) | const [inline, protected] |
| void BasicRepPtr::_assign | ( | Rep * | new_r | ) | [inline, private] |
Takes care of reference counter when assigning _ptr a new value.
References Rep::ref(), and Rep::unref().
| std::ostream& operator<< | ( | std::ostream & | str, | |
| const BasicRepPtr & | obj | |||
| ) | [friend] |
Print out the Rep object.
Rep* BasicRepPtr::_ptr [private] |
The Rep*.
Referenced by BasicRepPtr(), and operator=().
1.5.6