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

995 : iCount(iCount), szName(szName) { }
const char * szName
Definition: StdAdaptors.h:994

Member Function Documentation

◆ CompileFunc()

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

Definition at line 996 of file StdAdaptors.h.

997  {
998  if (pComp->hasNaming())
999  {
1000  if (pComp->isDeserializer())
1001  iCount = pComp->NameCount(szName);
1002  }
1003  else
1004  pComp->Value(mkIntPackAdapt(iCount));
1005  }
StdIntPackAdapt< T > mkIntPackAdapt(T &rVal)
Definition: StdAdaptors.h:791
void Value(const T &rStruct)
Definition: StdCompiler.h:161
virtual bool isDeserializer()
Definition: StdCompiler.h:53
virtual int NameCount(const char *szName=nullptr)
Definition: StdCompiler.h:91
virtual bool hasNaming()
Definition: StdCompiler.h:58

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

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

◆ szName

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

Definition at line 994 of file StdAdaptors.h.


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