Ptr< _Tp, _Bt > Class Template Reference

Counted '_Tp *'. Support construction/assignment via dynamic_cast from PtrBase<_Bt>. More...

#include <Rep.h>

Inheritance diagram for Ptr< _Tp, _Bt >:

PtrBase< _Bt > RepPtrBase

List of all members.

Public Member Functions

 Ptr (_Tp *ptr=0)
 Ptr (const Ptr &rhs)
 Ptr (const PtrBase< _Bt > &rhs)
Ptroperator= (_Tp *ptr)
Ptroperator= (const Ptr &rhs)
Ptroperator= (const PtrBase< _Bt > &rhs)
_Tp * operator-> () const
_Tp & operator* () const

Static Public Member Functions

static Ptr cast_away_const (constPtr< _Tp, _Bt > rhs)

Protected Member Functions

virtual const Reprefbase () const
virtual _Bt * base () const

Private Attributes

RepPtrStore< _Tp, _Bt > _ptr


Detailed Description

template<typename _Tp, typename _Bt = _Tp>
class Ptr< _Tp, _Bt >

Counted '_Tp *'. Support construction/assignment via dynamic_cast from PtrBase<_Bt>.

Constructor & Destructor Documentation

template<typename _Tp, typename _Bt = _Tp>
Ptr< _Tp, _Bt >::Ptr ( _Tp *  ptr = 0  )  [inline]

Constructor. From '_Tp *'. Defaults to NULL.

template<typename _Tp, typename _Bt = _Tp>
Ptr< _Tp, _Bt >::Ptr ( const Ptr< _Tp, _Bt > &  rhs  )  [inline]

CopyConstructor. From Ptr<_Tp,_Bt>.

template<typename _Tp, typename _Bt = _Tp>
Ptr< _Tp, _Bt >::Ptr ( const PtrBase< _Bt > &  rhs  )  [inline]

Constructor. From Ptr<..,_Bt>, i.e. pointer to an object that inherits _Bt.

References Ptr< _Tp, _Bt >::_ptr, and PtrBase< _Bt >::getBase().


Member Function Documentation

template<typename _Tp, typename _Bt = _Tp>
virtual _Bt* Ptr< _Tp, _Bt >::base (  )  const [inline, protected, virtual]

Required by inherited PtrBase.

Implements PtrBase< _Bt >.

References Ptr< _Tp, _Bt >::_ptr.

template<typename _Tp, typename _Bt = _Tp>
static Ptr Ptr< _Tp, _Bt >::cast_away_const ( constPtr< _Tp, _Bt >  rhs  )  [inline, static]

ConstCast. Create a Ptr from constPtr ('_Tp*' from 'const _Tp*').

template<typename _Tp, typename _Bt = _Tp>
_Tp& Ptr< _Tp, _Bt >::operator* (  )  const [inline]

Access the _Tp object (or SEGV if _ptr is NULL)

References Ptr< _Tp, _Bt >::_ptr.

template<typename _Tp, typename _Bt = _Tp>
_Tp* Ptr< _Tp, _Bt >::operator-> (  )  const [inline]

Access forwarded to the _Tp object (or SEGV if _ptr is NULL)

References Ptr< _Tp, _Bt >::_ptr.

template<typename _Tp, typename _Bt = _Tp>
Ptr& Ptr< _Tp, _Bt >::operator= ( const PtrBase< _Bt > &  rhs  )  [inline]

Assign from Ptr<..,_Bt>, i.e. pointer to an object that inherits _Bt.

References Ptr< _Tp, _Bt >::_ptr, and PtrBase< _Bt >::getBase().

template<typename _Tp, typename _Bt = _Tp>
Ptr& Ptr< _Tp, _Bt >::operator= ( const Ptr< _Tp, _Bt > &  rhs  )  [inline]

Assign from Ptr<_Tp,_Bt>.

References Ptr< _Tp, _Bt >::_ptr.

template<typename _Tp, typename _Bt = _Tp>
Ptr& Ptr< _Tp, _Bt >::operator= ( _Tp *  ptr  )  [inline]

Assign from '_Tp *'.

References Ptr< _Tp, _Bt >::_ptr.

template<typename _Tp, typename _Bt = _Tp>
virtual const Rep* Ptr< _Tp, _Bt >::refbase (  )  const [inline, protected, virtual]

Required by inherited RepPtrBase.

Implements RepPtrBase.

References Ptr< _Tp, _Bt >::_ptr.


Member Data Documentation

template<typename _Tp, typename _Bt = _Tp>
RepPtrStore<_Tp,_Bt> Ptr< _Tp, _Bt >::_ptr [private]


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

Generated on a sunny day for yast2-core by doxygen 1.5.9