#include <smart_ptr.h>
Classes | |
struct | Insipid |
struct | Tester |
Public Types | |
typedef SP::PointerType | PointerType |
typedef SP::StoredType | StoredType |
typedef SP::ReferenceType | ReferenceType |
typedef Select < OP::destructiveCopy, CSmartPtr, const CSmartPtr > ::Result | CopyArg |
Public Member Functions | |
CSmartPtr () | |
CSmartPtr (ExplicitArg p) | |
CSmartPtr (ImplicitArg p) | |
CSmartPtr (CopyArg &rhs) | |
template<typename T1 , template< class > class OP1, class CP1 , template< class > class KP1, template< class > class SP1> | |
CSmartPtr (const CSmartPtr< T1, OP1, CP1, KP1, SP1 > &rhs) | |
template<typename T1 , template< class > class OP1, class CP1 , template< class > class KP1, template< class > class SP1> | |
CSmartPtr (CSmartPtr< T1, OP1, CP1, KP1, SP1 > &rhs) | |
CSmartPtr (ByRef< CSmartPtr > rhs) | |
operator ByRef< CSmartPtr > () | |
CSmartPtr & | operator= (CopyArg &rhs) |
template<typename T1 , template< class > class OP1, class CP1 , template< class > class KP1, template< class > class SP1> | |
CSmartPtr & | operator= (const CSmartPtr< T1, OP1, CP1, KP1, SP1 > &rhs) |
template<typename T1 , template< class > class OP1, class CP1 , template< class > class KP1, template< class > class SP1> | |
CSmartPtr & | operator= (CSmartPtr< T1, OP1, CP1, KP1, SP1 > &rhs) |
void | Swap (CSmartPtr &rhs) |
~CSmartPtr () | |
PointerType | operator-> () |
PointerType | operator-> () const |
ReferenceType | operator* () |
ReferenceType | operator* () const |
bool | operator! () const |
template<typename T1 , template< class > class OP1, class CP1 , template< class > class KP1, template< class > class SP1> | |
bool | operator== (const CSmartPtr< T1, OP1, CP1, KP1, SP1 > &rhs) const |
template<typename T1 , template< class > class OP1, class CP1 , template< class > class KP1, template< class > class SP1> | |
bool | operator!= (const CSmartPtr< T1, OP1, CP1, KP1, SP1 > &rhs) const |
template<typename T1 , template< class > class OP1, class CP1 , template< class > class KP1, template< class > class SP1> | |
bool | operator< (const CSmartPtr< T1, OP1, CP1, KP1, SP1 > &rhs) const |
operator unspecified_boolean_type () const | |
operator AutomaticConversionResult () const | |
Private Types | |
typedef StoragePolicy< T > | SP |
typedef OwnershipPolicy < typename StoragePolicy< T > ::PointerType > | OP |
typedef CheckingPolicy < typename StoragePolicy< T > ::StoredType > | KP |
typedef ConversionPolicy | CP |
typedef const StoredType & | ImplicitArg |
typedef Select< false, const StoredType &, NeverMatched > ::Result | ExplicitArg |
typedef Select< CP::allow, Tester, unspecified_boolean_type_ > ::Result | unspecified_boolean_type |
typedef Select< CP::allow, PointerType, Insipid >::Result | AutomaticConversionResult |
typedef void(Tester::* | unspecified_boolean_type_ )() |
Friends | |
void | Release (CSmartPtr &sp, typename SP::StoredType &p) |
void | Reset (CSmartPtr &sp, typename SP::StoredType p) |
Definition at line 504 of file smart_ptr.h.
typedef StoragePolicy<T> CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::SP [private] |
Definition at line 510 of file smart_ptr.h.
typedef OwnershipPolicy<typename StoragePolicy<T>::PointerType> CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::OP [private] |
Definition at line 511 of file smart_ptr.h.
typedef CheckingPolicy<typename StoragePolicy<T>::StoredType> CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::KP [private] |
Definition at line 512 of file smart_ptr.h.
typedef ConversionPolicy CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::CP [private] |
Definition at line 513 of file smart_ptr.h.
typedef SP::PointerType CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::PointerType |
Definition at line 516 of file smart_ptr.h.
typedef SP::StoredType CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::StoredType |
Definition at line 517 of file smart_ptr.h.
typedef SP::ReferenceType CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::ReferenceType |
Definition at line 518 of file smart_ptr.h.
typedef Select<OP::destructiveCopy, CSmartPtr, const CSmartPtr>::Result CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::CopyArg |
Definition at line 522 of file smart_ptr.h.
typedef const StoredType& CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::ImplicitArg [private] |
Definition at line 525 of file smart_ptr.h.
typedef Select<false, const StoredType&, NeverMatched>::Result CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::ExplicitArg [private] |
Definition at line 532 of file smart_ptr.h.
typedef Select<CP::allow, Tester, unspecified_boolean_type_>::Result CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::unspecified_boolean_type [private] |
Definition at line 719 of file smart_ptr.h.
typedef Select<CP::allow, PointerType, Insipid>::Result CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::AutomaticConversionResult [private] |
Definition at line 736 of file smart_ptr.h.
typedef void(Tester::* CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::unspecified_boolean_type_)() [private] |
CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::CSmartPtr | ( | ExplicitArg | p | ) | [inline, explicit] |
CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::CSmartPtr | ( | ImplicitArg | p | ) | [inline] |
CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::CSmartPtr | ( | const CSmartPtr< T1, OP1, CP1, KP1, SP1 > & | rhs | ) | [inline] |
CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::CSmartPtr | ( | CSmartPtr< T1, OP1, CP1, KP1, SP1 > & | rhs | ) | [inline] |
CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::CSmartPtr | ( | ByRef< CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy > > | rhs | ) | [inline] |
CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::~CSmartPtr | ( | ) | [inline] |
Definition at line 627 of file smart_ptr.h.
00628 { 00629 if (OP::Release(GetImpl(*static_cast<SP*>(this)))) 00630 { 00631 SP::Destroy(); 00632 } 00633 }
CSmartPtr& CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::operator= | ( | CopyArg & | rhs | ) | [inline] |
Definition at line 582 of file smart_ptr.h.
00583 { 00584 CSmartPtr temp(rhs); 00585 temp.Swap(*this); 00586 return *this; 00587 }
CSmartPtr& CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::operator= | ( | const CSmartPtr< T1, OP1, CP1, KP1, SP1 > & | rhs | ) | [inline] |
Definition at line 597 of file smart_ptr.h.
00598 { 00599 CSmartPtr temp(rhs); 00600 temp.Swap(*this); 00601 return *this; 00602 }
CSmartPtr& CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::operator= | ( | CSmartPtr< T1, OP1, CP1, KP1, SP1 > & | rhs | ) | [inline] |
Definition at line 612 of file smart_ptr.h.
00613 { 00614 CSmartPtr temp(rhs); 00615 temp.Swap(*this); 00616 return *this; 00617 }
void CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::Swap | ( | CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy > & | rhs | ) | [inline] |
PointerType CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::operator-> | ( | ) | [inline] |
Definition at line 644 of file smart_ptr.h.
00645 { 00646 KP::OnDereference(GetImplRef(*this)); 00647 return SP::operator->(); 00648 }
PointerType CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::operator-> | ( | ) | const [inline] |
Definition at line 650 of file smart_ptr.h.
00651 { 00652 KP::OnDereference(GetImplRef(*this)); 00653 return SP::operator->(); 00654 }
ReferenceType CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::operator* | ( | ) | [inline] |
Definition at line 656 of file smart_ptr.h.
00657 { 00658 KP::OnDereference(GetImplRef(*this)); 00659 return SP::operator*(); 00660 }
ReferenceType CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::operator* | ( | ) | const [inline] |
Definition at line 662 of file smart_ptr.h.
00663 { 00664 KP::OnDereference(GetImplRef(*this)); 00665 return SP::operator*(); 00666 }
bool CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::operator! | ( | ) | const [inline] |
bool CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::operator== | ( | const CSmartPtr< T1, OP1, CP1, KP1, SP1 > & | rhs | ) | const [inline] |
bool CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::operator!= | ( | const CSmartPtr< T1, OP1, CP1, KP1, SP1 > & | rhs | ) | const [inline] |
bool CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::operator< | ( | const CSmartPtr< T1, OP1, CP1, KP1, SP1 > & | rhs | ) | const [inline] |
CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::operator unspecified_boolean_type | ( | ) | const [inline] |
Definition at line 723 of file smart_ptr.h.
00724 { 00725 return !*this ? 0 : &Tester::dummy; 00726 }
CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy >::operator AutomaticConversionResult | ( | ) | const [inline] |
void Release | ( | CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy > & | sp, | |
typename SP::StoredType & | p | |||
) | [friend] |
void Reset | ( | CSmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy > & | sp, | |
typename SP::StoredType | p | |||
) | [friend] |