OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4PacketJoinData Class Reference

#include <C4Network2.h>

Inheritance diagram for C4PacketJoinData:
[legend]
Collaboration diagram for C4PacketJoinData:
[legend]

Public Member Functions

 C4PacketJoinData ()
 
const int32_t & getClientID () const
 
const C4Network2ResCoregetDynamicCore () const
 
const C4Network2StatusgetStatus () const
 
int32_t getStartCtrlTick () const
 
void SetClientID (int32_t inClientID)
 
void SetGameStatus (const C4Network2Status &Status)
 
void SetDynamicCore (const C4Network2ResCore &Core)
 
void SetStartCtrlTick (int32_t iTick)
 
virtual void CompileFunc (StdCompiler *pComp)
 
C4NetIOPacket pack (const C4NetIO::addr_t &addr=C4NetIO::addr_t()) const
 
C4NetIOPacket pack (uint8_t cStatus, const C4NetIO::addr_t &addr=C4NetIO::addr_t()) const
 
void unpack (const C4NetIOPacket &Pkt, char *pStatus=nullptr)
 

Public Attributes

C4ScenarioParameterDefs ScenarioParameterDefs
 
C4GameParameters Parameters
 

Protected Attributes

int32_t iClientID
 
C4Network2ResCore Dynamic
 
C4Network2Status GameStatus
 
int32_t iStartCtrlTick
 

Detailed Description

Definition at line 415 of file C4Network2.h.

Constructor & Destructor Documentation

C4PacketJoinData::C4PacketJoinData ( )
inline

Definition at line 418 of file C4Network2.h.

418 { }

Member Function Documentation

void C4PacketJoinData::CompileFunc ( StdCompiler pComp)
virtual

Implements C4PacketBase.

Definition at line 501 of file C4Packet2.cpp.

References C4ClientIDUnknown, Dynamic, GameStatus, iClientID, iStartCtrlTick, mkIntPackAdapt(), mkNamingAdapt(), mkParAdapt(), Parameters, ScenarioParameterDefs, and StdCompiler::Value().

502 {
504  pComp->Value(mkNamingAdapt(mkIntPackAdapt(iStartCtrlTick), "CtrlTick", -1));
505  pComp->Value(mkNamingAdapt(mkParAdapt(GameStatus, true), "GameStatus"));
506  pComp->Value(mkNamingAdapt(Dynamic, "Dynamic"));
507  pComp->Value(mkNamingAdapt(ScenarioParameterDefs, "ParameterDefs"));
508  pComp->Value(Parameters);
509 }
C4Network2Status GameStatus
Definition: C4Network2.h:429
C4Network2ResCore Dynamic
Definition: C4Network2.h:426
C4ScenarioParameterDefs ScenarioParameterDefs
Definition: C4Network2.h:437
int32_t iStartCtrlTick
Definition: C4Network2.h:432
StdNamingAdapt< T > mkNamingAdapt(T &&rValue, const char *szName)
Definition: StdAdaptors.h:93
void Value(const T &rStruct)
Definition: StdCompiler.h:171
const int32_t C4ClientIDUnknown
Definition: C4Client.h:24
StdIntPackAdapt< T > mkIntPackAdapt(T &rVal)
Definition: StdAdaptors.h:757
int32_t iClientID
Definition: C4Network2.h:423
StdParameterAdapt< T, P > mkParAdapt(T &&rObj, P &&rPar)
Definition: StdAdaptors.h:456
C4GameParameters Parameters
Definition: C4Network2.h:440

Here is the call graph for this function:

const int32_t& C4PacketJoinData::getClientID ( ) const
inline

Definition at line 443 of file C4Network2.h.

References iClientID.

Referenced by C4Network2::HandleJoinData().

443 { return iClientID; }
int32_t iClientID
Definition: C4Network2.h:423

Here is the caller graph for this function:

const C4Network2ResCore& C4PacketJoinData::getDynamicCore ( ) const
inline

Definition at line 444 of file C4Network2.h.

References Dynamic.

Referenced by C4Network2::HandleJoinData().

444 { return Dynamic; }
C4Network2ResCore Dynamic
Definition: C4Network2.h:426

Here is the caller graph for this function:

int32_t C4PacketJoinData::getStartCtrlTick ( ) const
inline

Definition at line 446 of file C4Network2.h.

References iStartCtrlTick.

Referenced by C4Network2::HandleJoinData().

446 { return iStartCtrlTick; }
int32_t iStartCtrlTick
Definition: C4Network2.h:432

Here is the caller graph for this function:

const C4Network2Status& C4PacketJoinData::getStatus ( ) const
inline

Definition at line 445 of file C4Network2.h.

References GameStatus.

