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 526 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 528 of file StdAdaptors.h.

Member Function Documentation

◆ operator=() [1/2]

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

Definition at line 534 of file StdAdaptors.h.

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

References StdBasicPtrAdapt< T >::rpObj.

◆ operator=() [2/2]

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

Definition at line 536 of file StdAdaptors.h.

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

References StdBasicPtrAdapt< T >::rpObj.

◆ operator==() [1/2]

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

Definition at line 533 of file StdAdaptors.h.

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

References StdBasicPtrAdapt< T >::rpObj.

◆ operator==() [2/2]

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

Definition at line 535 of file StdAdaptors.h.

535 { return rpObj == pValue; }

References StdBasicPtrAdapt< T >::rpObj.

Member Data Documentation

◆ fAllowNull

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

Definition at line 530 of file StdAdaptors.h.

◆ rpObj

◆ szNaming

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

Definition at line 530 of file StdAdaptors.h.


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