My Project
OSSmartPtr.hpp File Reference
#include "OSReferenced.hpp"

Go to the source code of this file.

Classes

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

Functions

OSSmartPtr friend function declarations.
template<class U >
UGetRawPtr (const OSSmartPtr< U > &smart_ptr)
 
template<class U >
OSSmartPtr< const UConstPtr (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)
 
template<class U1 , class U2 >
bool ComparePointers (const U1 *lhs, const U2 *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)

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 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 )

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 499 of file OSSmartPtr.hpp.

◆ operator==() [2/3]

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

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 507 of file OSSmartPtr.hpp.

◆ operator==() [3/3]

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

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 514 of file OSSmartPtr.hpp.

◆ operator!=() [1/3]

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

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 521 of file OSSmartPtr.hpp.

◆ operator!=() [2/3]

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

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 528 of file OSSmartPtr.hpp.

◆ operator!=() [3/3]

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

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 535 of file OSSmartPtr.hpp.

◆ ComparePointers()

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

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 478 of file OSSmartPtr.hpp.