OpenClonk
StdNamingCountAdapt< int_t > Struct Template Reference

#include <StdAdaptors.h>

Public Member Functions

 StdNamingCountAdapt (int_t &iCount, const char *szName)
 
void CompileFunc (StdCompiler *pComp) const
 

Public Attributes

int_t & iCount
 
const char * szName
 

Detailed Description

template<class int_t>
struct StdNamingCountAdapt< int_t >

Definition at line 978 of file StdAdaptors.h.

Constructor & Destructor Documentation

◆ StdNamingCountAdapt()

template<class int_t>
StdNamingCountAdapt< int_t >::StdNamingCountAdapt ( int_t &  iCount,
const char *  szName 
)
inline

Definition at line 981 of file StdAdaptors.h.

981 : iCount(iCount), szName(szName) { }
const char * szName
Definition: StdAdaptors.h:980

Member Function Documentation

◆ CompileFunc()

template<class int_t>
void StdNamingCountAdapt< int_t >::CompileFunc ( StdCompiler pComp) const
inline

Definition at line 982 of file StdAdaptors.h.

References StdCompiler::hasNaming(), StdCompiler::isDeserializer(), mkIntPackAdapt(), StdCompiler::NameCount(), and StdCompiler::Value().

983  {
984  if (pComp->hasNaming())
985  {
986  if (pComp->isDeserializer())
987  iCount = pComp->NameCount(szName);
988  }
989  else
990  pComp->Value(mkIntPackAdapt(iCount));
991  }
virtual bool hasNaming()
Definition: StdCompiler.h:58
void Value(const T &rStruct)
Definition: StdCompiler.h:161
virtual bool isDeserializer()
Definition: StdCompiler.h:53
StdIntPackAdapt< T > mkIntPackAdapt(T &rVal)
Definition: StdAdaptors.h:777
virtual int NameCount(const char *szName=nullptr)
Definition: StdCompiler.h:91
const char * szName
Definition: StdAdaptors.h:980
Here is the call graph for this function:

Member Data Documentation

◆ iCount

template<class int_t>
int_t& StdNamingCountAdapt< int_t >::iCount

Definition at line 980 of file StdAdaptors.h.

◆ szName

template<class int_t>
const char* StdNamingCountAdapt< int_t >::szName

Definition at line 980 of file StdAdaptors.h.


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