OpenClonk
StdAdaptors.h File Reference
#include "lib/StdCompiler.h"
Include dependency graph for StdAdaptors.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  StdNullAdapt
 
struct  StdDefaultAdapt< T, D >
 
struct  StdNamingAdapt< T >
 
struct  StdNamingDefaultAdapt< T, D >
 
struct  StdDecompileAdapt< T >
 
struct  StdRuntimeValueAdapt< T >
 
struct  StdStringAdapt
 
struct  StdStdStringAdapt
 
struct  StdRawAdapt
 
struct  StdIntAdapt< T, int_t >
 
struct  StdCastAdapt< T, to_t >
 
struct  _IdFuncClass< T >
 
struct  StdArrayAdapt< T, M >
 
struct  StdArrayDefaultAdapt< T, D, M >
 
struct  StdArrayDefaultArrayAdapt< T, D, M >
 
struct  StdInsertAdapt< T, I >
 
struct  StdParameterAdapt< T, P >
 
struct  StdParameterAdaptMaker< P >
 
struct  StdParameter2Adapt< T, P1, P2 >
 
struct  StdBasicPtrAdapt< T >
 
struct  StdPtrAdapt< T >
 
struct  StdContextPtrAdapt< T, ContextT >
 
struct  StdSTLContainerAdapt< C >
 
struct  StdIntPackAdapt< T >
 
struct  StdEnumEntry< T >
 
struct  StdEnumAdapt< T, int_t >
 
struct  StdBitfieldEntry< T >
 
struct  StdBitfieldAdapt< T >
 
struct  StdNamingCountAdapt< int_t >
 
class  StdHexAdapt
 

Macros

#define toC4CStr(szString)   mkStringAdaptMA(szString)
 
#define toC4CStrBuf(rBuf)   mkParAdapt(rBuf, StdCompiler::RCT_All)
 
#define toC4CArr(rArr)   mkArrayAdaptDM(rArr, 0)
 
#define toC4CArrU(rArr)   mkArrayAdaptDM(rArr, 0u)
 

Functions

template<class T , class D >
StdDefaultAdapt< T, D > mkDefaultAdapt (T &&rValue, const D &rDefault)
 
template<class T >
StdNamingAdapt< T > mkNamingAdapt (T &&rValue, const char *szName)
 
template<class T , class D >
StdNamingDefaultAdapt< T, D > mkNamingAdapt (T &&rValue, const char *szName, const D &rDefault, bool fPrefillDefault=false, bool fStoreDefault=false)
 
template<class T >
StdDecompileAdapt< T > mkDecompileAdapt (const T &rValue)
 
template<class T >
StdRuntimeValueAdapt< T > mkRuntimeValueAdapt (T &&rValue)
 
StdStringAdapt mkStringAdapt (char *szString, int iMaxLength, StdCompiler::RawCompileType eRawType=StdCompiler::RCT_Escaped)
 
template<size_t size>
StdStringAdapt mkStringAdaptM (char(&szString)[size])
 
template<size_t size>
StdStringAdapt mkStringAdaptMA (char(&szString)[size])
 
template<size_t size>
StdStringAdapt mkStringAdaptMI (char(&szString)[size])
 
template<size_t size>
StdStringAdapt mkStringAdaptMIE (char(&szString)[size])
 
StdStdStringAdapt mkStringAdapt (std::string &string, StdCompiler::RawCompileType eRawType=StdCompiler::RCT_Escaped)
 
StdStdStringAdapt mkStringAdaptA (std::string &string)
 
StdRawAdapt mkRawAdapt (void *pData, size_t iSize, StdCompiler::RawCompileType eRawType=StdCompiler::RCT_Escaped)
 
template<typename T >
StdRawAdapt mkRawAdaptM (T &val)
 
template<class T >
StdIntAdapt< T > mkIntAdapt (T &rValue)
 
template<class int_t , class T >
StdIntAdapt< T, int_t > mkIntAdaptT (T &rValue)
 
template<class to_t , class T >
StdCastAdapt< T, to_t > mkCastAdapt (T &rValue)
 
template<class T >
StdCastAdapt< T, int32_t > mkCastIntAdapt (T &rValue)
 
template<class T >
StdArrayAdapt< T > mkArrayAdapt (T *pArray, int iSize)
 
template<class T , size_t size>
StdArrayAdapt< T > mkArrayAdaptM (T(&array)[size])
 
template<class T , class M >
StdArrayAdapt< T, M > mkArrayAdaptMap (T *pArray, int iSize, M &&map)
 
template<class T , class M , size_t size>
StdArrayAdapt< T, M > mkArrayAdaptMapM (T(&array)[size], M &&map)
 
template<class T , class D >
StdArrayDefaultAdapt< T, D > mkArrayAdapt (T *pArray, size_t iSize, const D &rDefault)
 
template<class T , class D , size_t size>
StdArrayDefaultAdapt< T, D > mkArrayAdaptDM (T(&array)[size], const D &rDefault)
 
template<class T , class D , class M >
StdArrayDefaultAdapt< T, D, M > mkArrayAdaptMap (T *pArray, size_t iSize, const D &rDefault, M map)
 
template<class T , class D , class M , size_t size>
StdArrayDefaultAdapt< T, D, M > mkArrayAdaptMapDM (T(&array)[size], const D &rDefault, M map)
 
template<class T , class D >
StdArrayDefaultArrayAdapt< T, D > mkArrayAdaptDefArr (T *pArray, size_t iSize, const D &rDefault)
 
template<class T , class D , size_t size>
StdArrayDefaultArrayAdapt< T, D > mkArrayAdaptDMA (T(&array)[size], const D &rDefault)
 
template<class T , class D , class M >
StdArrayDefaultArrayAdapt< T, D, M > mkArrayAdaptDefArrMap (T *pArray, size_t iSize, const D &rDefault, const M &map)
 
template<class T , class D , class M , size_t size>
StdArrayDefaultArrayAdapt< T, D, M > mkArrayAdaptDMAM (T(&array)[size], const D &rDefault, const M &map)
 
template<class T , class I >
StdInsertAdapt< T, I > mkInsertAdapt (T &&rObj, I &&rIns, bool fBefore=true)
 
