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

Constructor & Destructor Documentation

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

Definition at line 74 of file StdAdaptors.h.

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

Member Function Documentation

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

Definition at line 75 of file StdAdaptors.h.

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

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

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

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

Definition at line 89 of file StdAdaptors.h.

89 { return rValue == nValue; }

Member Data Documentation

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

Definition at line 73 of file StdAdaptors.h.

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

Definition at line 73 of file StdAdaptors.h.


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