Isle
|
[AI] Represents a chunk of data extracted from a stream (typically from a Mindscape/Mx SI file or streaming media resource). More...
#include <mxdschunk.h>
Public Member Functions | |
MxDSChunk () | |
[AI] Constructs a new, empty chunk. All members initialized to safe defaults. [AI] More... | |
~MxDSChunk () override | |
[AI] Virtual destructor. Cleans up any owned chunk data if flagged by DS_CHUNK_BIT1. [AI] More... | |
const char * | ClassName () const override |
[AI] Returns the class name ("MxDSChunk") for runtime type identification. [AI] More... | |
MxBool | IsA (const char *p_name) const override |
[AI] Checks if this object or any parent class matches the provided class name string. More... | |
void | SetChunkFlags (MxU16 p_flags) |
[AI] Sets all chunk header flag bits. More... | |
void | SetObjectId (undefined4 p_objectid) |
[AI] Sets the object id for this chunk (links chunk data to logical entity, resource, or action). More... | |
void | SetTime (MxLong p_time) |
[AI] Sets the time (timestamp/tick/frame) associated with this chunk. More... | |
void | SetLength (MxU32 p_length) |
[AI] Sets the payload data length for this chunk. More... | |
void | SetData (MxU8 *p_data) |
[AI] Sets the pointer to the raw payload data (may or may not be owned by chunk object). More... | |
MxU16 | GetChunkFlags () |
[AI] Returns the chunk's flag bitfield. [AI] More... | |
undefined4 | GetObjectId () |
[AI] Returns the object id of this chunk. [AI] More... | |
MxLong | GetTime () |
[AI] Returns the time (timestamp or tick) associated with this chunk. [AI] More... | |
MxU32 | GetLength () |
[AI] Returns the length in bytes of the data payload. [AI] More... | |
MxU8 * | GetData () |
[AI] Returns a pointer to the start of the data payload. [AI] More... | |
void | Release () |
[AI] Releases (deletes) data payload if present, regardless of flags; call to explicitly free memory and avoid leaks, especially when chunk objects are reused. [AI] More... | |
![]() | |
MxCore () | |
[AI] Constructs a new MxCore object and assigns it a unique id. More... | |
virtual | ~MxCore () |
[AI] Virtual destructor. Required for correct polymorphic cleanup in derived classes. More... | |
virtual MxLong | Notify (MxParam &p_param) |
[AI] Virtual callback notification mechanism. More... | |
virtual MxResult | Tickle () |
[AI] Called by tickle managers to allow the object to update itself. More... | |
virtual const char * | ClassName () const |
[AI] Returns the runtime class name of this object. More... | |
virtual MxBool | IsA (const char *p_name) const |
[AI] Checks whether this object's class type or parents match the given name. More... | |
MxU32 | GetId () |
[AI] Gets the unique (per-process) id assigned to this object instance. More... | |
Static Public Member Functions | |
static MxU32 | GetHeaderSize () |
[AI] Returns the fixed size of the chunk header, typically used for parsing binary streams. More... | |
static MxU32 | Size (MxU8 *p_buffer) |
[AI] Returns the total size (header + data) of a chunk from a raw buffer pointer. More... | |
static MxU8 * | End (MxU8 *p_buffer) |
[AI] Returns a pointer to the end of this chunk for sequential iteration through a chunked buffer. More... | |
Protected Attributes | |
MxU16 | m_flags |
[AI] Flag bitfield indicating properties/status of the chunk. See DS_CHUNK_* defines. [AI] More... | |
MxU32 | m_objectId |
[AI] Logical id field linking chunk to a resource, action, or entity. [AI] More... | |
MxLong | m_time |
[AI] Timestamp (tick/frame) value for the chunk. Used for ordering, sequencing, and synchronization. [AI] More... | |
MxU32 | m_length |
[AI] Number of bytes of data in this chunk's payload. [AI] More... | |
MxU8 * | m_data |
[AI] Pointer to chunk's raw data buffer. Ownership is determined by DS_CHUNK_BIT1 flag and usage context. [AI] More... | |
[AI] Represents a chunk of data extracted from a stream (typically from a Mindscape/Mx SI file or streaming media resource).
[AI]
[AI] This class encapsulates a block of raw data together with metadata such as its object id, timestamp, length, and flags. Chunks are used as the standard means of interoperation between the file/disk/ram streaming layer and the other subsystems, including media presentation and game object instantiation. [AI]
DS "chunks" are a core primitive for all streamed or serialized data in the LEGO Island engine. [AI]
Definition at line 38 of file mxdschunk.h.
MxDSChunk::MxDSChunk | ( | ) |
[AI] Constructs a new, empty chunk. All members initialized to safe defaults. [AI]
Definition at line 7 of file mxdschunk.cpp.
|
override |
[AI] Virtual destructor. Cleans up any owned chunk data if flagged by DS_CHUNK_BIT1. [AI]
Definition at line 18 of file mxdschunk.cpp.
|
inlineoverridevirtual |
[AI] Returns the class name ("MxDSChunk") for runtime type identification. [AI]
Reimplemented from MxCore.
Reimplemented in MxStreamChunk.
Definition at line 47 of file mxdschunk.h.
[AI] Returns a pointer to the end of this chunk for sequential iteration through a chunked buffer.
[AI]
p_buffer | Pointer to the start of the chunk. [AI] |
Definition at line 73 of file mxdschunk.h.
|
inline |
[AI] Returns the chunk's flag bitfield. [AI]
Definition at line 96 of file mxdschunk.h.
|
inline |
[AI] Returns a pointer to the start of the data payload. [AI]
Definition at line 108 of file mxdschunk.h.
|
static |
[AI] Returns the fixed size of the chunk header, typically used for parsing binary streams.
[AI]
Definition at line 27 of file mxdschunk.cpp.
|
inline |
[AI] Returns the length in bytes of the data payload. [AI]
Definition at line 105 of file mxdschunk.h.
|
inline |
[AI] Returns the object id of this chunk. [AI]
Definition at line 99 of file mxdschunk.h.
|
inline |
[AI] Returns the time (timestamp or tick) associated with this chunk. [AI]
Definition at line 102 of file mxdschunk.h.
|
inlineoverridevirtual |
[AI] Checks if this object or any parent class matches the provided class name string.
[AI]
p_name | Name of the class to compare to. [AI] |
Reimplemented from MxCore.
Reimplemented in MxStreamChunk.
Definition at line 56 of file mxdschunk.h.
|
inline |
[AI] Releases (deletes) data payload if present, regardless of flags; call to explicitly free memory and avoid leaks, especially when chunk objects are reused. [AI]
Definition at line 111 of file mxdschunk.h.
|
inline |
[AI] Sets all chunk header flag bits.
[AI]
p_flags | New flags (see DS_CHUNK_* defines above). [AI] |
Definition at line 77 of file mxdschunk.h.
|
inline |
[AI] Sets the pointer to the raw payload data (may or may not be owned by chunk object).
[AI]
p_data | Data pointer. If DS_CHUNK_BIT1 is set in flags, this pointer is owned and deleted by this object. [AI] |
Definition at line 93 of file mxdschunk.h.
|
inline |
[AI] Sets the payload data length for this chunk.
[AI]
p_length | Length in bytes of the chunk data. [AI] |
Definition at line 89 of file mxdschunk.h.
|
inline |
[AI] Sets the object id for this chunk (links chunk data to logical entity, resource, or action).
[AI]
p_objectid | New object id for the chunk. [AI] |
Definition at line 81 of file mxdschunk.h.
|
inline |
[AI] Sets the time (timestamp/tick/frame) associated with this chunk.
[AI]
p_time | Relative or absolute time value for this chunk. [AI] |
Definition at line 85 of file mxdschunk.h.
[AI] Returns the total size (header + data) of a chunk from a raw buffer pointer.
Used when parsing binary memory blocks. [AI]
p_buffer | Pointer to the start of the chunk buffer. [AI] |
Definition at line 68 of file mxdschunk.h.
|
protected |
[AI] Pointer to chunk's raw data buffer. Ownership is determined by DS_CHUNK_BIT1 flag and usage context. [AI]
Definition at line 127 of file mxdschunk.h.
|
protected |
[AI] Flag bitfield indicating properties/status of the chunk. See DS_CHUNK_* defines. [AI]
Definition at line 123 of file mxdschunk.h.
|
protected |
[AI] Number of bytes of data in this chunk's payload. [AI]
Definition at line 126 of file mxdschunk.h.
|
protected |
[AI] Logical id field linking chunk to a resource, action, or entity. [AI]
Definition at line 124 of file mxdschunk.h.
|
protected |
[AI] Timestamp (tick/frame) value for the chunk. Used for ordering, sequencing, and synchronization. [AI]
Definition at line 125 of file mxdschunk.h.