OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
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 960 of file StdAdaptors.h.

Constructor & Destructor Documentation

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

Definition at line 963 of file StdAdaptors.h.

963 : iCount(iCount), szName(szName) { }
const char * szName
Definition: StdAdaptors.h:962

Member Function Documentation

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

Definition at line 964 of file StdAdaptors.h.

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

965  {
966  if (pComp->hasNaming())
967  {
968  if (pComp->isDeserializer())
969  iCount = pComp->NameCount(szName);
970  }
971  else
972  pComp->Value(mkIntPackAdapt(iCount));
973  }
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:759
virtual int NameCount(const char *szName=nullptr)
Definition: StdCompiler.h:91
const char * szName
Definition: StdAdaptors.h:962

Here is the call graph for this function:

Member Data Documentation

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

Definition at line 962 of file StdAdaptors.h.

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

Definition at line 962 of file StdAdaptors.h.


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