OpenClonk
StdBasicPtrAdapt< T > Struct Template Reference

#include <StdAdaptors.h>

Inheritance diagram for StdBasicPtrAdapt< T >:
[legend]

Public Member Functions

 StdBasicPtrAdapt (T *&rpObj, bool fAllowNull=true, const char *szNaming="Data")
 
bool operator== (const T &nValue) const
 
StdBasicPtrAdaptoperator= (const T &nValue)
 
bool operator== (const T *pValue) const
 
StdBasicPtrAdaptoperator= (const T *pValue)
 

Public Attributes

T *& rpObj
 
bool fAllowNull
 
const char * szNaming
 

Detailed Description

template<class T>
struct StdBasicPtrAdapt< T >

Definition at line 512 of file StdAdaptors.h.

Constructor & Destructor Documentation

◆ StdBasicPtrAdapt()

template<class T >
StdBasicPtrAdapt< T >::StdBasicPtrAdapt ( T *&  rpObj,
bool  fAllowNull = true,
const char *  szNaming = "Data" 
)
inline

Definition at line 514 of file StdAdaptors.h.

Member Function Documentation

◆ operator=() [1/2]

template<class T >
StdBasicPtrAdapt& StdBasicPtrAdapt< T >::operator= ( const T &  nValue)
inline

Definition at line 520 of file StdAdaptors.h.

520 { delete rpObj; rpObj = new T(nValue); return *this; }

◆ operator=() [2/2]

template<class T >
StdBasicPtrAdapt& StdBasicPtrAdapt< T >::operator= ( const T *  pValue)
inline

Definition at line 522 of file StdAdaptors.h.

522 { delete rpObj; rpObj = pValue; return *this; }

◆ operator==() [1/2]

template<class T >
bool StdBasicPtrAdapt< T >::operator== ( const T &  nValue) const
inline

Definition at line 519 of file StdAdaptors.h.

519 { return rpObj && *rpObj == nValue; }

◆ operator==() [2/2]

template<class T >
bool StdBasicPtrAdapt< T >::operator== ( const T *  pValue) const
inline

Definition at line 521 of file StdAdaptors.h.

521 { return rpObj == pValue; }

Member Data Documentation

◆ fAllowNull

template<class T >
bool StdBasicPtrAdapt< T >::fAllowNull

Definition at line 516 of file StdAdaptors.h.

◆ rpObj

template<class T >
T*& StdBasicPtrAdapt< T >::rpObj

Definition at line 516 of file StdAdaptors.h.

Referenced by StdPtrAdaptCompileNewFunc(), and StdPtrAdaptDecompileNewFunc().

◆ szNaming

template<class T >
const char* StdBasicPtrAdapt< T >::szNaming

Definition at line 516 of file StdAdaptors.h.


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