template<class T , class P >
StdParameterAdapt< T, P > mkParAdapt (T &&rObj, P &&rPar)
 
template<class P >
StdParameterAdaptMaker< P > mkParAdaptMaker (P &&rPar)
 
template<class T , class P1 , class P2 >
StdParameter2Adapt< T, P1, P2 > mkParAdapt (T &&rObj, P1 &&rPar1, P2 &&rPar2)
 
template<class T , typename ... P>
void StdPtrAdaptCompileFunc (StdCompiler *pComp, const T &adapt, P &&...pars)
 
template<class T , typename ... P>
void StdPtrAdaptCompileNewFunc (const StdPtrAdapt< T > &adapt, StdCompiler *pComp, P &&...pars)
 
template<class T , class ContextT , typename ... P>
void StdPtrAdaptCompileNewFunc (const StdContextPtrAdapt< T, ContextT > &adapt, StdCompiler *pComp, P &&...pars)
 
template<class T >
void StdPtrAdaptDecompileNewFunc (const StdPtrAdapt< T > &adapt, StdCompiler *pComp)
 
template<class T , class ContextT >
void StdPtrAdaptDecompileNewFunc (const StdContextPtrAdapt< T, ContextT > &adapt, StdCompiler *pComp)
 
template<class T , typename ... P>
void StdPtrAdaptDecompileNewFunc (const StdPtrAdapt< T > &adapt, StdCompiler *pComp, P &&...pars)
 
template<class T , class ContextT , typename ... P>
void StdPtrAdaptDecompileNewFunc (const StdContextPtrAdapt< T, ContextT > &adapt, StdCompiler *pComp, P &&...pars)
 
template<class T >
StdPtrAdapt< T > mkPtrAdapt (T *&rpObj, bool fAllowNull=true)
 
template<class T >
StdPtrAdapt< T > mkNamingPtrAdapt (T *&rpObj, const char *szNaming)
 
template<class T >
StdPtrAdapt< T > mkPtrAdaptNoNull (T *&rpObj)
 
template<class T , class ContextT >
StdContextPtrAdapt< T, ContextT > mkContextPtrAdapt (T *&rpObj, const ContextT &ctx, bool fAllowNull=true)
 
template<class T , class ContextT >
StdContextPtrAdapt< T, ContextT > mkNamingContextPtrAdapt (T *&rpObj, const ContextT &ctx, const char *szNaming)
 
template<class T , class ContextT >
StdContextPtrAdapt< T, ContextT > mkContextPtrAdaptNoNull (T *&rpObj, const ContextT &ctx)
 
template<class C >
StdSTLContainerAdapt< C > mkSTLContainerAdapt (C &rTarget, StdCompiler::Sep eSep=StdCompiler::SEP_SEP)
 
template<class T >
StdIntPackAdapt< T > mkIntPackAdapt (T &rVal)
 
template<class T , class int_t >
StdEnumAdapt< T, int_t > mkEnumAdapt (T &rVal, const StdEnumEntry< T > *pNames)
 
template<class int_t , class T >
StdEnumAdapt< T, int_t > mkEnumAdaptT (T &rVal, const StdEnumEntry< T > *pNames)
 
template<class T >
StdBitfieldAdapt< T > mkBitfieldAdapt (T &rVal, const StdBitfieldEntry< T > *pNames)
 
template<class int_t >
StdNamingCountAdapt< int_t > mkNamingCountAdapt (int_t &iCount, const char *szName)
 
StdHexAdapt mkHexAdapt (void *pData, size_t iSize)
 
template<class T >
StdHexAdapt mkHexAdapt (T &rData)
 

Class Documentation

◆ StdEnumEntry

struct StdEnumEntry

template<class T>
struct StdEnumEntry< T >

Definition at line 794 of file StdAdaptors.h.

Class Members
const char * Name
T Val

◆ StdBitfieldEntry

struct StdBitfieldEntry

template<class T>
struct StdBitfieldEntry< T >

Definition at line 882 of file StdAdaptors.h.

Class Members
const char * Name
T Val

Macro Definition Documentation

◆ toC4CArr

#define toC4CArr (   rArr)    mkArrayAdaptDM(rArr, 0)

Definition at line 28 of file StdAdaptors.h.

◆ toC4CArrU

#define toC4CArrU (   rArr)    mkArrayAdaptDM(rArr, 0u)

Definition at line 29 of file StdAdaptors.h.

◆ toC4CStr

#define toC4CStr (   szString)    mkStringAdaptMA(szString)

Definition at line 24 of file StdAdaptors.h.

◆ toC4CStrBuf

#define toC4CStrBuf (   rBuf)    mkParAdapt(rBuf, StdCompiler::RCT_All)

Definition at line 25 of file StdAdaptors.h.

Function Documentation

◆ mkArrayAdapt() [1/2]

template<class T >
StdArrayAdapt<T> mkArrayAdapt ( T *  pArray,
int  iSize 
)
inline

Definition at line 336 of file StdAdaptors.h.

336 { return StdArrayAdapt<T>(pArray, iSize); }
int iSize
Definition: TstC4NetIO.cpp:32

References iSize.

Referenced by C4Team::CompileFunc(), C4LeagueResponseHeadAuthCheck::CompileFunc(), C4Network2Reference::CompileFunc(), C4PacketResDiscover::CompileFunc(), and C4GameVersion::CompileFunc().

Here is the caller graph for this function:

◆ mkArrayAdapt() [2/2]

template<class T , class D >
StdArrayDefaultAdapt<T, D> mkArrayAdapt ( T *  pArray,
size_t  iSize,
const D &  rDefault 
)
inline

Definition at line 390 of file StdAdaptors.h.

390 { return StdArrayDefaultAdapt<T, D>(pArray, iSize, rDefault); }

References iSize.

◆ mkArrayAdaptDefArr()

template<class T , class D >
StdArrayDefaultArrayAdapt<T, D> mkArrayAdaptDefArr ( T *  pArray,
size_t  iSize,
const D &  rDefault 
)
inline

Definition at line 444 of file StdAdaptors.h.

444 { return StdArrayDefaultArrayAdapt<T, D>(pArray, iSize, rDefault); }

