OpenClonk
StdDefaultAdapt< T, D > Struct Template Reference

#include <StdAdaptors.h>

Public Member Functions

 StdDefaultAdapt (T &rValue, const D &rDefault)
 
void CompileFunc (StdCompiler *pComp) const
 

Public Attributes

T & rValue
 
const D & rDefault
 

Detailed Description

template<class T, class D>
struct StdDefaultAdapt< T, D >

Definition at line 41 of file StdAdaptors.h.

Constructor & Destructor Documentation

◆ StdDefaultAdapt()

template<class T , class D >
StdDefaultAdapt< T, D >::StdDefaultAdapt ( T &  rValue,
const D &  rDefault 
)
inline

Definition at line 44 of file StdAdaptors.h.

const D & rDefault
Definition: StdAdaptors.h:43

Member Function Documentation

◆ CompileFunc()

template<class T , class D >
void StdDefaultAdapt< T, D >::CompileFunc ( StdCompiler pComp) const
inline

Definition at line 45 of file StdAdaptors.h.

46  {
47  try
48  {
49 #ifdef STDCOMPILER_EXCEPTION_WORKAROUND
50  if (!pComp->ValueSafe(rValue))
51  rValue = rDefault;
52 #else
53  pComp->Value(rValue);
54 #endif
55  }
57  {
58  rValue = rDefault;
59  delete pEx;
60  }
61  }
void Value(const T &rStruct)
Definition: StdCompiler.h:161

References StdDefaultAdapt< T, D >::rDefault, StdDefaultAdapt< T, D >::rValue, and StdCompiler::Value().

Here is the call graph for this function:

Member Data Documentation

◆ rDefault

template<class T , class D >
const D& StdDefaultAdapt< T, D >::rDefault

Definition at line 43 of file StdAdaptors.h.

Referenced by StdDefaultAdapt< T, D >::CompileFunc().

◆ rValue

template<class T , class D >
T& StdDefaultAdapt< T, D >::rValue

Definition at line 43 of file StdAdaptors.h.

Referenced by StdDefaultAdapt< T, D >::CompileFunc().


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