OpenClonk
C4RecordChunk Struct Reference

#include <C4Record.h>

Collaboration diagram for C4RecordChunk:
[legend]

Public Member Functions

 C4RecordChunk ()
 
void Delete ()
 
virtual void CompileFunc (StdCompiler *pComp)
 
virtual ~C4RecordChunk ()=default
 

Public Attributes

int32_t Frame
 
uint8_t Type
 
union {
C4ControlpCtrl
 
C4IDPacketpPkt
 
class C4PktDebugRecpDbg
 
StdBufpFileData
 
}; 
 
StdCopyStrBuf Filename
 

Detailed Description

Definition at line 103 of file C4Record.h.

Constructor & Destructor Documentation

◆ C4RecordChunk()

C4RecordChunk::C4RecordChunk ( )

Definition at line 66 of file C4Record.cpp.

67  : pCtrl(nullptr)
68 {
69 
70 }

◆ ~C4RecordChunk()

virtual C4RecordChunk::~C4RecordChunk ( )
virtualdefault

Member Function Documentation

◆ CompileFunc()

void C4RecordChunk::CompileFunc ( StdCompiler pComp)
virtual

Definition at line 85 of file C4Record.cpp.

86 {
87  pComp->Value(mkNamingAdapt(Frame, "Frame"));
88  pComp->Value(mkNamingAdapt(mkIntAdapt(Type), "Type"));
89  switch (Type)
90  {
91  case RCT_Ctrl: pComp->Value(mkPtrAdaptNoNull(pCtrl)); break;
92  case RCT_CtrlPkt: pComp->Value(mkPtrAdaptNoNull(pPkt)); break;
93  case RCT_End: break;
94  case RCT_Frame: break;
95  case RCT_File: pComp->Value(Filename); pComp->Value(mkPtrAdaptNoNull(pFileData)); break;
96  default: pComp->Value(mkPtrAdaptNoNull(pDbg)); break;
97  }
98 }
@ RCT_Ctrl
Definition: C4Record.h:46
@ RCT_End
Definition: C4Record.h:49
@ RCT_Frame
Definition: C4Record.h:48
@ RCT_CtrlPkt
Definition: C4Record.h:47
@ RCT_File
Definition: C4Record.h:52
StdPtrAdapt< T > mkPtrAdaptNoNull(T *&rpObj)
Definition: StdAdaptors.h:638
StdIntAdapt< T > mkIntAdapt(T &rValue)
Definition: StdAdaptors.h:255
StdNamingAdapt< T > mkNamingAdapt(T &&rValue, const char *szName)
Definition: StdAdaptors.h:92
void Value(const T &rStruct)
Definition: StdCompiler.h:161
int32_t Frame
Definition: C4Record.h:105
uint8_t Type
Definition: C4Record.h:106
StdCopyStrBuf Filename
Definition: C4Record.h:114

References Filename, Frame, mkIntAdapt(), mkNamingAdapt(), mkPtrAdaptNoNull(), RCT_Ctrl, RCT_CtrlPkt, RCT_End, RCT_File, RCT_Frame, Type, and StdCompiler::Value().

Here is the call graph for this function:

◆ Delete()

void C4RecordChunk::Delete ( )

Definition at line 72 of file C4Record.cpp.

73 {
74  switch (Type)
75  {
76  case RCT_Ctrl: delete pCtrl; pCtrl = nullptr; break;
77  case RCT_CtrlPkt: delete pPkt; pPkt = nullptr; break;
78  case RCT_End: break;
79  case RCT_Frame: break;
80  case RCT_File: delete pFileData; break;
81  default: delete pDbg; pDbg = nullptr; break;
82  }
83 }

References RCT_Ctrl, RCT_CtrlPkt, RCT_End, RCT_File, RCT_Frame, and Type.

Referenced by C4Playback::ReadBinary().

Here is the caller graph for this function:

Member Data Documentation

◆ 

union { ... }

◆ Filename

StdCopyStrBuf C4RecordChunk::Filename

Definition at line 114 of file C4Record.h.

Referenced by CompileFunc(), and C4Playback::ReadBinary().

◆ Frame

int32_t C4RecordChunk::Frame

Definition at line 105 of file C4Record.h.

Referenced by CompileFunc(), C4Playback::ReadBinary(), and C4Playback::Strip().

◆ Type

uint8_t C4RecordChunk::Type

Definition at line 106 of file C4Record.h.

Referenced by CompileFunc(), Delete(), C4Playback::ReadBinary(), and C4Playback::Strip().


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