References iSize.

Referenced by C4Shape::CompileFunc().

Here is the caller graph for this function:

◆ mkArrayAdaptDefArrMap()

template<class T , class D , class M >
StdArrayDefaultArrayAdapt<T, D, M> mkArrayAdaptDefArrMap ( T *  pArray,
size_t  iSize,
const D &  rDefault,
const M &  map 
)
inline

Definition at line 448 of file StdAdaptors.h.

448 { return StdArrayDefaultArrayAdapt<T, D, M>(pArray, iSize, rDefault, map); }

References iSize.

◆ mkArrayAdaptDM()

template<class T , class D , size_t size>
StdArrayDefaultAdapt<T, D> mkArrayAdaptDM ( T(&)  array[size],
const D &  rDefault 
)
inline

Definition at line 392 of file StdAdaptors.h.

392 { return StdArrayDefaultAdapt<T, D>(array, size, rDefault); }

Referenced by C4MaterialCore::CompileFunc(), C4SPlrStart::CompileFunc(), C4SLandscape::CompileFunc(), C4Network2Reference::CompileFunc(), and C4SHead::CompileFunc().

Here is the caller graph for this function:

◆ mkArrayAdaptDMA()

template<class T , class D , size_t size>
StdArrayDefaultArrayAdapt<T, D> mkArrayAdaptDMA ( T(&)  array[size],
const D &  rDefault 
)
inline

Definition at line 446 of file StdAdaptors.h.

446 { return StdArrayDefaultArrayAdapt<T, D>(array, size, rDefault); }

Referenced by C4Shape::CompileFunc().

Here is the caller graph for this function:

◆ mkArrayAdaptDMAM()

template<class T , class D , class M , size_t size>
StdArrayDefaultArrayAdapt<T, D, M> mkArrayAdaptDMAM ( T(&)  array[size],
const D &  rDefault,
const M &  map 
)
inline

Definition at line 450 of file StdAdaptors.h.

450 { return StdArrayDefaultArrayAdapt<T, D, M>(array, size, rDefault, map); }

Referenced by C4Shape::CompileFunc().

Here is the caller graph for this function:

◆ mkArrayAdaptM()

template<class T , size_t size>
StdArrayAdapt<T> mkArrayAdaptM ( T(&)  array[size])
inline

Definition at line 338 of file StdAdaptors.h.

338 { return StdArrayAdapt<T>(array, size); }

Referenced by C4Weather::CompileFunc().

Here is the caller graph for this function:

◆ mkArrayAdaptMap() [1/2]

template<class T , class M >
StdArrayAdapt<T, M> mkArrayAdaptMap ( T *  pArray,
int  iSize,
M &&  map 
)
inline

Definition at line 340 of file StdAdaptors.h.

340 { return StdArrayAdapt<T, M>(pArray, iSize, std::forward<M>(map)); }

References iSize.

Referenced by C4ValueArray::CompileFunc(), C4GameResList::CompileFunc(), C4ClientPlayerInfos::CompileFunc(), C4PlayerInfoList::CompileFunc(), C4RoundResultsPlayers::CompileFunc(), C4TeamList::CompileFunc(), C4MapFolderData::CompileFunc(), C4PacketFwd::CompileFunc(), C4LSectors::Dump(), and C4Network2RefClient::GetReferences().

Here is the caller graph for this function:

◆ mkArrayAdaptMap() [2/2]

template<class T , class D , class M >
StdArrayDefaultAdapt<T, D, M> mkArrayAdaptMap ( T *  pArray,
size_t  iSize,
const D &  rDefault,
map 
)
inline

Definition at line 394 of file StdAdaptors.h.

394 { return StdArrayDefaultAdapt<T, D, M>(pArray, iSize, rDefault, map); }

References iSize.

◆ mkArrayAdaptMapDM()

template<class T , class D , class M , size_t size>
StdArrayDefaultAdapt<T, D, M> mkArrayAdaptMapDM ( T(&)  array[size],
const D &  rDefault,
map 
)
inline

Definition at line 396 of file StdAdaptors.h.

396 { return StdArrayDefaultAdapt<T, D, M>(array, size, rDefault, map); }

◆ mkArrayAdaptMapM()

template<class T , class M , size_t size>
StdArrayAdapt<T, M> mkArrayAdaptMapM ( T(&)  array[size],
M &&  map 
)
inline

Definition at line 342 of file StdAdaptors.h.

342 { return StdArrayAdapt<T, M>(array, size, std::forward<M>(map)); }

◆ mkBitfieldAdapt()

template<class T >
StdBitfieldAdapt<T> mkBitfieldAdapt ( T &  rVal,
const StdBitfieldEntry< T > *  pNames 
)

Definition at line 985 of file StdAdaptors.h.

985 { return StdBitfieldAdapt<T>(rVal, pNames); }

References StdEnumAdapt< T, int_t >::pNames, and StdEnumAdapt< T, int_t >::rVal.

Referenced by C4PlayerInfo::CompileFunc(), C4ClientPlayerInfos::CompileFunc(), C4Def::CompileFunc(), and StdMeshInstance::AttachedMesh::CompileFunc().

Here is the caller graph for this function:

◆ mkCastAdapt()

template<class to_t , class T >
StdCastAdapt<T, to_t> mkCastAdapt ( T &  rValue)

Definition at line 280 of file StdAdaptors.h.

280 { return StdCastAdapt<T, to_t>(rValue); }

◆ mkCastIntAdapt()

template<class T >
StdCastAdapt<T, int32_t> mkCastIntAdapt ( T &  rValue)

Definition at line 281 of file StdAdaptors.h.

281 { return StdCastAdapt<T, int32_t>(rValue); }

Referenced by C4Landscape::CompileFunc(), and C4Sky::CompileFunc().

Here is the caller graph for this function:

◆ mkContextPtrAdapt()

template<class T , class ContextT >
StdContextPtrAdapt<T, ContextT> mkContextPtrAdapt ( T *&  rpObj,
const ContextT &  ctx,
bool  fAllowNull = true 
)
inline

Definition at line 641 of file StdAdaptors.h.

