OpenClonk
StdIntAdapt< T, int_t > Struct Template Reference

#include <StdAdaptors.h>

Public Member Functions

 StdIntAdapt (T &rValue)
 
void CompileFunc (StdCompiler *pComp) const
 
template<class D >
bool operator== (const D &nValue) const
 
template<class D >
StdIntAdaptoperator= (const D &nValue)
 

Public Attributes

T & rValue
 

Detailed Description

template<class T, class int_t = int32_t>
struct StdIntAdapt< T, int_t >

Definition at line 240 of file StdAdaptors.h.

Constructor & Destructor Documentation

◆ StdIntAdapt()

template<class T , class int_t = int32_t>
StdIntAdapt< T, int_t >::StdIntAdapt ( T &  rValue)
inlineexplicit

Definition at line 243 of file StdAdaptors.h.

243 : rValue(rValue) { }

Member Function Documentation

◆ CompileFunc()

template<class T , class int_t = int32_t>
void StdIntAdapt< T, int_t >::CompileFunc ( StdCompiler pComp) const
inline

Definition at line 244 of file StdAdaptors.h.

245  {
246  // Cast
247  int_t iVal = int_t(rValue);
248  pComp->Value(iVal);
249  rValue = T(iVal);
250  }
void Value(const T &rStruct)
Definition: StdCompiler.h:161

References StdIntAdapt< T, int_t >::rValue, and StdCompiler::Value().

Here is the call graph for this function:

◆ operator=()

template<class T , class int_t = int32_t>
template<class D >
StdIntAdapt& StdIntAdapt< T, int_t >::operator= ( const D &  nValue)
inline

Definition at line 253 of file StdAdaptors.h.

253 { rValue = nValue; return *this; }

References StdIntAdapt< T, int_t >::rValue.

◆ operator==()

template<class T , class int_t = int32_t>
template<class D >
bool StdIntAdapt< T, int_t >::operator== ( const D &  nValue) const
inline

Definition at line 252 of file StdAdaptors.h.

252 { return rValue == nValue; }

References StdIntAdapt< T, int_t >::rValue.

Member Data Documentation

◆ rValue

template<class T , class int_t = int32_t>
T& StdIntAdapt< T, int_t >::rValue

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