zipios::SimpleSmartPointer< Type > Class Template Reference
SimpleSmartPointer is a simple reference counting smart pointer template. More...
#include <simplesmartptr.h>
Public Member Functions | |
Type * | get () const |
unsigned int | getReferenceCount () const |
Returns the reference count - For debugging purposes. More... | |
operator void * () const | |
bool | operator! () const |
bool | operator!= (const SimpleSmartPointer &sp) const |
bool | operator!= (const Type *p) const |
Type & | operator* () const |
Type * | operator-> () const |
SimpleSmartPointer & | operator= (const SimpleSmartPointer &src) |
template<class T2 > | |
SimpleSmartPointer & | operator= (const SimpleSmartPointer< T2 > &src) |
SimpleSmartPointer & | operator= (Type *src) |
bool | operator== (const SimpleSmartPointer &sp) const |
bool | operator== (const Type *p) const |
SimpleSmartPointer (const SimpleSmartPointer &src) | |
template<class T2 > | |
SimpleSmartPointer (const SimpleSmartPointer< T2 > &src) | |
SimpleSmartPointer (Type *p=0) | |
~SimpleSmartPointer () | |
Detailed Description
template<class Type>
class zipios::SimpleSmartPointer< Type >
SimpleSmartPointer is a simple reference counting smart pointer template.
The type pointed to must keep a reference count that is accessible through the two methods void ref() const and unsigned int unref() const. The type must also handle the reference count properly. The easiest way to do that is to use the ReferenceCount template class.
Constructor & Destructor Documentation
◆ SimpleSmartPointer() [1/3]
template<class Type >
zipios::SimpleSmartPointer< Type >::SimpleSmartPointer | ( | Type * | p = 0 | ) |
◆ SimpleSmartPointer() [2/3]
template<class Type >
template<class T2 >
zipios::SimpleSmartPointer< Type >::SimpleSmartPointer | ( | const SimpleSmartPointer< T2 > & | src | ) |
◆ SimpleSmartPointer() [3/3]
template<class Type >
zipios::SimpleSmartPointer< Type >::SimpleSmartPointer | ( | const SimpleSmartPointer< Type > & | src | ) |
◆ ~SimpleSmartPointer()
template<class Type >
zipios::SimpleSmartPointer< Type >::~SimpleSmartPointer | ( | ) |
Member Function Documentation
◆ get()
template<class Type >
Type* zipios::SimpleSmartPointer< Type >::get | ( | ) | const |
◆ getReferenceCount()
template<class Type >
unsigned int zipios::SimpleSmartPointer< Type >::getReferenceCount | ( | ) | const |
Returns the reference count - For debugging purposes.
◆ operator void *()
template<class Type >
zipios::SimpleSmartPointer< Type >::operator void * | ( | ) | const |
◆ operator!()
template<class Type >
bool zipios::SimpleSmartPointer< Type >::operator! | ( | ) | const |
◆ operator!=() [1/2]
template<class Type >
bool zipios::SimpleSmartPointer< Type >::operator!= | ( | const SimpleSmartPointer< Type > & | sp | ) | const |
References zipios::SimpleSmartPointer< Type >::get().
◆ operator!=() [2/2]
template<class Type >
bool zipios::SimpleSmartPointer< Type >::operator!= | ( | const Type * | p | ) | const |
◆ operator*()
template<class Type >
Type& zipios::SimpleSmartPointer< Type >::operator* | ( | ) | const |
◆ operator->()
template<class Type >
Type* zipios::SimpleSmartPointer< Type >::operator-> | ( | ) | const |
◆ operator=() [1/3]
template<class Type >
SimpleSmartPointer& zipios::SimpleSmartPointer< Type >::operator= | ( | const SimpleSmartPointer< Type > & | src | ) |
◆ operator=() [2/3]
template<class Type >
template<class T2 >
SimpleSmartPointer& zipios::SimpleSmartPointer< Type >::operator= | ( | const SimpleSmartPointer< T2 > & | src | ) |
◆ operator=() [3/3]
template<class Type >
SimpleSmartPointer& zipios::SimpleSmartPointer< Type >::operator= | ( | Type * | src | ) |
◆ operator==() [1/2]
template<class Type >
bool zipios::SimpleSmartPointer< Type >::operator== | ( | const SimpleSmartPointer< Type > & | sp | ) | const |
References zipios::SimpleSmartPointer< Type >::get().
◆ operator==() [2/2]
template<class Type >
bool zipios::SimpleSmartPointer< Type >::operator== | ( | const Type * | p | ) | const |
The documentation for this class was generated from the following file:
- src/zipios++/simplesmartptr.h