641 { return StdContextPtrAdapt<T, ContextT>(rpObj, ctx, fAllowNull); }

◆ mkContextPtrAdaptNoNull()

template<class T , class ContextT >
StdContextPtrAdapt<T, ContextT> mkContextPtrAdaptNoNull ( T *&  rpObj,
const ContextT &  ctx 
)
inline

Definition at line 645 of file StdAdaptors.h.

645 { return mkContextPtrAdapt<T, ContextT>(rpObj, ctx, false); }

◆ mkDecompileAdapt()

template<class T >
StdDecompileAdapt<T> mkDecompileAdapt ( const T &  rValue)
inline

Definition at line 153 of file StdAdaptors.h.

153 { return StdDecompileAdapt<T>(rValue); }

Referenced by C4LeagueClient::Auth(), C4LeagueClient::AuthCheck(), DisconnectData::CompileFunc(), StdMeshInstanceAnimationNode::CompileFunc(), C4KeyCodeEx::CompileFunc(), C4LeagueClient::End(), C4PacketBase::pack(), C4Playback::ReWriteText(), C4LeagueClient::Start(), StdPtrAdaptDecompileNewFunc(), and C4LeagueClient::Update().

Here is the caller graph for this function:

◆ mkDefaultAdapt()

template<class T , class D >
StdDefaultAdapt<T, D> mkDefaultAdapt ( T &&  rValue,
const D &  rDefault 
)
inline

◆ mkEnumAdapt()

template<class T , class int_t >
StdEnumAdapt<T, int_t> mkEnumAdapt ( T &  rVal,
const StdEnumEntry< T > *  pNames 
)

Definition at line 877 of file StdAdaptors.h.

877 { return StdEnumAdapt<T, int_t>(rVal, pNames); }

References StdEnumAdapt< T, int_t >::pNames, and StdEnumAdapt< T, int_t >::rVal.

◆ mkEnumAdaptT()

template<class int_t , class T >
StdEnumAdapt<T, int_t> mkEnumAdaptT ( T &  rVal,
const StdEnumEntry< T > *  pNames 
)

Definition at line 879 of file StdAdaptors.h.

879 { return StdEnumAdapt<T, int_t>(rVal, pNames); }

References StdEnumAdapt< T, int_t >::pNames, and StdEnumAdapt< T, int_t >::rVal.

◆ mkHexAdapt() [1/2]

template<class T >
StdHexAdapt mkHexAdapt ( T &  rData)
inline

Definition at line 1039 of file StdAdaptors.h.

1039 { return StdHexAdapt(&rData, sizeof(rData)); }

◆ mkHexAdapt() [2/2]

StdHexAdapt mkHexAdapt ( void *  pData,
size_t  iSize 
)
inline

Definition at line 1037 of file StdAdaptors.h.

1037 { return StdHexAdapt(pData, iSize); }

References iSize.

Referenced by C4LeagueRequestHeadEnd::CompileFunc(), and C4Network2ResCore::CompileFunc().

Here is the caller graph for this function:

◆ mkInsertAdapt()

template<class T , class I >
StdInsertAdapt<T, I> mkInsertAdapt ( T &&  rObj,
I &&  rIns,
bool  fBefore = true 
)
inline

Definition at line 469 of file StdAdaptors.h.

469 { return StdInsertAdapt<T,I>(rObj, rIns, fBefore); }

Referenced by C4LeagueClient::Auth(), C4LeagueClient::AuthCheck(), C4LeagueClient::End(), C4Object::GetDataString(), C4PacketBase::pack(), C4LeagueClient::ReportDisconnect(), C4LeagueClient::Start(), and C4LeagueClient::Update().

Here is the caller graph for this function:

◆ mkIntAdapt()

template<class T >
StdIntAdapt<T> mkIntAdapt ( T &  rValue)
inline

Definition at line 255 of file StdAdaptors.h.

255 { return StdIntAdapt<T>(rValue); }

Referenced by C4RecordChunk::CompileFunc(), C4GraphicsOverlay::CompileFunc(), C4PktDebugRec::CompileFunc(), and C4LSector::CompileFunc().

Here is the caller graph for this function:

◆ mkIntAdaptT()

template<class int_t , class T >
StdIntAdapt<T, int_t> mkIntAdaptT ( T &  rValue)

Definition at line 256 of file StdAdaptors.h.

256 { return StdIntAdapt<T, int_t>(rValue); }

◆ mkIntPackAdapt()

◆ mkNamingAdapt() [1/2]

template<class T >
StdNamingAdapt<T> mkNamingAdapt ( T &&  rValue,
const char *  szName 
)
inline

Definition at line 92 of file StdAdaptors.h.

92 { return StdNamingAdapt<T>(rValue, szName); }

