OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4RecordChunk Struct Reference

#include <C4Record.h>

Collaboration diagram for C4RecordChunk:
[legend]

Public Member Functions

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

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 ( )

Definition at line 70 of file C4Record.cpp.

71  : pCtrl(nullptr)
72 {
73 
74 }
virtual C4RecordChunk::~C4RecordChunk ( )
inlinevirtual

Definition at line 119 of file C4Record.h.

119 {}

Member Function Documentation

void C4RecordChunk::CompileFunc ( StdCompiler pComp)
virtual

Definition at line 89 of file C4Record.cpp.

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

90 {
91  pComp->Value(mkNamingAdapt(Frame, "Frame"));
92  pComp->Value(mkNamingAdapt(mkIntAdapt(Type), "Type"));
93  switch (Type)
94  {
95  case RCT_Ctrl: pComp->Value(mkPtrAdaptNoNull(pCtrl)); break;
96  case RCT_CtrlPkt: pComp->Value(mkPtrAdaptNoNull(pPkt)); break;
97  case RCT_End: break;
98  case RCT_Frame: break;
99  case RCT_File: pComp->Value(Filename); pComp->Value(mkPtrAdaptNoNull(pFileData)); break;
100  default: pComp->Value(mkPtrAdaptNoNull(pDbg)); break;
101  }
102 }
uint8_t Type
Definition: C4Record.h:106
StdNamingAdapt< T > mkNamingAdapt(T &&rValue, const char *szName)
Definition: StdAdaptors.h:93
StdPtrAdapt< T > mkPtrAdaptNoNull(T *&rpObj)
Definition: StdAdaptors.h:607
int32_t Frame
Definition: C4Record.h:105
StdCopyStrBuf Filename
Definition: C4Record.h:114
void Value(const T &rStruct)
Definition: StdCompiler.h:171
StdIntAdapt< T > mkIntAdapt(T &rValue)
Definition: StdAdaptors.h:230

Here is the call graph for this function:

void C4RecordChunk::Delete ( )

Definition at line 76 of file C4Record.cpp.

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

Referenced by C4Playback::ReadBinary().

77 {
78  switch (Type)
79  {
80  case RCT_Ctrl: delete pCtrl; pCtrl = nullptr; break;
81  case RCT_CtrlPkt: delete pPkt; pPkt = nullptr; break;
82  case RCT_End: break;
83  case RCT_Frame: break;
84  case RCT_File: delete pFileData; break;
85  default: delete pDbg; pDbg = nullptr; break;
86  }
87 }
uint8_t Type
Definition: C4Record.h:106

Here is the caller graph for this function:

Member Data Documentation

union { ... }
StdCopyStrBuf C4RecordChunk::Filename

Definition at line 114 of file C4Record.h.

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

int32_t C4RecordChunk::Frame

Definition at line 105 of file C4Record.h.

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

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: