PixelLightAPI  .
Public Member Functions
PLCore::SmartPtr< AType > Class Template Reference

Smart pointer template. More...

#include <SmartPtr.h>

List of all members.

Public Member Functions

 SmartPtr ()
 Constructor.
 SmartPtr (AType *pPtr)
 Constructor.
 SmartPtr (const SmartPtr< AType > &pPtr)
 Constructor.
 ~SmartPtr ()
 Destructor.
SmartPtr< AType > & operator= (AType *pPtr)
 Assign a pointer.
SmartPtr< AType > & operator= (const SmartPtr< AType > &cPtr)
 Assign a smart pointer.
AType * GetPointer () const
 Get a direct pointer to the object.
AType * operator-> () const
 Get a pointer to access the object.
 operator AType * () const
 Cast to a pointer to the object.
bool operator! () const
 Check if the pointer is not a null pointer.
bool operator== (AType *pPtr) const
 Check for equality.
bool operator== (const SmartPtr< AType > &cPtr) const
 Check for equality.
bool operator!= (AType *pPtr) const
 Check for equality.
bool operator!= (const SmartPtr< AType > &cPtr) const
 Check for equality.

Detailed Description

template<class AType>
class PLCore::SmartPtr< AType >

Smart pointer template.


Constructor & Destructor Documentation

template<class AType >
PLCore::SmartPtr< AType >::SmartPtr ( )
template<class AType >
PLCore::SmartPtr< AType >::SmartPtr ( AType *  pPtr)

Constructor.

Parameters:
[in]pPtrDirect pointer to initialize with, can be a null pointer
template<class AType >
PLCore::SmartPtr< AType >::SmartPtr ( const SmartPtr< AType > &  pPtr)

Constructor.

Parameters:
[in]pPtrSmart pointer to initialize with
template<class AType >
PLCore::SmartPtr< AType >::~SmartPtr ( )

Destructor.


Member Function Documentation

template<class AType >
SmartPtr< AType > & PLCore::SmartPtr< AType >::operator= ( AType *  pPtr)

Assign a pointer.

Parameters:
[in]pPtrDirect pointer to assign, can be a null pointer
Returns:
Reference to the smart pointer
template<class AType >
SmartPtr< AType > & PLCore::SmartPtr< AType >::operator= ( const SmartPtr< AType > &  cPtr)

Assign a smart pointer.

Parameters:
[in]cPtrSmart pointer to assign
Returns:
Reference to the smart pointer
template<class AType >
AType * PLCore::SmartPtr< AType >::GetPointer ( ) const

Get a direct pointer to the object.

Returns:
Pointer to the object, can be a null pointer
template<class AType >
AType * PLCore::SmartPtr< AType >::operator-> ( ) const

Get a pointer to access the object.

Returns:
Pointer to the object, can be a null pointer
template<class AType >
PLCore::SmartPtr< AType >::operator AType * ( ) const

Cast to a pointer to the object.

Returns:
Pointer to the object, can be a null pointer
template<class AType >
bool PLCore::SmartPtr< AType >::operator! ( ) const

Check if the pointer is not a null pointer.

Returns:
'true' if the pointer is not a null pointer
template<class AType >
bool PLCore::SmartPtr< AType >::operator== ( AType *  pPtr) const

Check for equality.

Parameters:
[in]pPtrDirect pointer to compare with, can be a null pointer
Returns:
'true' if the two pointers are equal
template<class AType >
bool PLCore::SmartPtr< AType >::operator== ( const SmartPtr< AType > &  cPtr) const

Check for equality.

Parameters:
[in]cPtrSmart pointer to compare with
Returns:
'true' if the two pointers are equal
template<class AType >
bool PLCore::SmartPtr< AType >::operator!= ( AType *  pPtr) const

Check for equality.

Parameters:
[in]pPtrDirect pointer to compare with, can be a null pointer
Returns:
'true' if the two pointers are not equal
template<class AType >
bool PLCore::SmartPtr< AType >::operator!= ( const SmartPtr< AType > &  cPtr) const

Check for equality.

Parameters:
[in]cPtrSmart pointer to compare with
Returns:
'true' if the two pointers are not equal

The documentation for this class was generated from the following files:


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:25
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported