The loader interface.
More...
#include <murl_i_loader.h>
The loader interface.
The loader is a thread which provides functionality for loading and unloading resource packages parallel to the engine's logic and rendering processing.
The IEngineConfiguration::SetResourceFileCategory() setting specifies the working directory for the loader.
The ILoader object is provided by the IAppState and the Logic::IState object.
Inherited by Murl::Core::Loader.
|
virtual Bool | AddProcessor (Logic::IProcessorPtr processor)=0 |
| Add a logic processor without a package. More...
|
|
virtual Bool | RemoveProcessor (Logic::IProcessorPtr processor)=0 |
| Remove a logic processor added by AddProcessor(). More...
|
|
virtual IPackage * | AddPackage (const String &packageName, LoadMode mode)=0 |
| Create and register a package by name. More...
|
|
virtual IPackage * | AddPackage (const String &packageName, LoadMode mode, Logic::IProcessorPtr processor)=0 |
| Create and register a package by name and a corresponding logic processor. More...
|
|
virtual IPackage * | AddPackage (const String &packageName, IEnums::FileCategory category, LoadMode mode)=0 |
| Create and register a package by name and category. More...
|
|
virtual IPackage * | AddPackage (const String &packageName, IEnums::FileCategory category, LoadMode mode, Logic::IProcessorPtr processor)=0 |
| Create and register a package by name, category and a corresponding logic processor. More...
|
|
virtual Bool | RemovePackage (const String &packageName)=0 |
| Remove a registered package by name. More...
|
|
virtual IPackage * | GetPackage (const String &packageName) const =0 |
| Get a registered package of a specified package name. More...
|
|
virtual IPackage * | GetPackage (Logic::IProcessorPtr processor) const =0 |
| Get a registered package connected to a given processor. More...
|
|
virtual Bool | QueryPackage (const String &packageName, String *id, UInt32 *revision, Bool *isDataValid, Bool *isVersionValid, Bool *isChecksumValid) const =0 |
| Query a registered package. More...
|
|
virtual Bool | LoadPackage (const String &packageName) const =0 |
| Load a registered package. More...
|
|
virtual Bool | UnloadPackage (const String &packageName) const =0 |
| Load a registered package. More...
|
|
◆ LoadMode
Definition of the load operation modes.
Enumerator |
---|
LOAD_MODE_STARTUP | Load the package before engine startup.
|
LOAD_MODE_BACKGROUND | Load the package immediately in background.
|
LOAD_MODE_ON_DEMAND | Load the package on demand using the IPackage.
|
◆ AddProcessor()
Add a logic processor without a package.
Logic processors without a package can be added before startup only.
- Parameters
-
processor | The logic processor to add. |
- Returns
- true if successful.
◆ RemoveProcessor()
Remove a logic processor added by AddProcessor().
- Parameters
-
processor | The logic processor to remove. |
- Returns
- true if successful.
◆ AddPackage() [1/4]
Create and register a package by name.
- Parameters
-
packageName | The name of the package. |
mode | The load mode. |
- Returns
- The package object or null if creating the package failed.
◆ AddPackage() [2/4]
Create and register a package by name and a corresponding logic processor.
- Parameters
-
packageName | The name of the package. |
mode | The load mode. |
processor | The corresponding logic processor. |
- Returns
- The package object or null if creating the package failed.
◆ AddPackage() [3/4]
Create and register a package by name and category.
- Parameters
-
packageName | The name of the package. |
category | The file category. |
mode | The load mode. |
- Returns
- The package object or null if creating the package failed.
◆ AddPackage() [4/4]
Create and register a package by name, category and a corresponding logic processor.
- Parameters
-
packageName | The name of the package. |
category | The file category. |
mode | The load mode. |
processor | The corresponding logic processor. |
- Returns
- The package object or null if creating the package failed.
◆ RemovePackage()
virtual Bool Murl::ILoader::RemovePackage |
( |
const String & |
packageName | ) |
|
|
pure virtual |
Remove a registered package by name.
A package can be removed only if package is unloaded.
- Parameters
-
packageName | The name of the package to remove. |
- Returns
- true if successful.
◆ GetPackage() [1/2]
virtual IPackage* Murl::ILoader::GetPackage |
( |
const String & |
packageName | ) |
const |
|
pure virtual |
Get a registered package of a specified package name.
- Parameters
-
packageName | The name of the package. |
- Returns
- The package object or null if the package name is not registered.
◆ GetPackage() [2/2]
Get a registered package connected to a given processor.
- Parameters
-
processor | The processor to query. |
- Returns
- The package object or null if no package is connected to the processor.
◆ QueryPackage()
virtual Bool Murl::ILoader::QueryPackage |
( |
const String & |
packageName, |
|
|
String * |
id, |
|
|
UInt32 * |
revision, |
|
|
Bool * |
isDataValid, |
|
|
Bool * |
isVersionValid, |
|
|
Bool * |
isChecksumValid |
|
) |
| const |
|
pure virtual |
Query a registered package.
This method takes a number of pointers to individual variables that receive the results of the query. It is allowed to pass null pointers to any of these variables in case the specific item is not of interest.
- Parameters
-
packageName | The name of the package. |
id | A pointer to a String object receiving the internal package ID. |
revision | A pointer to a UInt32 variable receiving the package revision. |
isDataValid | A pointer to a Bool variable receiving the general validity of the package data. |
isVersionValid | A pointer to a Bool variable receiving the result of the file format version check. |
isChecksumValid | A pointer to a Bool variable receiving the result of the CRC32 checksum validation. |
- Returns
- true if the package was recognized by any of the available loader modules. If no loader module can handle the data stream, false is returned.
◆ LoadPackage()
virtual Bool Murl::ILoader::LoadPackage |
( |
const String & |
packageName | ) |
const |
|
pure virtual |
Load a registered package.
- Parameters
-
packageName | The name of the package. |
- Returns
- The result of IPackage::Load() or false if the package name is not registered.
◆ UnloadPackage()
virtual Bool Murl::ILoader::UnloadPackage |
( |
const String & |
packageName | ) |
const |
|
pure virtual |
Load a registered package.
- Parameters
-
packageName | The name of the package. |
- Returns
- The result of IPackage::Unload() or false if the package name is not registered.
The documentation for this interface was generated from the following file: