Murl::IPackage Interface Referenceabstract

The package interface. More...

#include "murl_i_package.h"

Inherited by Murl::Core::Package.

Public Member Functions

virtual const StringGetName () 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::IPackageGetResourcePackage () 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.

The IPackage object can be created by the ILoader object.

Member Function Documentation

◆ GetName()

virtual const String& Murl::IPackage::GetName ( ) const
pure virtual

Get the name of the package.

Returns
The name of the package.

◆ GetLoadMode()

virtual ILoader::LoadMode Murl::IPackage::GetLoadMode ( ) const
pure virtual

Get the package's load mode.

Returns
The load mode.

◆ GetFileCategory()

virtual IEnums::FileCategory Murl::IPackage::GetFileCategory ( ) const
pure virtual

Get the package's file category.

Returns
The file category.

◆ GetResourcePackage()

virtual const Resource::IPackage* Murl::IPackage::GetResourcePackage ( ) const
pure virtual

Get the resource package contained in the package.

Returns
The resource package.

◆ GetLogicProcessor()

virtual Logic::IProcessorPtr Murl::IPackage::GetLogicProcessor ( ) const
pure virtual

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

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

◆ HasLogicProcessor()

virtual Bool Murl::IPackage::HasLogicProcessor ( Logic::IProcessorPtr  logicProcessor) const
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
logicProcessorThe logic processor to check.
Returns
true if the logic processor is assigned to the package.

◆ AddGraphInstance()

virtual Bool Murl::IPackage::AddGraphInstance ( const String graphResourceId,
const String parentNodeId,
UInt32  numberOfReplications = 1 
)
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
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
true if successful.

◆ RemoveGraphInstance()

virtual Bool Murl::IPackage::RemoveGraphInstance ( const String graphResourceId,
const String parentNodeId 
)
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
graphResourceIdThe resource ID of the graph to remove from the creation list.
parentNodeIdThe ID of the parent node where to insert the graph.
Returns
true if successful.

◆ HideGraphInstance()

virtual Bool Murl::IPackage::HideGraphInstance ( const String graphResourceId,
const String parentNodeId 
)
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
graphResourceIdThe resource ID of the graph to prevent from being created.
parentNodeIdThe ID of the parent node where the graph would be inserted.
Returns
true if successful.

◆ UnhideGraphInstance()

virtual Bool Murl::IPackage::UnhideGraphInstance ( const String graphResourceId,
const String parentNodeId 
)
pure virtual

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

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

◆ AddScriptInstance()

virtual Bool Murl::IPackage::AddScriptInstance ( const String scriptResourceId,
UInt32  numberOfReplications = 1 
)
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
scriptResourceIdThe resource ID of the script to create.
numberOfReplicationsThe number of replications of the script to create.
Returns
true if successful.

◆ RemoveScriptInstance()

virtual Bool Murl::IPackage::RemoveScriptInstance ( const String scriptResourceId)
pure virtual

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
scriptResourceIdThe resource ID of the script to remove from the creation list.
Returns
true if successful.

◆ HideScriptInstance()

virtual Bool Murl::IPackage::HideScriptInstance ( const String scriptResourceId)
pure virtual

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
scriptResourceIdThe resource ID of the script to prevent from being created.
Returns
true if successful.

◆ UnhideScriptInstance()

virtual Bool Murl::IPackage::UnhideScriptInstance ( const String scriptResourceId)
pure virtual

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

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

◆ Query()

virtual Bool Murl::IPackage::Query ( String id,
UInt32 revision,
Bool isDataValid,
Bool isVersionValid,
Bool isChecksumValid 
) const
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
idA pointer to a String object receiving the internal package ID.
revisionA pointer to a UInt32 variable receiving the package revision.
isDataValidA pointer to a Bool variable receiving the general validity of the package data.
isVersionValidA pointer to a Bool variable receiving the result of the file format version check.
isChecksumValidA 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()

virtual Bool Murl::IPackage::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()

virtual Bool Murl::IPackage::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()

virtual Bool Murl::IPackage::EnqueueForLoading ( )
pure virtual

Enqueue the package for loading.

Returns
true if successful.

◆ EnqueueForUnloading()

virtual Bool Murl::IPackage::EnqueueForUnloading ( )
pure virtual

Enqueue the package for unloading.

Returns
true if successful.

◆ CancelLoading()

virtual Bool Murl::IPackage::CancelLoading ( )
pure virtual

Cancel loading the package.

Returns
true if successful.

◆ CancelUnloading()

virtual Bool Murl::IPackage::CancelUnloading ( )
pure virtual

Cancel unloading the package.

Returns
true if successful.

◆ IsBusy()

virtual Bool Murl::IPackage::IsBusy ( ) const
pure virtual

Check if the package is busy.

A package is busy during loading or unloading.

Returns
true if the package is busy.

◆ IsBusyLoading()

virtual Bool Murl::IPackage::IsBusyLoading ( ) const
pure virtual

Check if the package is busy by loading.

Returns
true if the package is loading.

◆ IsBusyUnloading()

virtual Bool Murl::IPackage::IsBusyUnloading ( ) const
pure virtual

Check if the package is busy by unloading.

Returns
true if the package is unloading.

◆ IsLoaded()

virtual Bool Murl::IPackage::IsLoaded ( ) const
pure virtual

Check if the package is loaded.

Returns
true if the package is loaded.

◆ IsUnloaded()

virtual Bool Murl::IPackage::IsUnloaded ( ) const
pure virtual

Check if the package is unloaded.

Returns
true if the package is unloaded.

◆ HasFailedLoading()

virtual Bool Murl::IPackage::HasFailedLoading ( ) const
pure virtual

Check if the package failed to load.

Returns
true if the package failed to load.

◆ HasFailedUnloading()

virtual Bool Murl::IPackage::HasFailedUnloading ( ) const
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


Copyright © 2011-2024 Spraylight GmbH.