OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
StdNamingAdapt< T > Struct Template Reference

#include <StdAdaptors.h>

Public Member Functions

 StdNamingAdapt (T &rValue, const char *szName)
 
void CompileFunc (StdCompiler *pComp) const
 
template<class D >
bool operator== (const D &nValue) const
 
template<class D >
StdNamingAdaptoperator= (const D &nValue)
 

Public Attributes

T & rValue
 
const char * szName
 

Detailed Description

template<class T>
struct StdNamingAdapt< T >

Definition at line 70 of file StdAdaptors.h.

Constructor & Destructor Documentation

template<class T>
StdNamingAdapt< T >::StdNamingAdapt ( T &  rValue,
const char *  szName 
)
inline

Definition at line 73 of file StdAdaptors.h.

73 : rValue(rValue), szName(szName) { }
const char * szName
Definition: StdAdaptors.h:72

Member Function Documentation

template<class T>
void StdNamingAdapt< T >::CompileFunc ( StdCompiler pComp) const
inline

Definition at line 74 of file StdAdaptors.h.

References StdCompiler::Name(), StdCompiler::NameEnd(), and StdCompiler::Value().

75  {
76  pComp->Name(szName);
77  try
78  {
79  pComp->Value(rValue);
80  }
81  catch (StdCompiler::Exception *)
82  {
83  pComp->NameEnd(true);
84  throw;
85  }
86  pComp->NameEnd();
87  }
const char * szName
Definition: StdAdaptors.h:72
virtual bool Name(const char *szName)
Definition: StdCompiler.h:77
void Value(const T &rStruct)
Definition: StdCompiler.h:161
virtual void NameEnd(bool fBreak=false)
Definition: StdCompiler.h:78

Here is the call graph for this function:

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

Definition at line 89 of file StdAdaptors.h.

89 { rValue = nValue; return *this; }
template<class T>
template<class D >
bool StdNamingAdapt< T >::operator== ( const D &  nValue) const
inline

Definition at line 88 of file StdAdaptors.h.

88 { return rValue == nValue; }

Member Data Documentation

template<class T>
T& StdNamingAdapt< T >::rValue

Definition at line 72 of file StdAdaptors.h.

template<class T>
const char* StdNamingAdapt< T >::szName

Definition at line 72 of file StdAdaptors.h.


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