Referenced by C4LeagueClient::Auth(), C4LeagueClient::AuthCheck(), C4ObjectList::CheckSort(), C4ParticleDefCore::Compile(), C4ObjectInfoCore::Compile(), C4Def::Compile(), CompileFromBufToNewNamed(), C4MusicSystem::CompileFunc(), C4ConfigGeneral::CompileFunc(), C4ConfigDeveloper::CompileFunc(), C4ConfigGraphics::CompileFunc(), C4ConfigSound::CompileFunc(), C4ConfigNetwork::CompileFunc(), C4ConfigStartup::CompileFunc(), C4ConfigLobby::CompileFunc(), C4ConfigIRC::CompileFunc(), C4ConfigControls::CompileFunc(), C4ConfigSecurity::CompileFunc(), C4Config::CompileFunc(), C4ParticleDefCore::CompileFunc(), C4ConfigGamepad::CompileFunc(), C4Game::CompileFunc(), C4UpdatePackageCore::CompileFunc(), C4GameResList::CompileFunc(), C4PlayerControlDef::CompileFunc(), C4PlayerControlDefs::CompileFunc(), C4PlayerControlAssignment::CompileFunc(), C4PlayerControlAssignmentSet::CompileFunc(), C4PlayerControlAssignmentSets::CompileFunc(), C4PlayerControlFile::CompileFunc(), C4PlayerControl::CSync::CompileFunc(), C4PlayerControl::CompileFunc(), C4PlayerInfo::CompileFunc(), C4ClientPlayerInfos::CompileFunc(), C4PlayerInfoList::CompileFunc(), C4RecordChunk::CompileFunc(), C4RoundResultsPlayer::CompileFunc(), C4RoundResultsPlayers::CompileFunc(), C4RoundResults::CompileFunc(), C4Team::CompileFunc(), C4TeamList::CompileFunc(), C4FolderHead::CompileFunc(), C4Folder::CompileFunc(), C4CustomKey::CompileFunc(), C4Scoreboard::CompileFunc(), C4MapFolderData::CompileFunc(), C4Landscape::CompileFunc(), C4MaterialReaction::CompileFunc(), C4MaterialCore::CompileFunc(), C4SDefinitions::CompileFunc(), C4SPlrStart::CompileFunc(), C4SLandscape::CompileFunc(), C4SWeather::CompileFunc(), C4SAnimals::CompileFunc(), C4SEnvironment::CompileFunc(), C4Sky::CompileFunc(), C4Weather::CompileFunc(), C4FoWBeam::CompileFunc(), C4FoWLightSection::CompileFunc(), StdSubMeshInstance::CompileFunc(), C4NetpuncherID::CompileFunc(), C4ClientList::CompileFunc(), DisconnectData::CompileFunc(), C4LeagueRequestHead::CompileFunc(), C4LeagueReportDisconnectHead::CompileFunc(), C4LeagueRequestHeadEnd::CompileFunc(), C4LeagueResponseHead::CompileFunc(), C4LeagueResponseHeadStart::CompileFunc(), C4LeagueResponseHeadUpdate::CompileFunc(), C4LeagueResponseHeadAuthCheck::CompileFunc(), C4Network2Reference::CompileFunc(), C4Def::CompileFunc(), C4ObjectInfoCore::CompileFunc(), C4RoundResult::CompileFunc(), C4PlayerInfoCore::CompileFunc(), C4Action::CompileFunc(), C4ObjectListDumpHelper::CompileFunc(), C4ScenarioParameterDef::Option::CompileFunc(), C4ScenarioParameterDef::CompileFunc(), C4ScenarioParameters::CompileFunc(), C4ControlPacket::CompileFunc(), C4PacketPlayerInfo::CompileFunc(), C4PktDebugRec::CompileFunc(), C4PacketLeagueRoundResults::CompileFunc(), C4GameLobby::C4PacketCountdown::CompileFunc(), C4GameLobby::C4PacketSetScenarioParameter::CompileFunc(), C4ClientCore::CompileFunc(), C4GameControlPacket::CompileFunc(), C4PacketControlReq::CompileFunc(), C4PacketControlPkt::CompileFunc(), C4PacketExecSyncCtrl::CompileFunc(), C4PacketJoinData::CompileFunc(), C4PacketActivateReq::CompileFunc(), C4PacketAddr::CompileFunc(), C4PacketTCPSimOpen::CompileFunc(), C4PacketPing::CompileFunc(), C4PacketConn::CompileFunc(), C4PacketConnRe::CompileFunc(), C4PacketFwd::CompileFunc(), C4PacketPostMortem::CompileFunc(), C4Network2ResCore::CompileFunc(), C4Network2ResChunkData::CompileFunc(), C4Network2ResChunk::CompileFunc(), C4PacketResStatus::CompileFunc(), C4PacketResDiscover::CompileFunc(), C4PacketResRequest::CompileFunc(), C4PktBuf::CompileFunc(), C4IDPacket::CompileFunc(), C4PacketList::CompileFunc(), StdMeshInstance::CompileFunc(), C4Network2Status::CompileFunc(), C4AulScriptEngine::CompileFunc(), C4SHead::CompileFunc(), C4SGame::CompileFunc(), C4Scenario::CompileFunc(), C4ObjectList::CompileFunc(), C4GameParameters::CompileFunc(), C4Object::CompileFunc(), C4Player::CompileFunc(), C4LSector::CompileFunc(), C4Shape::CompileFunc(), StdMeshInstanceAnimationNode::CompileFunc(), StdMeshInstance::AttachedMesh::CompileFunc(), C4MeshDenumerator::CompileFunc(), C4ObjectInfoCore::Decompile(), C4Def::Decompile(), C4StartupNetDlg::DoOK(), C4LSectors::Dump(), C4LeagueClient::End(), C4LeagueClient::GetAuthCheckReply(), C4LeagueClient::GetAuthReply(), C4Object::GetDataString(), C4LeagueClient::GetEndReply(), C4Network2RefClient::GetReferences(), C4LeagueClient::GetReportDisconnectReply(), C4LeagueClient::GetStartReply(), C4LeagueClient::GetUpdateReply(), C4Network2UpdateClient::GetUpdateURL(), C4Network2UpdateClient::GetVersion(), C4Network2IO::HandlePacket(), C4Game::InitNetworkFromReferenceFile(), C4UpdatePackageCore::Load(), C4GameParameters::Load(), C4MapFolderData::Load(), C4TeamList::Load(), C4RoundResults::Load(), C4PlayerInfoList::Load(), C4UpdatePackage::Load(), C4Player::LoadRuntimeData(), C4Playback::ReadText(), C4LeagueClient::ReportDisconnect(), C4Playback::ReWriteText(), C4UpdatePackageCore::Save(), C4TeamList::Save(), C4GameParameters::Save(), C4RoundResults::Save(), C4PlayerInfoList::Save(), C4LeagueClient::Start(), C4Playback::Strip(), and C4LeagueClient::Update().

◆ mkNamingAdapt() [2/2]

template<class T , class D >
StdNamingDefaultAdapt<T,D> mkNamingAdapt ( T &&  rValue,
const char *  szName,
const D &  rDefault,
bool  fPrefillDefault = false,
bool  fStoreDefault = false 
)
inline

Definition at line 129 of file StdAdaptors.h.

129 { return StdNamingDefaultAdapt<T,D>(rValue, szName, rDefault, fPrefillDefault, fStoreDefault); }

◆ mkNamingContextPtrAdapt()

template<class T , class ContextT >
StdContextPtrAdapt<T, ContextT> mkNamingContextPtrAdapt ( T *&  rpObj,
const ContextT &  ctx,
const char *  szNaming 
)
inline