Referenced by C4Network2::HandleJoinData().

445 { return GameStatus; }
C4Network2Status GameStatus
Definition: C4Network2.h:429

Here is the caller graph for this function:

C4NetIOPacket C4PacketBase::pack ( const C4NetIO::addr_t addr = C4NetIO::addr_t()) const
inherited

Definition at line 156 of file C4Packet2.cpp.

Referenced by MkC4NetIOPacket().

157 {
158  return C4NetIOPacket(DecompileToBuf<StdCompilerBinWrite>(*this), addr);
159 }

Here is the caller graph for this function:

C4NetIOPacket C4PacketBase::pack ( uint8_t  cStatus,
const C4NetIO::addr_t addr = C4NetIO::addr_t() 
) const
inherited

Definition at line 161 of file C4Packet2.cpp.

References mkDecompileAdapt(), and mkInsertAdapt().

162 {
163  return C4NetIOPacket(DecompileToBuf<StdCompilerBinWrite>(mkInsertAdapt(mkDecompileAdapt(*this), cStatus)), addr);
164 }
StdDecompileAdapt< T > mkDecompileAdapt(const T &rValue)
Definition: StdAdaptors.h:154
StdInsertAdapt< T, I > mkInsertAdapt(T &&rObj, I &&rIns, bool fBefore=true)
Definition: StdAdaptors.h:435

Here is the call graph for this function:

void C4PacketJoinData::SetClientID ( int32_t  inClientID)
inline

Definition at line 448 of file C4Network2.h.

Referenced by C4Network2::SendJoinData().

448 { iClientID = inClientID; }
int32_t iClientID
Definition: C4Network2.h:423

Here is the caller graph for this function:

void C4PacketJoinData::SetDynamicCore ( const C4Network2ResCore Core)
inline

Definition at line 450 of file C4Network2.h.

Referenced by C4Network2::SendJoinData().

450 { Dynamic = Core; }
C4Network2ResCore Dynamic
Definition: C4Network2.h:426

Here is the caller graph for this function:

void C4PacketJoinData::SetGameStatus ( const C4Network2Status Status)
inline

Definition at line 449 of file C4Network2.h.

Referenced by C4Network2::SendJoinData().

449 { GameStatus = Status; }
C4Network2Status GameStatus
Definition: C4Network2.h:429

Here is the caller graph for this function:

void C4PacketJoinData::SetStartCtrlTick ( int32_t  iTick)
inline

Definition at line 451 of file C4Network2.h.

Referenced by C4Network2::SendJoinData().

451 { iStartCtrlTick = iTick; }
int32_t iStartCtrlTick
Definition: C4Network2.h:432

Here is the caller graph for this function:

void C4PacketBase::unpack ( const C4NetIOPacket Pkt,
char *  pStatus = nullptr 
)
inherited

Definition at line 166 of file C4Packet2.cpp.

References C4NetIOPacket::getPBuf(), C4NetIOPacket::getRef(), and C4NetIOPacket::getStatus().

Referenced by C4IDPacket::C4IDPacket(), and C4Network2IO::HandlePacket().

167 {
168  if (pStatus) *pStatus = Pkt.getStatus();
169  CompileFromBuf<StdCompilerBinRead>(*this, pStatus ? Pkt.getPBuf() : Pkt.getRef());
170 }
StdBuf getPBuf() const
Definition: C4NetIO.h:321
C4NetIOPacket getRef() const
Definition: C4NetIO.h:324
uint8_t getStatus() const
Definition: C4NetIO.h:318

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

C4Network2ResCore C4PacketJoinData::Dynamic
protected

Definition at line 426 of file C4Network2.h.

Referenced by CompileFunc(), and getDynamicCore().

C4Network2Status C4PacketJoinData::GameStatus
protected

Definition at line 429 of file C4Network2.h.

Referenced by CompileFunc(), and getStatus().

int32_t C4PacketJoinData::iClientID
protected

Definition at line 423 of file C4Network2.h.

Referenced by CompileFunc(), and getClientID().

int32_t C4PacketJoinData::iStartCtrlTick
protected

Definition at line 432 of file C4Network2.h.

Referenced by CompileFunc(), and getStartCtrlTick().

C4GameParameters C4PacketJoinData::Parameters

Definition at line 440 of file C4Network2.h.

Referenced by CompileFunc(), C4Network2::HandleJoinData(), and C4Network2::SendJoinData().

C4ScenarioParameterDefs C4PacketJoinData::ScenarioParameterDefs

Definition at line 437 of file C4Network2.h.

Referenced by CompileFunc(), C4Network2::HandleJoinData(), and C4Network2::SendJoinData().


The documentation for this class was generated from the following files: