OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
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 215 of file StdAdaptors.h.

Constructor & Destructor Documentation

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

Definition at line 218 of file StdAdaptors.h.

218 : rValue(rValue) { }

Member Function Documentation

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

Definition at line 219 of file StdAdaptors.h.

References StdCompiler::Value().

220  {
221  // Cast
222  int_t iVal = int_t(rValue);
223  pComp->Value(iVal);
224  rValue = T(iVal);
225  }
void Value(const T &rStruct)
Definition: StdCompiler.h:170

Here is the call graph for this function:

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

Definition at line 228 of file StdAdaptors.h.

228 { rValue = nValue; return *this; }
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 227 of file StdAdaptors.h.

227 { return rValue == nValue; }

Member Data Documentation

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

Definition at line 217 of file StdAdaptors.h.


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