Definition at line 643 of file StdAdaptors.h.

643 { return StdContextPtrAdapt<T, ContextT>(rpObj, ctx, true, szNaming); }

Referenced by C4MeshDenumerator::CompileFunc().

Here is the caller graph for this function:

◆ mkNamingCountAdapt()

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

Definition at line 1008 of file StdAdaptors.h.

1008 { return StdNamingCountAdapt<int_t>(iCount, szName); }

Referenced by C4GameResList::CompileFunc(), C4TeamList::CompileFunc(), C4MapFolderData::CompileFunc(), C4ClientList::CompileFunc(), C4LeagueResponseHeadStart::CompileFunc(), C4Network2ResCore::CompileFunc(), StdMeshInstance::CompileFunc(), C4ObjectList::CompileFunc(), C4MeshDenumerator::CompileFunc(), and C4Network2RefClient::GetReferences().

Here is the caller graph for this function:

◆ mkNamingPtrAdapt()

template<class T >
StdPtrAdapt<T> mkNamingPtrAdapt ( T *&  rpObj,
const char *  szNaming 
)
inline

Definition at line 636 of file StdAdaptors.h.

636 { return StdPtrAdapt<T>(rpObj, true, szNaming); }

Referenced by StdMeshInstance::CompileFunc(), C4Object::CompileFunc(), C4Player::CompileFunc(), and StdMeshInstanceAnimationNode::CompileFunc().

Here is the caller graph for this function:

◆ mkParAdapt() [1/2]

template<class T , class P >
StdParameterAdapt<T, P> mkParAdapt ( T &&  rObj,
P &&  rPar 
)
inline

Definition at line 490 of file StdAdaptors.h.

491 { return StdParameterAdapt<T, P>(std::forward<T>(rObj), std::forward<P>(rPar)); }

Referenced by C4Set< T >::CompileFunc(), C4ConfigNetwork::CompileFunc(), C4Game::CompileFunc(), C4PlayerControlDef::CompileFunc(), C4PlayerControlAssignment::CompileFunc(), C4PlayerControlAssignmentSet::CompileFunc(), C4PlayerInfo::CompileFunc(), C4Team::CompileFunc(), C4TeamList::CompileFunc(), C4DrawTransform::CompileFunc(), C4MaterialReaction::CompileFunc(), C4MaterialCore::CompileFunc(), DisconnectData::CompileFunc(), C4LeagueRequestHead::CompileFunc(), C4LeagueRequestHeadEnd::CompileFunc(), C4LeagueResponseHead::CompileFunc(), C4LeagueResponseHeadAuthCheck::CompileFunc(), C4Network2Reference::CompileFunc(), C4Def::CompileFunc(), C4DefGraphicsAdapt::CompileFunc(), C4ObjectInfoCore::CompileFunc(), C4PlayerInfoCore::CompileFunc(), C4ObjectListDumpHelper::CompileFunc(), C4ScenarioParameterDef::Option::CompileFunc(), C4ScenarioParameterDef::CompileFunc(), StdEnumAdapt< T, int_t >::CompileFunc(), StdBitfieldAdapt< T >::CompileFunc(), C4GameLobby::C4PacketSetScenarioParameter::CompileFunc(), C4PacketJoinData::CompileFunc(), StdMeshInstance::CompileFunc(), C4AulScriptEngine::CompileFunc(), C4SHead::CompileFunc(), C4SGame::CompileFunc(), C4Scenario::CompileFunc(), C4ObjectList::CompileFunc(), C4Effect::CompileFunc(), C4Command::CompileFunc(), C4Object::CompileFunc(), C4Player::CompileFunc(), C4Property::CompileFunc(), C4PropList::CompileFunc(), C4Value::CompileFunc(), C4ValueMapData::CompileFunc(), C4LSector::CompileFunc(), StdMeshInstanceAnimationNode::CompileFunc(), StdMeshInstance::AttachedMesh::CompileFunc(), ValidatedStdCopyStrBufBase::CompileFunc(), StdDecompileAdapt< T >::CompileFunc(), C4MeshDenumerator::CompileFunc(), C4KeyCodeEx::CompileFunc(), CompileNewFunc(), CompileNewFuncCtx(), C4Game::CompileRuntimeData(), C4ValueNumbers::CompileValue(), C4Object::GetDataString(), C4Network2UpdateClient::GetUpdateURL(), C4Network2UpdateClient::GetVersion(), C4Scenario::Load(), C4GameParameters::Load(), C4ScenarioListLoader::Scenario::LoadCustomPre(), C4Player::LoadRuntimeData(), C4PropListStatic::RefCompileFunc(), C4ConfigGamepad::Reset(), C4ConfigGamepad::ResetButtons(), C4Scenario::Save(), C4GameParameters::Save(), C4Game::SaveData(), and StdPtrAdaptDecompileNewFunc().

Here is the caller graph for this function:

◆ mkParAdapt() [2/2]

template<class T , class P1 , class P2 >
StdParameter2Adapt<T, P1, P2> mkParAdapt ( T &&  rObj,
P1 &&  rPar1,
P2 &&  rPar2 
)
inline

Definition at line 522 of file StdAdaptors.h.

523 { return StdParameter2Adapt<T, P1, P2>(std::forward<T>(rObj), std::forward<P1>(rPar1), std::forward<P2>(rPar2)); }

◆ mkParAdaptMaker()

template<class P >
StdParameterAdaptMaker<P> mkParAdaptMaker ( P &&  rPar)
inline

Definition at line 503 of file StdAdaptors.h.

503 { return StdParameterAdaptMaker<P>(std::forward<P>(rPar)); }

Referenced by C4ValueArray::CompileFunc(), and C4LSectors::Dump().

Here is the caller graph for this function:

◆ mkPtrAdapt()

template<class T >
StdPtrAdapt<T> mkPtrAdapt ( T *&  rpObj,
bool  fAllowNull = true 
)
inline

Definition at line 634 of file StdAdaptors.h.

634 { return StdPtrAdapt<T>(rpObj, fAllowNull); }

◆ mkPtrAdaptNoNull()

