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

961 : iCount(iCount), szName(szName) { }
const char * szName
Definition: StdAdaptors.h:960

Member Function Documentation

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

Definition at line 962 of file StdAdaptors.h.

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

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

Here is the call graph for this function:

Member Data Documentation

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

Definition at line 960 of file StdAdaptors.h.

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

Definition at line 960 of file StdAdaptors.h.


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