[AI] Base virtual class for all Mindscape engine (Mx) objects.
virtual MxBool IsA(const char *p_name) const
[AI] Checks whether this object's class type or parents match the given name.
[AI] Buffer for managing streamed DS (Data Stream) chunks and actions.
MxU8 * GetBuffer()
[AI] Returns a pointer to the managed chunk data buffer.
MxU32 GetWriteOffset()
[AI] Returns the current buffer write offset (number of bytes with valid data).
[AI] Abstract base class representing a source of streamable data, providing an interface for reading...
virtual MxULong GetBufferSize()=0
[AI] Returns the total buffer size in bytes (implementation-dependent).
virtual MxLong Open(MxULong p_param)=0
[AI] Opens the source (e.g., a file, memory buffer, etc).
virtual MxLong Close()=0
[AI] Closes the source and releases any resources held.
~MxDSSource() override
[AI] Virtual destructor, frees internal buffer if allocated.
virtual MxU32 * GetBuffer()
[AI] Returns a pointer to the internal buffer as a DWORD (32-bit) pointer.
MxLong GetPosition() const
[AI] Returns the current per-source seek/read/write position.
virtual MxULong GetStreamBuffersNum()=0
[AI] Returns the number of buffers the stream is internally segmented into (for multi-buffered stream...
virtual MxLong Seek(MxLong p_offset, MxS32 p_origin)=0
[AI] Seek to a specific position in the source, relative to the start, current, or end.
MxLong m_position
[AI] Current seek/read/write position in the source. -1 if uninitialized, otherwise logical/physical ...
MxU32 * m_pBuffer
[AI] Pointer to allocated buffer, or NULL if uninitialized. Contains the raw read/streamed data.
virtual MxLong GetLengthInDWords()
[AI] Gets the length of the data in DWORDs (32-bit units).
MxBool IsA(const char *p_name) const override
[AI] Runtime type information check.
MxULong m_lengthInDWords
[AI] Length of valid data in the stream, in DWORDs (32-bit units). Used for sizing and range checking...
MxDSSource()
[AI] Constructor, initializes buffer pointer to NULL, position to -1 and lengthInDWords to 0.
virtual MxResult Read(unsigned char *p_dest, MxULong p_count)=0
[AI] Read a specified number of bytes into user-supplied buffer, starting at the current position.
const char * ClassName() const override
[AI] Returns the class name string ("MxDSSource").
virtual MxResult ReadToBuffer(MxDSBuffer *p_buffer)
[AI] Reads from this source into a provided MxDSBuffer up to the buffer's current write offset.
#define NULL
[AI] Null pointer value (C/C++ semantics).