template<class T >
StdPtrAdapt<T> mkPtrAdaptNoNull ( T *&  rpObj)
inline

Definition at line 638 of file StdAdaptors.h.

638 { return mkPtrAdapt<T>(rpObj, false); }

Referenced by CompileFromBufToNew(), CompileFromBufToNewNamed(), C4GameRes::CompileFunc(), C4RecordChunk::CompileFunc(), C4TeamList::CompileFunc(), C4MapFolderData::CompileFunc(), C4ObjectList::CompileFunc(), C4Effect::CompileFunc(), C4ValueNumbers::CompileValue(), and C4Playback::ReadBinary().

Here is the caller graph for this function:

◆ mkRawAdapt()

StdRawAdapt mkRawAdapt ( void *  pData,
size_t  iSize,
StdCompiler::RawCompileType  eRawType = StdCompiler::RCT_Escaped 
)
inline

Definition at line 225 of file StdAdaptors.h.

226 { return StdRawAdapt(pData, iSize, eRawType); }

References iSize.

Referenced by mkRawAdaptM().

Here is the caller graph for this function:

◆ mkRawAdaptM()

template<typename T >
StdRawAdapt mkRawAdaptM ( T &  val)
inline

Definition at line 228 of file StdAdaptors.h.

229 {
230  // GCC 4.x doesn't support std::is_trivially_copyable
231 #if !defined(__GNUC__) || __GNUC__ > 4
232  static_assert(std::is_trivially_copyable<T>::value, "StdRawAdapt: type must be trivially copyable");
233 #endif
234  return mkRawAdapt(&val, sizeof(val));
235 }
StdRawAdapt mkRawAdapt(void *pData, size_t iSize, StdCompiler::RawCompileType eRawType=StdCompiler::RCT_Escaped)
Definition: StdAdaptors.h:225

References mkRawAdapt().

Here is the call graph for this function:

◆ mkRuntimeValueAdapt()

template<class T >
StdRuntimeValueAdapt<T> mkRuntimeValueAdapt ( T &&  rValue)
inline

Definition at line 172 of file StdAdaptors.h.

172 { return StdRuntimeValueAdapt<T>(rValue); }

Referenced by C4SGame::CompileFunc().

Here is the caller graph for this function:

◆ mkSTLContainerAdapt()

template<class C >
StdSTLContainerAdapt<C> mkSTLContainerAdapt ( C &  rTarget,
StdCompiler::Sep  eSep = StdCompiler::SEP_SEP 
)
inline

◆ mkStringAdapt() [1/2]

StdStringAdapt mkStringAdapt ( char *  szString,
int  iMaxLength,
StdCompiler::RawCompileType  eRawType = StdCompiler::RCT_Escaped 
)
inline

Definition at line 187 of file StdAdaptors.h.

188 { return StdStringAdapt(szString, iMaxLength, eRawType); }

Referenced by C4NameList::CompileFunc(), mkStringAdaptM(), mkStringAdaptMA(), mkStringAdaptMI(), and mkStringAdaptMIE().

Here is the caller graph for this function:

◆ mkStringAdapt() [2/2]

StdStdStringAdapt mkStringAdapt ( std::string &  string,
StdCompiler::RawCompileType  eRawType = StdCompiler::RCT_Escaped 
)
inline

Definition at line 207 of file StdAdaptors.h.

208 { return StdStdStringAdapt(string, eRawType); }

◆ mkStringAdaptA()

StdStdStringAdapt mkStringAdaptA ( std::string &  string)
inline

Definition at line 209 of file StdAdaptors.h.

210 { return StdStdStringAdapt(string, StdCompiler::RCT_All); }

References StdCompiler::RCT_All.

Referenced by C4SLandscape::CompileFunc(), and C4SHead::CompileFunc().

Here is the caller graph for this function:

◆ mkStringAdaptM()

template<size_t size>
StdStringAdapt mkStringAdaptM ( char(&)  szString[size])
inline

Definition at line 189 of file StdAdaptors.h.

189 { return mkStringAdapt(szString, size); }
StdStringAdapt mkStringAdapt(char *szString, int iMaxLength, StdCompiler::RawCompileType eRawType=StdCompiler::RCT_Escaped)
Definition: StdAdaptors.h:187

References mkStringAdapt().

Here is the call graph for this function:

◆ mkStringAdaptMA()

template<size_t size>
StdStringAdapt mkStringAdaptMA ( char(&)  szString[size])
inline

Definition at line 190 of file StdAdaptors.h.

190 { return mkStringAdapt(szString, size, StdCompiler::RCT_All); }

References mkStringAdapt(), and StdCompiler::RCT_All.

Referenced by C4Game::CompileFunc(), C4Team::CompileFunc(), and C4SDefinitions::CompileFunc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mkStringAdaptMI()

template<size_t size>
StdStringAdapt mkStringAdaptMI ( char(&)  szString[size])
inline

Definition at line 191 of file StdAdaptors.h.

191 { return mkStringAdapt(szString, size, StdCompiler::RCT_Idtf); }

References mkStringAdapt(), and StdCompiler::RCT_Idtf.

Here is the call graph for this function:

◆ mkStringAdaptMIE()

template<size_t size>
StdStringAdapt mkStringAdaptMIE ( char(&)  szString[size])
inline

Definition at line 192 of file StdAdaptors.h.

192 { return mkStringAdapt(szString, size, StdCompiler::RCT_IdtfAllowEmpty); }
@ RCT_IdtfAllowEmpty
Definition: StdCompiler.h:140

References mkStringAdapt(), and StdCompiler::RCT_IdtfAllowEmpty.

Referenced by C4GraphicsOverlay::CompileFunc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StdPtrAdaptCompileFunc()

template<class T , typename ... P>
void StdPtrAdaptCompileFunc ( StdCompiler pComp,
const T &  adapt,
P &&...  pars 
)

Definition at line 584 of file StdAdaptors.h.

