OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
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

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

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

Definition at line 58 of file C4InputValidation.h.

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

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
bool ValidateString(char *szString, ValidationOption eOption, size_t iMaxSize)
virtual bool isDeserializer()
Definition: StdCompiler.h:53
C4InVal::ValidationOption eValType

Here is the call graph for this function:

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; }
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; }

Member Data Documentation

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

Definition at line 56 of file C4InputValidation.h.

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

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

Definition at line 56 of file C4InputValidation.h.


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