Isle
Loading...
Searching...
No Matches
mxstreamchunk.h
Go to the documentation of this file.
1#ifndef MXSTREAMCHUNK_H
2#define MXSTREAMCHUNK_H
3
4#include "mxdschunk.h"
5
6class MxDSBuffer;
8
9// VTABLE: LEGO1 0x100dc2a8
10// VTABLE: BETA10 0x101c1d20
11// SIZE 0x20
19class MxStreamChunk : public MxDSChunk {
20public:
24 MxStreamChunk() : m_buffer(NULL) {}
25
29 ~MxStreamChunk() override;
30
35 const char* ClassName() const override // vtable+0x0c
36 {
37 // STRING: LEGO1 0x10101e5c
38 return "MxStreamChunk";
39 }
40
46 MxBool IsA(const char* p_name) const override // vtable+0x10
47 {
48 return !strcmp(p_name, MxStreamChunk::ClassName()) || MxDSChunk::IsA(p_name);
49 }
50
55 MxDSBuffer* GetBuffer() { return m_buffer; }
56
63 MxResult ReadChunk(MxDSBuffer* p_buffer, MxU8* p_chunkData);
64
70 MxU32 ReadChunkHeader(MxU8* p_chunkData);
71
79 MxResult SendChunk(MxDSSubscriberList& p_subscriberList, MxBool p_append, MxS16 p_obj24val);
80
85 void SetBuffer(MxDSBuffer* p_buffer);
86
92 static MxU16* IntoFlags(MxU8* p_buffer);
93
99 static MxU32* IntoObjectId(MxU8* p_buffer);
100
106 static MxLong* IntoTime(MxU8* p_buffer);
107
113 static MxU32* IntoLength(MxU8* p_buffer);
114
115private:
116 MxDSBuffer* m_buffer;
117};
118
119// SYNTHETIC: LEGO1 0x100b20a0
120// MxStreamChunk::`scalar deleting destructor'
121
122#endif // MXSTREAMCHUNK_H
[AI] Buffer for managing streamed DS (Data Stream) chunks and actions.
Definition: mxdsbuffer.h:50
[AI] Represents a chunk of data extracted from a stream (typically from a Mindscape/Mx SI file or str...
Definition: mxdschunk.h:38
MxBool IsA(const char *p_name) const override
[AI] Checks if this object or any parent class matches the provided class name string.
Definition: mxdschunk.h:56
[AI] List container for pointers to MxDSSubscriber objects, with utility methods.
[AI] Represents a streamable chunk of data, typically sourced from a media buffer and designed for no...
Definition: mxstreamchunk.h:19
MxU32 ReadChunkHeader(MxU8 *p_chunkData)
[AI] Reads this chunk's header fields from the provided chunk data.
MxStreamChunk()
[AI] Constructs a new MxStreamChunk with a null buffer pointer.
Definition: mxstreamchunk.h:24
const char * ClassName() const override
[AI] Returns the class name identifier for runtime type checking and reflection.
Definition: mxstreamchunk.h:35
static MxU32 * IntoLength(MxU8 *p_buffer)
[AI] Utility to cast a chunk header buffer into the data length field pointer, facilitating direct pa...
static MxLong * IntoTime(MxU8 *p_buffer)
[AI] Utility to cast a chunk header buffer into the time field pointer, facilitating direct parsing.
MxBool IsA(const char *p_name) const override
[AI] Performs runtime type checking against this or parent class names.
Definition: mxstreamchunk.h:46
MxDSBuffer * GetBuffer()
[AI] Retrieves the buffer associated with this chunk.
Definition: mxstreamchunk.h:55
MxResult ReadChunk(MxDSBuffer *p_buffer, MxU8 *p_chunkData)
[AI] Reads the chunk's header and initializes from a chunk data buffer of a streamed data segment.
static MxU32 * IntoObjectId(MxU8 *p_buffer)
[AI] Utility to cast a chunk header buffer into the objectId field pointer, facilitating direct parsi...
MxResult SendChunk(MxDSSubscriberList &p_subscriberList, MxBool p_append, MxS16 p_obj24val)
[AI] Dispatches this stream chunk to a list of subscribers matching certain criteria.
void SetBuffer(MxDSBuffer *p_buffer)
[AI] Sets the buffer reference for this chunk, without incrementing the reference count.
static MxU16 * IntoFlags(MxU8 *p_buffer)
[AI] Utility to cast a chunk header buffer into the flags field pointer, facilitating direct parsing.
~MxStreamChunk() override
[AI] Cleans up the stream chunk, releasing its associated buffer if any.
#define override
Definition: compat.h:21
#define NULL
[AI] Null pointer value (C/C++ semantics).
Definition: legotypes.h:26
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
int MxLong
[AI]
Definition: mxtypes.h:83
signed short MxS16
[AI]
Definition: mxtypes.h:26
unsigned char MxU8
[AI]
Definition: mxtypes.h:8
unsigned short MxU16
[AI]
Definition: mxtypes.h:20
unsigned int MxU32
[AI]
Definition: mxtypes.h:32