OpenClonk
C4StrValAdapt< T > Struct Template Reference

#include <C4InputValidation.h>

Public Member Functions

 C4StrValAdapt (T &rValue, C4InVal::ValidationOption eValType)
 
void CompileFunc (StdCompiler *pComp)
 
template<class D >
bool operator== (const D &nValue) const
 
template<class D >
C4StrValAdapt< T > & operator= (const D &nValue)
 

Public Attributes

T & rValue
 
C4InVal::ValidationOption eValType
 

Detailed Description

template<class T>
struct C4StrValAdapt< T >

Definition at line 54 of file C4InputValidation.h.

Constructor & Destructor Documentation

◆ C4StrValAdapt()

template<class T >
C4StrValAdapt< T >::C4StrValAdapt ( T &  rValue,
C4InVal::ValidationOption  eValType 
)
inlineexplicit

Definition at line 57 of file C4InputValidation.h.

C4InVal::ValidationOption eValType

Member Function Documentation

◆ CompileFunc()

template<class T >
void C4StrValAdapt< T >::CompileFunc ( StdCompiler pComp)
inline

Definition at line 58 of file C4InputValidation.h.

59  {
60  pComp->Value(rValue);
61  if (pComp->isDeserializer()) C4InVal::ValidateString(rValue.GetObj(), eValType); // works on Par adapt only :(
62  }
void Value(const T &rStruct)
Definition: StdCompiler.h:161
virtual bool isDeserializer()
Definition: StdCompiler.h:53
bool ValidateString(char *szString, ValidationOption eOption, size_t iMaxSize)

References C4StrValAdapt< T >::eValType, StdCompiler::isDeserializer(), C4StrValAdapt< T >::rValue, C4InVal::ValidateString(), and StdCompiler::Value().

Here is the call graph for this function:

◆ operator=()

template<class T >
template<class D >
C4StrValAdapt<T>& C4StrValAdapt< T >::operator= ( const D &  nValue)
inline

Definition at line 64 of file C4InputValidation.h.

64 { rValue = nValue; return *this; }

References C4StrValAdapt< T >::rValue.

◆ operator==()

template<class T >
template<class D >
bool C4StrValAdapt< T >::operator== ( const D &  nValue) const
inline

Definition at line 63 of file C4InputValidation.h.

63 { return rValue == nValue; }

References C4StrValAdapt< T >::rValue.

Member Data Documentation

◆ eValType

template<class T >
C4InVal::ValidationOption C4StrValAdapt< T >::eValType

Definition at line 56 of file C4InputValidation.h.

Referenced by C4StrValAdapt< T >::CompileFunc().

◆ rValue

template<class T >
T& C4StrValAdapt< T >::rValue

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