585 {
586  bool deserializing = pComp->isDeserializer(),
587  fNaming = pComp->hasNaming();
588  // Compiling? Clear object before
589  if(deserializing) { delete adapt.rpObj; adapt.rpObj = nullptr; }
590  // Null checks - different with naming support.
591  if(adapt.fAllowNull)
592  if(fNaming)
593  {
594  // Null check: just omit when writing
595  if(!deserializing && !adapt.rpObj) return;
596  // Set up naming
597  if(!pComp->Name(adapt.szNaming)) { assert(deserializing); pComp->NameEnd(); return; }
598  }
599  else
600  {
601  bool fNull = !! adapt.rpObj;
602  pComp->Value(fNull);
603  // Null? Nothing further to do
604  if(fNull) return;
605  }
606  else if(!deserializing)
607  assert(adapt.rpObj);
608  // Compile value
609  if(deserializing)
610  StdPtrAdaptCompileNewFunc(adapt, pComp, std::forward<P>(pars)...);
611  else
612  StdPtrAdaptDecompileNewFunc(adapt, pComp, std::forward<P>(pars)...);
613 
614  // Close naming
615  if(adapt.fAllowNull && fNaming) pComp->NameEnd();
616 }
void StdPtrAdaptDecompileNewFunc(const StdPtrAdapt< T > &adapt, StdCompiler *pComp)
Definition: StdAdaptors.h:625
void StdPtrAdaptCompileNewFunc(const StdPtrAdapt< T > &adapt, StdCompiler *pComp, P &&...pars)
Definition: StdAdaptors.h:620
void Value(const T &rStruct)
Definition: StdCompiler.h:161
virtual void NameEnd(bool fBreak=false)
Definition: StdCompiler.h:78
virtual bool isDeserializer()
Definition: StdCompiler.h:53
virtual bool Name(const char *szName)
Definition: StdCompiler.h:77
virtual bool hasNaming()
Definition: StdCompiler.h:58

References StdCompiler::hasNaming(), StdCompiler::isDeserializer(), StdCompiler::Name(), StdCompiler::NameEnd(), StdPtrAdaptCompileNewFunc(), StdPtrAdaptDecompileNewFunc(), and StdCompiler::Value().

Referenced by StdPtrAdapt< T >::CompileFunc(), and StdContextPtrAdapt< T, ContextT >::CompileFunc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StdPtrAdaptCompileNewFunc() [1/2]

template<class T , class ContextT , typename ... P>
void StdPtrAdaptCompileNewFunc ( const StdContextPtrAdapt< T, ContextT > &  adapt,
StdCompiler pComp,
P &&...  pars 
)

Definition at line 622 of file StdAdaptors.h.

622 { CompileNewFuncCtx(adapt.rpObj, pComp, *adapt.pCtx, std::forward<P>(pars)...); }
void CompileNewFuncCtx(T *&pStruct, StdCompiler *pComp, const ContextT &rCtx)
Definition: StdCompiler.h:348
const ContextT * pCtx
Definition: StdAdaptors.h:568

References CompileNewFuncCtx(), StdContextPtrAdapt< T, ContextT >::pCtx, and StdBasicPtrAdapt< T >::rpObj.

Here is the call graph for this function:

◆ StdPtrAdaptCompileNewFunc() [2/2]

template<class T , typename ... P>
void StdPtrAdaptCompileNewFunc ( const StdPtrAdapt< T > &  adapt,
StdCompiler pComp,
P &&...  pars 
)

Definition at line 620 of file StdAdaptors.h.

620 { CompileNewFunc(adapt.rpObj, pComp, std::forward<P>(pars)...); }
void CompileNewFunc(T *&pStruct, StdCompiler *pComp)
Definition: StdCompiler.h:320

References CompileNewFunc(), and StdBasicPtrAdapt< T >::rpObj.

Referenced by StdPtrAdaptCompileFunc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StdPtrAdaptDecompileNewFunc() [1/4]

template<class T , class ContextT >
void StdPtrAdaptDecompileNewFunc ( const StdContextPtrAdapt< T, ContextT > &  adapt,
StdCompiler pComp 
)

Definition at line 627 of file StdAdaptors.h.

627 { pComp->Value(mkDecompileAdapt(*adapt.rpObj)); }
StdDecompileAdapt< T > mkDecompileAdapt(const T &rValue)
Definition: StdAdaptors.h:153

References mkDecompileAdapt(), StdBasicPtrAdapt< T >::rpObj, and StdCompiler::Value().

Here is the call graph for this function:

◆ StdPtrAdaptDecompileNewFunc() [2/4]

template<class T , class ContextT , typename ... P>
void StdPtrAdaptDecompileNewFunc ( const StdContextPtrAdapt< T, ContextT > &  adapt,
StdCompiler pComp,
P &&...  pars 
)

Definition at line 631 of file StdAdaptors.h.

631 { pComp->Value(mkParAdapt(mkDecompileAdapt(*adapt.rpObj), std::forward<P>(pars)...)); }
StdParameterAdapt< T, P > mkParAdapt(T &&rObj, P &&rPar)
Definition: StdAdaptors.h:490

References mkDecompileAdapt(), mkParAdapt(), StdBasicPtrAdapt< T >::rpObj, and StdCompiler::Value().

Here is the call graph for this function:

◆ StdPtrAdaptDecompileNewFunc() [3/4]

template<class T >
void StdPtrAdaptDecompileNewFunc ( const StdPtrAdapt< T > &  adapt,
StdCompiler pComp 
)

Definition at line 625 of file StdAdaptors.h.

625 { pComp->Value(mkDecompileAdapt(*adapt.rpObj)); }

References mkDecompileAdapt(), StdBasicPtrAdapt< T >::rpObj, and StdCompiler::Value().

Referenced by StdPtrAdaptCompileFunc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StdPtrAdaptDecompileNewFunc() [4/4]

template<class T , typename ... P>
void StdPtrAdaptDecompileNewFunc ( const StdPtrAdapt< T > &  adapt,
StdCompiler pComp,
P &&...  pars 
)

Definition at line 629 of file StdAdaptors.h.

629 { pComp->Value(mkParAdapt(mkDecompileAdapt(*adapt.rpObj), std::forward<P>(pars)...)); }

References mkDecompileAdapt(), mkParAdapt(), StdBasicPtrAdapt< T >::rpObj, and StdCompiler::Value().

Here is the call graph for this function: