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)
 
#define mkStringAdaptM(szString)   mkStringAdapt(szString, (sizeof(szString) / sizeof(*szString)) - 1)
 
#define mkStringAdaptMA(szString)   mkStringAdapt(szString, (sizeof(szString) / sizeof(*szString)) - 1, StdCompiler::RCT_All)
 
#define mkStringAdaptMI(szString)   mkStringAdapt(szString, (sizeof(szString) / sizeof(*szString)) - 1, StdCompiler::RCT_Idtf)
 
#define mkStringAdaptMIE(szString)   mkStringAdapt(szString, (sizeof(szString) / sizeof(*szString)) - 1, StdCompiler::RCT_IdtfAllowEmpty)
 
#define mkRawAdaptM(X)   mkRawAdapt(&X, sizeof(X))
 
#define mkArrayAdaptM(A)   mkArrayAdapt(A, sizeof(A) / sizeof(*(A)))
 
#define mkArrayAdaptMapM(A, M)   mkArrayAdaptMap(A, sizeof(A) / sizeof(*(A)), M)
 
#define mkArrayAdaptDM(A, D)   mkArrayAdapt(A, sizeof(A) / sizeof(*(A)), D)
 
#define mkArrayAdaptMapDM(A, D, M)   mkArrayAdaptMap(A, sizeof(A) / sizeof(*(A)), D, M)
 
#define mkArrayAdaptDMA(A, D)   mkArrayAdaptDefArr(A, sizeof(A) / sizeof(*(A)), D)
 
#define mkArrayAdaptDMAM(A, D, M)   mkArrayAdaptDefArrMap(A, sizeof(A) / sizeof(*(A)), D, M)
 

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)
 
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<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 , class M >
StdArrayAdapt< T, M > mkArrayAdaptMap (T *pArray, int iSize, M &&map)
 
template<class T , class D >
StdArrayDefaultAdapt< T, D > mkArrayAdapt (T *pArray, size_t iSize, 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 >
StdArrayDefaultArrayAdapt< T, D > mkArrayAdaptDefArr (T *pArray, size_t iSize, 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 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 780 of file StdAdaptors.h.

Collaboration diagram for StdEnumEntry< T >:
[legend]
Class Members
const char * Name
T Val

◆ StdBitfieldEntry

struct StdBitfieldEntry

template<class T>
struct StdBitfieldEntry< T >

Definition at line 868 of file StdAdaptors.h.

Collaboration diagram for StdBitfieldEntry< T >:
[legend]
Class Members
const char * Name
T Val

Macro Definition Documentation

◆ mkArrayAdaptDM

#define mkArrayAdaptDM (   A,
 
)    mkArrayAdapt(A, sizeof(A) / sizeof(*(A)), D)

◆ mkArrayAdaptDMA

#define mkArrayAdaptDMA (   A,
 
)    mkArrayAdaptDefArr(A, sizeof(A) / sizeof(*(A)), D)

Definition at line 433 of file StdAdaptors.h.

Referenced by C4Shape::CompileFunc().

◆ mkArrayAdaptDMAM

#define mkArrayAdaptDMAM (   A,
  D,
 
)    mkArrayAdaptDefArrMap(A, sizeof(A) / sizeof(*(A)), D, M)

Definition at line 436 of file StdAdaptors.h.

Referenced by C4Shape::CompileFunc().

◆ mkArrayAdaptM

#define mkArrayAdaptM (   A)    mkArrayAdapt(A, sizeof(A) / sizeof(*(A)))

Definition at line 329 of file StdAdaptors.h.

Referenced by C4Weather::CompileFunc().

◆ mkArrayAdaptMapDM

#define mkArrayAdaptMapDM (   A,
  D,
 
)    mkArrayAdaptMap(A, sizeof(A) / sizeof(*(A)), D, M)

Definition at line 384 of file StdAdaptors.h.

◆ mkArrayAdaptMapM

#define mkArrayAdaptMapM (   A,
 
)    mkArrayAdaptMap(A, sizeof(A) / sizeof(*(A)), M)

Definition at line 332 of file StdAdaptors.h.

◆ mkRawAdaptM

#define mkRawAdaptM (   X)    mkRawAdapt(&X, sizeof(X))

Definition at line 227 of file StdAdaptors.h.

◆ mkStringAdaptM

#define mkStringAdaptM (   szString)    mkStringAdapt(szString, (sizeof(szString) / sizeof(*szString)) - 1)

Definition at line 189 of file StdAdaptors.h.

◆ mkStringAdaptMA

#define mkStringAdaptMA (   szString)    mkStringAdapt(szString, (sizeof(szString) / sizeof(*szString)) - 1, StdCompiler::RCT_All)

◆ mkStringAdaptMI

#define mkStringAdaptMI (   szString)    mkStringAdapt(szString, (sizeof(szString) / sizeof(*szString)) - 1, StdCompiler::RCT_Idtf)

Definition at line 191 of file StdAdaptors.h.

◆ mkStringAdaptMIE

#define mkStringAdaptMIE (   szString)    mkStringAdapt(szString, (sizeof(szString) / sizeof(*szString)) - 1, StdCompiler::RCT_IdtfAllowEmpty)

Definition at line 192 of file StdAdaptors.h.

Referenced by C4GraphicsOverlay::CompileFunc().

◆ toC4CArr

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

Definition at line 28 of file StdAdaptors.h.

Referenced by C4UpdatePackageCore::CompileFunc(), and C4Def::CompileFunc().

◆ toC4CArrU

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

Definition at line 29 of file StdAdaptors.h.

Referenced by C4UpdatePackageCore::CompileFunc().

◆ toC4CStr

◆ toC4CStrBuf

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

Function Documentation

◆ mkArrayAdapt() [1/2]

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

Definition at line 328 of file StdAdaptors.h.

References iSize.

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

328 { return StdArrayAdapt<T>(pArray, iSize); }
int iSize
Definition: TstC4NetIO.cpp:32
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 380 of file StdAdaptors.h.

References iSize.

380 { return StdArrayDefaultAdapt<T, D>(pArray, iSize, rDefault); }
int iSize
Definition: TstC4NetIO.cpp:32

◆ mkArrayAdaptDefArr()

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

Definition at line 432 of file StdAdaptors.h.

References iSize.

Referenced by C4Shape::CompileFunc().

432 { return StdArrayDefaultArrayAdapt<T, D>(pArray, iSize, rDefault); }
int iSize
Definition: TstC4NetIO.cpp:32
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 435 of file StdAdaptors.h.

References iSize.

435 { return StdArrayDefaultArrayAdapt<T, D, M>(pArray, iSize, rDefault, map); }
int iSize
Definition: TstC4NetIO.cpp:32

◆ mkArrayAdaptMap() [1/2]

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

Definition at line 331 of file StdAdaptors.h.

References iSize.

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

331 { return StdArrayAdapt<T, M>(pArray, iSize, std::forward<M>(map)); }
int iSize
Definition: TstC4NetIO.cpp:32
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 383 of file StdAdaptors.h.

References iSize.

383 { return StdArrayDefaultAdapt<T, D, M>(pArray, iSize, rDefault, map); }
int iSize
Definition: TstC4NetIO.cpp:32

◆ mkBitfieldAdapt()

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

Definition at line 971 of file StdAdaptors.h.

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

971 { return StdBitfieldAdapt<T>(rVal, pNames); }
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 272 of file StdAdaptors.h.

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

◆ mkCastIntAdapt()

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

Definition at line 273 of file StdAdaptors.h.

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

273 { return StdCastAdapt<T, int32_t>(rValue); }
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 627 of file StdAdaptors.h.

