Isle
Loading...
Searching...
No Matches
MxStreamProvider Class Referenceabstract

[AI] Abstract base class for stream resource providers in the LEGO Island engine. More...

#include <mxstreamprovider.h>

Inheritance diagram for MxStreamProvider:
Collaboration diagram for MxStreamProvider:

Public Member Functions

 MxStreamProvider ()
 [AI] Default constructor. Initializes stream provider with no lookup or file resource attached. [AI] More...
 
const char * ClassName () const override
 [AI] Returns the name identifier for this class. More...
 
MxBool IsA (const char *p_name) const override
 [AI] Checks if this object is of the requested class name, or a subclass thereof. More...
 
virtual MxResult SetResourceToGet (MxStreamController *p_pLookup)
 [AI] Attaches a stream controller as the resource to provide data for. More...
 
virtual MxU32 GetFileSize ()=0
 [AI] Gets the file size, in bytes, of the underlying SI file resource. More...
 
virtual MxS32 GetStreamBuffersNum ()=0
 [AI] Returns the number of stream buffers internally maintained for this resource. More...
 
virtual void VTable0x20 (MxDSAction *p_action)
 [AI] Virtual hook for subclasses to react to new stream actions being queued. More...
 
virtual MxU32 GetLengthInDWords ()=0
 [AI] Gets the full buffer length, interpreted as a DWORD-count, for direct buffer streaming. More...
 
virtual MxU32GetBufferForDWords ()=0
 [AI] Returns a pointer to the underlying buffer, cast as an array of DWORDs, for streaming purposes. More...
 
- Public Member Functions inherited from MxCore
 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...
 

Protected Attributes

MxStreamControllerm_pLookup
 [AI] The stream controller using this provider as its data source. [AI] More...
 
MxDSFilem_pFile
 [AI] Pointer to the loaded SI file associated with this provider. [AI] More...
 

Detailed Description

[AI] Abstract base class for stream resource providers in the LEGO Island engine.

[AI] MxStreamProvider is responsible for interfacing with various data sources, such as RAM or disk, and providing access to the underlying SI file data and its buffered form to MxStreamController. It provides abstract methods for querying the source file size, number of buffers used for streaming, and buffer access for streaming whole DWORDs. Derived classes implement specifics for RAM or disk-backed streams. [AI]

See also
MxRAMStreamProvider, MxDiskStreamProvider [AI]
Note
[AI] Implements run-time class identification via ClassName/IsA, allowing dynamic queries of its type. [AI]

Definition at line 16 of file mxstreamprovider.h.

Constructor & Destructor Documentation

◆ MxStreamProvider()

MxStreamProvider::MxStreamProvider ( )
inline

[AI] Default constructor. Initializes stream provider with no lookup or file resource attached. [AI]

Definition at line 19 of file mxstreamprovider.h.

Member Function Documentation

◆ ClassName()

const char * MxStreamProvider::ClassName ( ) const
inlineoverridevirtual

[AI] Returns the name identifier for this class.

[AI]

Returns
[AI] Static string "MxStreamProvider".

Reimplemented from MxCore.

Definition at line 23 of file mxstreamprovider.h.

◆ GetBufferForDWords()

virtual MxU32 * MxStreamProvider::GetBufferForDWords ( )
pure virtual

[AI] Returns a pointer to the underlying buffer, cast as an array of DWORDs, for streaming purposes.

[AI]

Returns
[AI] Pointer to a DWORD-aligned buffer. [AI]

Implemented in MxDiskStreamProvider, and MxRAMStreamProvider.

◆ GetFileSize()

virtual MxU32 MxStreamProvider::GetFileSize ( )
pure virtual

[AI] Gets the file size, in bytes, of the underlying SI file resource.

[AI]

Returns
[AI] The file size in bytes. [AI]

Implemented in MxDiskStreamProvider, and MxRAMStreamProvider.

◆ GetLengthInDWords()

virtual MxU32 MxStreamProvider::GetLengthInDWords ( )
pure virtual

[AI] Gets the full buffer length, interpreted as a DWORD-count, for direct buffer streaming.

[AI]

Returns
[AI] The length in DWORDs. [AI]

Implemented in MxDiskStreamProvider, and MxRAMStreamProvider.

◆ GetStreamBuffersNum()

virtual MxS32 MxStreamProvider::GetStreamBuffersNum ( )
pure virtual

[AI] Returns the number of stream buffers internally maintained for this resource.

[AI]

Returns
[AI] The number of stream buffers. [AI]

Implemented in MxDiskStreamProvider, and MxRAMStreamProvider.

◆ IsA()

MxBool MxStreamProvider::IsA ( const char *  p_name) const
inlineoverridevirtual

[AI] Checks if this object is of the requested class name, or a subclass thereof.

[AI]

Parameters
p_nameName of the class to check inheritance against. [AI]
Returns
[AI] True if this object's class or one of its bases matches p_name.

Reimplemented from MxCore.

Definition at line 31 of file mxstreamprovider.h.

◆ SetResourceToGet()

virtual MxResult MxStreamProvider::SetResourceToGet ( MxStreamController p_pLookup)
inlinevirtual

[AI] Attaches a stream controller as the resource to provide data for.

[AI]

Parameters
p_pLookupStream controller requesting resource data. [AI]
Returns
[AI] Returns SUCCESS after assigning the controller. [AI]

Reimplemented in MxDiskStreamProvider, and MxRAMStreamProvider.

Definition at line 39 of file mxstreamprovider.h.

◆ VTable0x20()

virtual void MxStreamProvider::VTable0x20 ( MxDSAction p_action)
inlinevirtual

[AI] Virtual hook for subclasses to react to new stream actions being queued.

[AI]

[AI] Unused and empty in base. Derived implementations may use this for notification when new actions are dispatched. [AI]

Parameters
p_actionAction being processed. [AI]

Reimplemented in MxDiskStreamProvider.

Definition at line 56 of file mxstreamprovider.h.

Member Data Documentation

◆ m_pFile

MxDSFile* MxStreamProvider::m_pFile
protected

[AI] Pointer to the loaded SI file associated with this provider. [AI]

Definition at line 68 of file mxstreamprovider.h.

◆ m_pLookup

MxStreamController* MxStreamProvider::m_pLookup
protected

[AI] The stream controller using this provider as its data source. [AI]

Definition at line 67 of file mxstreamprovider.h.


The documentation for this class was generated from the following file: