Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
Ref< T > Class Template Reference

#include <Reference.h>

Public Member Functions

 Ref ()
 Constructor. More...
 
 Ref (T *inRHS)
 
 Ref (const Ref< T > &inRHS)
 
 Ref (Ref< T > &&inRHS) noexcept
 
 ~Ref ()
 
Ref< T > & operator= (T *inRHS)
 Assignment operators. More...
 
Ref< T > & operator= (const Ref< T > &inRHS)
 
Ref< T > & operator= (Ref< T > &&inRHS) noexcept
 
 operator T* () const
 Casting operators. More...
 
T * operator-> () const
 Access like a normal pointer. More...
 
T & operator* () const
 
bool operator== (const T *inRHS) const
 Comparison. More...
 
bool operator== (const Ref< T > &inRHS) const
 
bool operator!= (const T *inRHS) const
 
bool operator!= (const Ref< T > &inRHS) const
 
T * GetPtr () const
 Get pointer. More...
 
void ** InternalGetPointer ()
 INTERNAL HELPER FUNCTION USED BY SERIALIZATION. More...
 

Friends

template<class T2 >
class RefConst
 

Detailed Description

template<class T>
class Ref< T >

Class for automatic referencing, this is the equivalent of a pointer to type T if you assign a value to this class it will increment the reference count by one of this object, and if you assign something else it will decrease the reference count of the first object again. If it reaches a reference count of zero it will be deleted

Constructor & Destructor Documentation

◆ Ref() [1/4]

template<class T >
Ref< T >::Ref ( )
inline

Constructor.

◆ Ref() [2/4]

template<class T >
Ref< T >::Ref ( T *  inRHS)
inline

◆ Ref() [3/4]

template<class T >
Ref< T >::Ref ( const Ref< T > &  inRHS)
inline

◆ Ref() [4/4]

template<class T >
Ref< T >::Ref ( Ref< T > &&  inRHS)
inlinenoexcept

◆ ~Ref()

template<class T >
Ref< T >::~Ref ( )
inline

Member Function Documentation

◆ GetPtr()

template<class T >
T * Ref< T >::GetPtr ( ) const
inline

Get pointer.

◆ InternalGetPointer()

template<class T >
void ** Ref< T >::InternalGetPointer ( )
inline

INTERNAL HELPER FUNCTION USED BY SERIALIZATION.

◆ operator T*()

template<class T >
Ref< T >::operator T* ( ) const
inline

Casting operators.

◆ operator!=() [1/2]

template<class T >
bool Ref< T >::operator!= ( const Ref< T > &  inRHS) const
inline

◆ operator!=() [2/2]

template<class T >
bool Ref< T >::operator!= ( const T *  inRHS) const
inline

◆ operator*()

template<class T >
T & Ref< T >::operator* ( ) const
inline

◆ operator->()

template<class T >
T * Ref< T >::operator-> ( ) const
inline

Access like a normal pointer.

◆ operator=() [1/3]

template<class T >
Ref< T > & Ref< T >::operator= ( const Ref< T > &  inRHS)
inline

◆ operator=() [2/3]

template<class T >
Ref< T > & Ref< T >::operator= ( Ref< T > &&  inRHS)
inlinenoexcept

◆ operator=() [3/3]

template<class T >
Ref< T > & Ref< T >::operator= ( T *  inRHS)
inline

Assignment operators.

◆ operator==() [1/2]

template<class T >
bool Ref< T >::operator== ( const Ref< T > &  inRHS) const
inline

◆ operator==() [2/2]

template<class T >
bool Ref< T >::operator== ( const T *  inRHS) const
inline

Comparison.

Friends And Related Function Documentation

◆ RefConst

template<class T >
template<class T2 >
friend class RefConst
friend

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