Murl Engine Lua Addon API  Version 1.0 beta
Murl.IPackage

The package interface.

Packages operations are processed by a loader thread, the IPackage interface provides methods for controlling and monitoring the package processing.

The IPackage object can be created by the ILoader object.


Table members

Methods


GetName()

Get the name of the package.

String GetName()

Returns
String The name of the package.

GetLoadMode()

Get the package's load mode.

Murl.ILoader.LoadMode GetLoadMode()

Returns
Murl.ILoader.LoadMode The load mode.

GetFileCategory()

Get the package's file category.

Murl.IEnums.FileCategory GetFileCategory()

Returns
Murl.IEnums.FileCategory The file category.

GetResourcePackage()

Get the resource package contained in the package.

Murl.Resource.IPackage GetResourcePackage()

Returns
Murl.Resource.IPackage The resource package.

GetLogicProcessor()

Get the logic processor assigned to the package with ILoader::AddPackage().

Murl.SharedPointer.LogicIProcessor GetLogicProcessor()

Returns
Murl.SharedPointer.LogicIProcessor The logic processor, or null if none is assigned.

HasLogicProcessor(logicProcessor)

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.

Boolean HasLogicProcessor(Murl.SharedPointer.LogicIProcessor logicProcessor)

Parameters
logicProcessorThe logic processor to check.
Returns
Boolean true if the logic processor is assigned to the package.

AddGraphInstance(graphResourceId, parentNodeId, numberOfReplications)

Manually add a graph instance to create when the package is loaded. This only works for packages using ILoader::LOAD_MODE_ON_DEMAND.

Boolean AddGraphInstance(String graphResourceId, String parentNodeId, Integer numberOfReplications)

Parameters
graphResourceIdThe resource ID of the graph to create.
parentNodeIdThe ID of the parent node where to insert the graph.
numberOfReplicationsThe number of replications of the graph to create.
Returns
Boolean true if successful.

RemoveGraphInstance(graphResourceId, parentNodeId)

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.

Boolean RemoveGraphInstance(String graphResourceId, String parentNodeId)

Parameters
graphResourceIdThe resource ID of the graph to remove from the creation list.
parentNodeIdThe ID of the parent node where to insert the graph.
Returns
Boolean true if successful.

HideGraphInstance(graphResourceId, parentNodeId)

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.

Boolean HideGraphInstance(String graphResourceId, String parentNodeId)

Parameters
graphResourceIdThe resource ID of the graph to prevent from being created.
parentNodeIdThe ID of the parent node where the graph would be inserted.
Returns
Boolean true if successful.

UnhideGraphInstance(graphResourceId, parentNodeId)

Unhide a graph instance that was previously hidden via HideGraphInstance().

Boolean UnhideGraphInstance(String graphResourceId, String parentNodeId)

Parameters
graphResourceIdThe resource ID of the graph to unhide.
parentNodeIdThe ID of the parent node where the graph gets inserted.
Returns
Boolean true if successful.

AddScriptInstance(scriptResourceId, numberOfReplications)

Manually add a script instance to create when the package is loaded. This only works for packages using ILoader::LOAD_MODE_ON_DEMAND.

Boolean AddScriptInstance(String scriptResourceId, Integer numberOfReplications)

Parameters
scriptResourceIdThe resource ID of the script to create.
numberOfReplicationsThe number of replications of the script to create.
Returns
Boolean true if successful.

RemoveScriptInstance(scriptResourceId)

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.

Boolean RemoveScriptInstance(String scriptResourceId)

Parameters
scriptResourceIdThe resource ID of the script to remove from the creation list.
Returns
Boolean true if successful.

HideScriptInstance(scriptResourceId)

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.

Boolean HideScriptInstance(String scriptResourceId)

Parameters
scriptResourceIdThe resource ID of the script to prevent from being created.
Returns
Boolean true if successful.

UnhideScriptInstance(scriptResourceId)

Unhide a script instance that was previously hidden via HideScriptInstance().

Boolean UnhideScriptInstance(String scriptResourceId)

Parameters
scriptResourceIdThe resource ID of the script to unhide.
Returns
Boolean true if successful.

Load()

Start loading the package. Calls EnqueueForLoading() if the package is unloaded and not busy loading. Calls CancelUnloading() if the package is busy unloading.

Boolean Load()

Returns
Boolean true if the package is loaded, false if the package is busy.

Unload()

Start unloading the package. Calls EnqueueForUnloading() if the package is loaded and not busy unloading. Calls CancelLoading() if the package is busy unloading.

Boolean Unload()

Returns
Boolean true if the package is unloaded, false if the package is busy.

EnqueueForLoading()

Enqueue the package for loading.

Boolean EnqueueForLoading()

Returns
Boolean true if successful.

EnqueueForUnloading()

Enqueue the package for unloading.

Boolean EnqueueForUnloading()

Returns
Boolean true if successful.

CancelLoading()

Cancel loading the package.

Boolean CancelLoading()

Returns
Boolean true if successful.

CancelUnloading()

Cancel unloading the package.

Boolean CancelUnloading()

Returns
Boolean true if successful.

IsBusy()

Check if the package is busy. A package is busy during loading or unloading.

Boolean IsBusy()

Returns
Boolean true if the package is busy.

IsBusyLoading()

Check if the package is busy by loading.

Boolean IsBusyLoading()

Returns
Boolean true if the package is loading.

IsBusyUnloading()

Check if the package is busy by unloading.

Boolean IsBusyUnloading()

Returns
Boolean true if the package is unloading.

IsLoaded()

Check if the package is loaded.

Boolean IsLoaded()

Returns
Boolean true if the package is loaded.

IsUnloaded()

Check if the package is unloaded.

Boolean IsUnloaded()

Returns
Boolean true if the package is unloaded.

HasFailedLoading()

Check if the package failed to load.

Boolean HasFailedLoading()

Returns
Boolean true if the package failed to load.

HasFailedUnloading()

Check if the package failed to unload.

Boolean HasFailedUnloading()

Returns
Boolean true if the package failed to unload.