The package interface. More...
#include "murl_i_package.h"
Inherited by Murl::Core::Package.
Public Member Functions | |
virtual const String & | GetName () const =0 |
Get the name of the package. More... | |
virtual ILoader::LoadMode | GetLoadMode () const =0 |
Get the package's load mode. More... | |
virtual IEnums::FileCategory | GetFileCategory () const =0 |
Get the package's file category. More... | |
virtual const Resource::IPackage * | GetResourcePackage () const =0 |
Get the resource package contained in the package. More... | |
virtual Logic::IProcessorPtr | GetLogicProcessor () const =0 |
Get the logic processor assigned to the package with ILoader::AddPackage(). More... | |
virtual Bool | HasLogicProcessor (Logic::IProcessorPtr logicProcessor) const =0 |
Check if a logic processor is assigned to the package. More... | |
virtual Bool | AddGraphInstance (const String &graphResourceId, const String &parentNodeId, UInt32 numberOfReplications=1)=0 |
Manually add a graph instance to create when the package is loaded. More... | |
virtual Bool | RemoveGraphInstance (const String &graphResourceId, const String &parentNodeId)=0 |
Remove a manually added graph instance. More... | |
virtual Bool | HideGraphInstance (const String &graphResourceId, const String &parentNodeId)=0 |
Manually remove a graph instance from the creation list, i.e. More... | |
virtual Bool | UnhideGraphInstance (const String &graphResourceId, const String &parentNodeId)=0 |
Unhide a graph instance that was previously hidden via HideGraphInstance(). More... | |
virtual Bool | AddScriptInstance (const String &scriptResourceId, UInt32 numberOfReplications=1)=0 |
Manually add a script instance to create when the package is loaded. More... | |
virtual Bool | RemoveScriptInstance (const String &scriptResourceId)=0 |
Remove a manually added script instance. More... | |
virtual Bool | HideScriptInstance (const String &scriptResourceId)=0 |
Manually remove a script instance from the creation list, i.e. More... | |
virtual Bool | UnhideScriptInstance (const String &scriptResourceId)=0 |
Unhide a script instance that was previously hidden via HideScriptInstance(). More... | |
virtual Bool | Query (String *id, UInt32 *revision, Bool *isDataValid, Bool *isVersionValid, Bool *isChecksumValid) const =0 |
Query the package. More... | |
virtual Bool | Load ()=0 |
Start loading the package. More... | |
virtual Bool | Unload ()=0 |
Start unloading the package. More... | |
virtual Bool | EnqueueForLoading ()=0 |
Enqueue the package for loading. More... | |
virtual Bool | EnqueueForUnloading ()=0 |
Enqueue the package for unloading. More... | |
virtual Bool | CancelLoading ()=0 |
Cancel loading the package. More... | |
virtual Bool | CancelUnloading ()=0 |
Cancel unloading the package. More... | |
virtual Bool | IsBusy () const =0 |
Check if the package is busy. More... | |
virtual Bool | IsBusyLoading () const =0 |
Check if the package is busy by loading. More... | |
virtual Bool | IsBusyUnloading () const =0 |
Check if the package is busy by unloading. More... | |
virtual Bool | IsLoaded () const =0 |
Check if the package is loaded. More... | |
virtual Bool | IsUnloaded () const =0 |
Check if the package is unloaded. More... | |
virtual Bool | HasFailedLoading () const =0 |
Check if the package failed to load. More... | |
virtual Bool | HasFailedUnloading () const =0 |
Check if the package failed to unload. More... | |
Detailed Description
The package interface.
Packages operations are processed by a loader thread, the IPackage interface provides methods for controlling and monitoring the package processing.
Member Function Documentation
◆ GetName()
|
pure virtual |
Get the name of the package.
- Returns
- The name of the package.
◆ GetLoadMode()
|
pure virtual |
Get the package's load mode.
- Returns
- The load mode.
◆ GetFileCategory()
|
pure virtual |
Get the package's file category.
- Returns
- The file category.
◆ GetResourcePackage()
|
pure virtual |
Get the resource package contained in the package.
- Returns
- The resource package.
◆ GetLogicProcessor()
|
pure virtual |
Get the logic processor assigned to the package with ILoader::AddPackage().
- Returns
- The logic processor, or null if none is assigned.
◆ HasLogicProcessor()
|
pure virtual |
Check if a logic processor is assigned to the package.
This method checks the processor assigned with ILoader::AddPackage() and all processors added by script resources.
- Parameters
-
logicProcessor The logic processor to check.
- Returns
- true if the logic processor is assigned to the package.
◆ AddGraphInstance()
|
pure virtual |
Manually add a graph instance to create when the package is loaded.
This only works for packages using ILoader::LOAD_MODE_ON_DEMAND.
- Parameters
-
graphResourceId The resource ID of the graph to create. parentNodeId The ID of the parent node where to insert the graph. numberOfReplications The number of replications of the graph to create.
- Returns
- true if successful.
◆ RemoveGraphInstance()
|
pure virtual |
Remove a manually added graph instance.
This method is used to remove a graph instance to be created that was previously added via AddGraphInstance(). If it is desired to disable the creation of a graph instance that is statically present in the package, use HideGraphInstance() instead.
- Parameters
-
graphResourceId The resource ID of the graph to remove from the creation list. parentNodeId The ID of the parent node where to insert the graph.
- Returns
- true if successful.
◆ HideGraphInstance()
|
pure virtual |
Manually remove a graph instance from the creation list, i.e.
hide the instance. This only works for packages using ILoader::LOAD_MODE_ON_DEMAND.
- Parameters
-
graphResourceId The resource ID of the graph to prevent from being created. parentNodeId The ID of the parent node where the graph would be inserted.
- Returns
- true if successful.
◆ UnhideGraphInstance()
|
pure virtual |
Unhide a graph instance that was previously hidden via HideGraphInstance().
- Parameters
-
graphResourceId The resource ID of the graph to unhide. parentNodeId The ID of the parent node where the graph gets inserted.
- Returns
- true if successful.
◆ AddScriptInstance()
|
pure virtual |
Manually add a script instance to create when the package is loaded.
This only works for packages using ILoader::LOAD_MODE_ON_DEMAND.
- Parameters
-
scriptResourceId The resource ID of the script to create. numberOfReplications The number of replications of the script to create.
- Returns
- true if successful.
◆ RemoveScriptInstance()
Remove a manually added script instance.
This method is used to remove a script instance to be created that was previously added via AddScriptInstance(). If it is desired to disable the creation of a script instance that is statically present in the package, use HideScriptInstance() instead.
- Parameters
-
scriptResourceId The resource ID of the script to remove from the creation list.
- Returns
- true if successful.
◆ HideScriptInstance()
Manually remove a script instance from the creation list, i.e.
hide the instance. This only works for packages using ILoader::LOAD_MODE_ON_DEMAND.
- Parameters
-
scriptResourceId The resource ID of the script to prevent from being created.
- Returns
- true if successful.
◆ UnhideScriptInstance()
Unhide a script instance that was previously hidden via HideScriptInstance().
- Parameters
-
scriptResourceId The resource ID of the script to unhide.
- Returns
- true if successful.
◆ Query()
|
pure virtual |
Query the 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
-
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.
◆ Load()
|
pure virtual |
Start loading the package.
Calls EnqueueForLoading() if the package is unloaded and not busy loading. Calls CancelUnloading() if the package is busy unloading.
- Returns
- true if the package is loaded, false if the package is busy.
◆ Unload()
|
pure virtual |
Start unloading the package.
Calls EnqueueForUnloading() if the package is loaded and not busy unloading. Calls CancelLoading() if the package is busy unloading.
- Returns
- true if the package is unloaded, false if the package is busy.
◆ EnqueueForLoading()
|
pure virtual |
Enqueue the package for loading.
- Returns
- true if successful.
◆ EnqueueForUnloading()
|
pure virtual |
Enqueue the package for unloading.
- Returns
- true if successful.
◆ CancelLoading()
|
pure virtual |
Cancel loading the package.
- Returns
- true if successful.
◆ CancelUnloading()
|
pure virtual |
Cancel unloading the package.
- Returns
- true if successful.
◆ IsBusy()
|
pure virtual |
Check if the package is busy.
A package is busy during loading or unloading.
- Returns
- true if the package is busy.
◆ IsBusyLoading()
|
pure virtual |
Check if the package is busy by loading.
- Returns
- true if the package is loading.
◆ IsBusyUnloading()
|
pure virtual |
Check if the package is busy by unloading.
- Returns
- true if the package is unloading.
◆ IsLoaded()
|
pure virtual |
Check if the package is loaded.
- Returns
- true if the package is loaded.
◆ IsUnloaded()
|
pure virtual |
Check if the package is unloaded.
- Returns
- true if the package is unloaded.
◆ HasFailedLoading()
|
pure virtual |
Check if the package failed to load.
- Returns
- true if the package failed to load.
◆ HasFailedUnloading()
|
pure virtual |
Check if the package failed to unload.
- Returns
- true if the package failed to unload.
The documentation for this interface was generated from the following file:
- murl_i_package.h