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

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

Member Function Documentation

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

Definition at line 965 of file StdAdaptors.h.

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

966  {
967  if (pComp->hasNaming())
968  {
969  if (pComp->isDeserializer())
970  iCount = pComp->NameCount(szName);
971  }
972  else
973  pComp->Value(mkIntPackAdapt(iCount));
974  }
virtual bool hasNaming()
Definition: StdCompiler.h:68
void Value(const T &rStruct)
Definition: StdCompiler.h:171
virtual bool isDeserializer()
Definition: StdCompiler.h:63
StdIntPackAdapt< T > mkIntPackAdapt(T &rVal)
Definition: StdAdaptors.h:760
virtual int NameCount(const char *szName=nullptr)
Definition: StdCompiler.h:101
const char * szName
Definition: StdAdaptors.h:963

Here is the call graph for this function:

Member Data Documentation

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

Definition at line 963 of file StdAdaptors.h.

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

Definition at line 963 of file StdAdaptors.h.


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