yast2-core
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
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

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
 
- Public Member Functions inherited from RepPtrBase
 operator const void * () 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
 
- Protected Member Functions inherited from PtrBase< _Bt >
_Bt * getBase (const PtrBase &rhs) const
 
- Protected Member Functions inherited from RepPtrBase
virtual ~RepPtrBase ()
 

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 PtrBase< _Bt >::getBase(), and RepPtrStore< _Tp, _Bt >::tryAssign().

Member Function Documentation

template<typename _Tp, typename _Bt = _Tp>
virtual _Bt* Ptr< _Tp, _Bt >::base ( ) const
inlineprotectedvirtual

Required by inherited PtrBase.

Implements PtrBase< _Bt >.

References RepPtrStore< _Tp, _Bt >::base().

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

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= ( _Tp *  ptr)
inline

Assign from '_Tp *'.

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= ( const PtrBase< _Bt > &  rhs)
inline

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

References PtrBase< _Bt >::getBase(), and RepPtrStore< _Tp, _Bt >::tryAssign().

template<typename _Tp, typename _Bt = _Tp>
virtual const Rep* Ptr< _Tp, _Bt >::refbase ( ) const
inlineprotectedvirtual

Required by inherited RepPtrBase.

Implements RepPtrBase.

References RepPtrStore< _Tp, _Bt >::refbase().

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.8.8