627 { 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 631 of file StdAdaptors.h.

631 { 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.

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

153 { return StdDecompileAdapt<T>(rValue); }
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 863 of file StdAdaptors.h.

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

◆ mkEnumAdaptT()

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

Definition at line 865 of file StdAdaptors.h.

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

◆ mkHexAdapt() [1/2]

StdHexAdapt mkHexAdapt ( void *  pData,
size_t  iSize 
)
inline

Definition at line 1023 of file StdAdaptors.h.

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

1023 { return StdHexAdapt(pData, iSize); }
int iSize
Definition: TstC4NetIO.cpp:32
Here is the caller graph for this function:

◆ mkHexAdapt() [2/2]

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

Definition at line 1025 of file StdAdaptors.h.

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

◆ mkInsertAdapt()

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

Definition at line 455 of file StdAdaptors.h.

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

455 { return StdInsertAdapt<T,I>(rObj, rIns, fBefore); }
Here is the caller graph for this function:

◆ mkIntAdapt()

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

Definition at line 247 of file StdAdaptors.h.

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

247 { return StdIntAdapt<T>(rValue); }
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 248 of file StdAdaptors.h.

248 { 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.

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

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

◆ 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 629 of file StdAdaptors.h.

Referenced by C4MeshDenumerator::CompileFunc().

629 { return StdContextPtrAdapt<T, ContextT>(rpObj, ctx, true, szNaming); }
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 994 of file StdAdaptors.h.

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

994 { return StdNamingCountAdapt<int_t>(iCount, szName); }
Here is the caller graph for this function:

◆ mkNamingPtrAdapt()

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

Definition at line 622 of file StdAdaptors.h.

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

622 { return StdPtrAdapt<T>(rpObj, true, szNaming); }
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 476 of file StdAdaptors.h.

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

477 { return StdParameterAdapt<T, P>(std::forward<T>(rObj), std::forward<P>(rPar)); }
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 508 of file StdAdaptors.h.

509 { 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 489 of file StdAdaptors.h.

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

489 { return StdParameterAdaptMaker<P>(std::forward<P>(rPar)); }
Here is the caller graph for this function:

◆ mkPtrAdapt()

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

Definition at line 620 of file StdAdaptors.h.

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

◆ mkPtrAdaptNoNull()

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

Definition at line 624 of file StdAdaptors.h.

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

624 { return mkPtrAdapt<T>(rpObj, false); }
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); }
int iSize
Definition: TstC4NetIO.cpp:32

◆ mkRuntimeValueAdapt()

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

Definition at line 172 of file StdAdaptors.h.

Referenced by C4SGame::CompileFunc().

Here is the caller graph for this function:

◆ mkSTLContainerAdapt()

◆ mkStringAdapt() [1/2]

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

Definition at line 187 of file StdAdaptors.h.

Referenced by C4NameList::CompileFunc().

188 { return StdStringAdapt(szString, iMaxLength, eRawType); }
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.

References StdCompiler::RCT_All.

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

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

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

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

571 {
572  bool deserializing = pComp->isDeserializer(),
573  fNaming = pComp->hasNaming();
574  // Compiling? Clear object before
575  if(deserializing) { delete adapt.rpObj; adapt.rpObj = nullptr; }
576  // Null checks - different with naming support.
577  if(adapt.fAllowNull)
578  if(fNaming)
579  {
580  // Null check: just omit when writing
581  if(!deserializing && !adapt.rpObj) return;
582  // Set up naming
583  if(!pComp->Name(adapt.szNaming)) { assert(deserializing); pComp->NameEnd(); return; }
584  }
585  else
586  {
587  bool fNull = !! adapt.rpObj;
588  pComp->Value(fNull);
589  // Null? Nothing further to do
590  if(fNull) return;
591  }
592  else if(!deserializing)
593  assert(adapt.rpObj);
594  // Compile value
595  if(deserializing)
596  StdPtrAdaptCompileNewFunc(adapt, pComp, std::forward<P>(pars)...);
597  else
598  StdPtrAdaptDecompileNewFunc(adapt, pComp, std::forward<P>(pars)...);
599 
600  // Close naming
601  if(adapt.fAllowNull && fNaming) pComp->NameEnd();
602 }
virtual bool hasNaming()
Definition: StdCompiler.h:58
virtual bool Name(const char *szName)
Definition: StdCompiler.h:77
void Value(const T &rStruct)
Definition: StdCompiler.h:161
virtual bool isDeserializer()
Definition: StdCompiler.h:53
void StdPtrAdaptCompileNewFunc(const StdPtrAdapt< T > &adapt, StdCompiler *pComp, P &&...pars)
Definition: StdAdaptors.h:606
void StdPtrAdaptDecompileNewFunc(const StdPtrAdapt< T > &adapt, StdCompiler *pComp)
Definition: StdAdaptors.h:611
virtual void NameEnd(bool fBreak=false)
Definition: StdCompiler.h:78
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StdPtrAdaptCompileNewFunc() [1/2]

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

Definition at line 606 of file StdAdaptors.h.

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

Referenced by StdPtrAdaptCompileFunc().

606 { CompileNewFunc(adapt.rpObj, pComp, std::forward<P>(pars)...); }
void CompileNewFunc(T *&pStruct, StdCompiler *pComp)
Definition: StdCompiler.h:320
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StdPtrAdaptCompileNewFunc() [2/2]

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

Definition at line 608 of file StdAdaptors.h.

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

608 { CompileNewFuncCtx(adapt.rpObj, pComp, *adapt.pCtx, std::forward<P>(pars)...); }
const ContextT * pCtx
Definition: StdAdaptors.h:554
void CompileNewFuncCtx(T *&pStruct, StdCompiler *pComp, const ContextT &rCtx)
Definition: StdCompiler.h:348
Here is the call graph for this function:

◆ StdPtrAdaptDecompileNewFunc() [1/4]

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

Definition at line 611 of file StdAdaptors.h.

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

Referenced by StdPtrAdaptCompileFunc().

611 { pComp->Value(mkDecompileAdapt(*adapt.rpObj)); }
StdDecompileAdapt< T > mkDecompileAdapt(const T &rValue)
Definition: StdAdaptors.h:153
void Value(const T &rStruct)
Definition: StdCompiler.h:161
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StdPtrAdaptDecompileNewFunc() [2/4]

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

Definition at line 613 of file StdAdaptors.h.

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

613 { pComp->Value(mkDecompileAdapt(*adapt.rpObj)); }
StdDecompileAdapt< T > mkDecompileAdapt(const T &rValue)
Definition: StdAdaptors.h:153
void Value(const T &rStruct)
Definition: StdCompiler.h:161
Here is the call graph for this function:

◆ StdPtrAdaptDecompileNewFunc() [3/4]

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

Definition at line 615 of file StdAdaptors.h.

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

615 { pComp->Value(mkParAdapt(mkDecompileAdapt(*adapt.rpObj), std::forward<P>(pars)...)); }
StdDecompileAdapt< T > mkDecompileAdapt(const T &rValue)
Definition: StdAdaptors.h:153
void Value(const T &rStruct)
Definition: StdCompiler.h:161
StdParameterAdapt< T, P > mkParAdapt(T &&rObj, P &&rPar)
Definition: StdAdaptors.h:476
Here is the call graph for this function:

◆ StdPtrAdaptDecompileNewFunc() [4/4]

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

Definition at line 617 of file StdAdaptors.h.

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

617 { pComp->Value(mkParAdapt(mkDecompileAdapt(*adapt.rpObj), std::forward<P>(pars)...)); }
StdDecompileAdapt< T > mkDecompileAdapt(const T &rValue)
Definition: StdAdaptors.h:153
void Value(const T &rStruct)
Definition: StdCompiler.h:161
StdParameterAdapt< T, P > mkParAdapt(T &&rObj, P &&rPar)
Definition: StdAdaptors.h:476
Here is the call graph for this function: