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 214 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 217 of file StdAdaptors.h.

217 : 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 218 of file StdAdaptors.h.

References StdCompiler::Value().

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

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

227 { 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 226 of file StdAdaptors.h.

226 { return rValue == nValue; }

Member Data Documentation

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

Definition at line 216 of file StdAdaptors.h.


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