OS  2.10.1
Classes | Functions
OSSmartPtr.hpp File Reference
#include "OSReferenced.hpp"
+ Include dependency graph for OSSmartPtr.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  OSSmartPtr< T >
 Template class for Smart Pointers. More...
 

Functions

template<class U1 , class U2 >
bool ComparePointers (const U1 *lhs, const U2 *rhs)
 
OSSmartPtr friend function declarations.
template<class U >
U * GetRawPtr (const OSSmartPtr< U > &smart_ptr)
 
template<class U >
OSSmartPtr< const U > ConstPtr (const OSSmartPtr< U > &smart_ptr)
 
template<class U >
bool IsNull (const OSSmartPtr< U > &smart_ptr)
 
template<class U >
bool IsValid (const OSSmartPtr< U > &smart_ptr)
 
template<class U1 , class U2 >
bool operator== (const OSSmartPtr< U1 > &lhs, const OSSmartPtr< U2 > &rhs)
 
template<class U1 , class U2 >
bool operator== (const OSSmartPtr< U1 > &lhs, U2 *raw_rhs)
 
template<class U1 , class U2 >
bool operator== (U1 *lhs, const OSSmartPtr< U2 > &raw_rhs)
 
template<class U1 , class U2 >
bool operator!= (const OSSmartPtr< U1 > &lhs, const OSSmartPtr< U2 > &rhs)
 
template<class U1 , class U2 >
bool operator!= (const OSSmartPtr< U1 > &lhs, U2 *raw_rhs)
 
template<class U1 , class U2 >
bool operator!= (U1 *lhs, const OSSmartPtr< U2 > &raw_rhs)
 

Function Documentation

§ GetRawPtr()

template<class U >
U * GetRawPtr ( const OSSmartPtr< U > &  smart_ptr)

Use to get the value of the raw ptr (i.e. to pass to other methods/functions, etc.) Note: This method does NOT copy, therefore, modifications using this value modify the underlying object contained by the OSSmartPtr, NEVER delete this returned value.

Definition at line 452 of file OSSmartPtr.hpp.

§ ConstPtr()

template<class U >
OSSmartPtr< const U > ConstPtr ( const OSSmartPtr< U > &  smart_ptr)

Definition at line 458 of file OSSmartPtr.hpp.

§ IsNull()

template<class U >
bool IsNull ( const OSSmartPtr< U > &  smart_ptr)

Use this to check if the OSSmartPtr IsNull. This is preferred to if(GetRawPtr(sp) == NULL)

Definition at line 471 of file OSSmartPtr.hpp.

§ IsValid()

template<class U >
bool IsValid ( const OSSmartPtr< U > &  smart_ptr)

Use this to check if the OSSmartPtr is not null This is preferred to if(GetRawPtr(sp) != NULL)

Definition at line 465 of file OSSmartPtr.hpp.

§ operator==() [1/3]

template<class U1 , class U2 >
bool operator== ( const OSSmartPtr< U1 > &  lhs,
const OSSmartPtr< U2 > &  rhs 
)

Definition at line 499 of file OSSmartPtr.hpp.

§ operator==() [2/3]

template<class U1 , class U2 >
bool operator== ( const OSSmartPtr< U1 > &  lhs,
U2 *  raw_rhs 
)

Definition at line 507 of file OSSmartPtr.hpp.

§ operator==() [3/3]

template<class U1 , class U2 >
bool operator== ( U1 *  lhs,
const OSSmartPtr< U2 > &  raw_rhs 
)

Definition at line 514 of file OSSmartPtr.hpp.

§ operator!=() [1/3]

template<class U1 , class U2 >
bool operator!= ( const OSSmartPtr< U1 > &  lhs,
const OSSmartPtr< U2 > &  rhs 
)

Definition at line 521 of file OSSmartPtr.hpp.

§ operator!=() [2/3]

template<class U1 , class U2 >
bool operator!= ( const OSSmartPtr< U1 > &  lhs,
U2 *  raw_rhs 
)

Definition at line 528 of file OSSmartPtr.hpp.

§ operator!=() [3/3]

template<class U1 , class U2 >
bool operator!= ( U1 *  lhs,
const OSSmartPtr< U2 > &  raw_rhs 
)

Definition at line 535 of file OSSmartPtr.hpp.

§ ComparePointers()

template<class U1 , class U2 >
bool ComparePointers ( const U1 *  lhs,
const U2 *  rhs 
)

Definition at line 478 of file OSSmartPtr.hpp.