Murl Engine Lua Addon API  Version 1.0 beta
Murl.Resource.IPackage

The IPackage resource interface.


Table members

Methods


GetPackageInterface()

Get the constant IPackage interface.

Murl.Resource.IPackage GetPackageInterface()

Returns
Murl.Resource.IPackage The IPackage interface.

Init()

Initialize this package.

Boolean Init()

Returns
Boolean true if successful.

DeInit()

De-initialize this package.

Boolean DeInit()

Returns
Boolean true if successful.

CreateBinary(data, checkConfig, makeDefault, allowReferences)

Create a binary representation from the package.

Boolean, Murl.Data CreateBinary(Murl.Data data, Boolean checkConfig, Boolean makeDefault, Boolean allowReferences)

Parameters
dataA reference to a Data object receiving the binary.
checkConfigIf true, the current IAppConfiguration object (and its contained IEngineConfiguration and IPlatformConfiguration objects) are checked for valid configuration options to include in the actual binary. If false, all present objects are included, for all configuration specified in the package.
makeDefaultOnly considered if checkConfig is true. If makeDefault is also true, only the first object of a set of conditional resources (i.e. resource objects with the same ID) matching a valid configuration is packed into the output binary, and all other ones in this set are left out. If false, all objects with matching configuration tags are included.
allowReferencesIf true, resource objects with identical binary representations are included only once in the package and referenced multiple times. If false, all objects are packaged regardless of duplication.
Returns
Boolean true if successful.
Murl.Data data A reference to a Data object receiving the binary.

GetId()

Get the package ID.

String GetId()

Returns
String The package ID.

GetRevision()

Get the user-defined package revision.

Integer GetRevision()

Returns
Integer The package revision.

GetPackageType()

Get the package's actual type.

Murl.IEnums.PackageType GetPackageType()

Returns
Murl.IEnums.PackageType The package type.

GetFileType()

Get the type of file this resource package was constructed from.

Murl.IEnums.FileType GetFileType()

Returns
Murl.IEnums.FileType The file type.

GetFileCategory()

Get the optional file category containing the file this package was constructed from.

Murl.IEnums.FileCategory GetFileCategory()

Returns
Murl.IEnums.FileCategory The file category, or IEnums::FILE_CATEGORY_DEFAULT if the package was constructed directly from memory.

GetFileName()

Get the optional file name this package was constructed from, relative to the file category returned via GetFileCategory().

String GetFileName()

Returns
String The file name, or an empty string if the package was constructed directly from memory.

GetNumberOfGraphInstancesToCreate()

Get the number of graph instances defined to be created upon package loading.

Integer GetNumberOfGraphInstancesToCreate()

Returns
Integer The number of instances to create.

GetGraphInstanceToCreate(index)

Get a specific graph instance to create upon package loading.

Murl.Resource.IInstance GetGraphInstanceToCreate(Integer index)

Parameters
indexThe instance index, from 0 to GetNumberOfGraphInstancesToCreate()-1.
Returns
Murl.Resource.IInstance The instance object, or null if the index is out of range.

GetNumberOfScriptInstancesToCreate()

Get the number of script instances defined to be created upon package loading.

Integer GetNumberOfScriptInstancesToCreate()

Returns
Integer The number of instances to create.

GetScriptInstanceToCreate(index)

Get a specific script instance to create upon package loading.

Murl.Resource.IInstance GetScriptInstanceToCreate(Integer index)

Parameters
indexThe instance index, from 0 to GetNumberOfScriptInstancesToCreate()-1.
Returns
Murl.Resource.IInstance The instance object, or null if the index is out of range.

GetNumberOfObjects()

Get the total number of generic resource objects contained in the package.

Integer GetNumberOfObjects()

Returns
Integer The total number of generic objects.

GetNumberOfBinaries()

Get the number of specialized IBinary resource objects contained in the package.

Integer GetNumberOfBinaries()

Returns
Integer The number of objects.

GetNumberOfGraphs()

Get the number of specialized IGraph resource objects contained in the package.

Integer GetNumberOfGraphs()

Returns
Integer The number of objects.

GetNumberOfImages()

Get the number of specialized IImage resource objects contained in the package.

Integer GetNumberOfImages()

Returns
Integer The number of objects.

GetNumberOfMeshes()

Get the number of specialized IMesh resource objects contained in the package.

Integer GetNumberOfMeshes()

Returns
Integer The number of objects.

GetNumberOfFonts()

Get the number of specialized IFont resource objects contained in the package.

Integer GetNumberOfFonts()

Returns
Integer The number of objects.

GetNumberOfShaders()

Get the number of specialized IShader resource objects contained in the package.

Integer GetNumberOfShaders()

Returns
Integer The number of objects.

GetNumberOfAudios()

Get the number of specialized IAudio resource objects contained in the package.

Integer GetNumberOfAudios()

Returns
Integer The number of objects.

GetNumberOfAnimations()

Get the number of specialized IAnimation resource objects contained in the package.

Integer GetNumberOfAnimations()

Returns
Integer The number of objects.

GetNumberOfAtlases()

Get the number of specialized IAtlas resource objects contained in the package.

Integer GetNumberOfAtlases()

Returns
Integer The number of objects.

GetNumberOfArchives()

Get the number of specialized IArchive resource objects contained in the package.

Integer GetNumberOfArchives()

Returns
Integer The number of objects.

GetNumberOfVideos()

Get the number of specialized IVideo resource objects contained in the package.

Integer GetNumberOfVideos()

Returns
Integer The number of objects.

GetNumberOfScripts()

Get the number of script resources contained in the package.

Integer GetNumberOfScripts()

Returns
Integer The number of script resources.

GetNumberOfDictionaries()

Get the number of dictionary resources contained in the package.

Integer GetNumberOfDictionaries()

Returns
Integer The number of dictionary resources.

GetNumberOfGrids()

Get the number of grid resources contained in the package.

Integer GetNumberOfGrids()

Returns
Integer The number of grid resources.

GetNumberOfTexts()

Get the number of text resources contained in the package.

Integer GetNumberOfTexts()

Returns
Integer The number of text resources.

GetNumberOfSubPackages()

Get the number of sub-packages contained in the package.

Integer GetNumberOfSubPackages()

Returns
Integer The number of sub-packages.

GetBinary(index)

Get the specialized IBinary resource object at a given index.

Murl.Resource.IBinary GetBinary(Integer index)

Parameters
indexThe object index, from 0 to GetNumberOfBinaries()-1.
Returns
Murl.Resource.IBinary The object, or null if the index is out of range.

GetBinary(id)

Get the first specialized IBinary resource object matching the current configuration.

Murl.Resource.IBinary GetBinary(String id)

Parameters
idThe resource object ID.
Returns
Murl.Resource.IBinary The object, or null if not found.

GetGraph(index)

Get the specialized IGraph resource object at a given index.

Murl.Resource.IGraph GetGraph(Integer index)

Parameters
indexThe object index, from 0 to GetNumberOfGraphs()-1.
Returns
Murl.Resource.IGraph The object, or null if the index is out of range.

GetGraph(id)

Get the first specialized IGraph resource object matching the current configuration.

Murl.Resource.IGraph GetGraph(String id)

Parameters
idThe resource object ID.
Returns
Murl.Resource.IGraph The object, or null if not found.

GetImage(index)

Get the specialized IImage resource object at a given index.

Murl.Resource.IImage GetImage(Integer index)

Parameters
indexThe object index, from 0 to GetNumberOfImages()-1.
Returns
Murl.Resource.IImage The object, or null if the index is out of range.

GetImage(id)

Get the first specialized IImage resource object matching the current configuration.

Murl.Resource.IImage GetImage(String id)

Parameters
idThe resource object ID.
Returns
Murl.Resource.IImage The object, or null if not found.

GetMesh(index)

Get the specialized IMesh resource object at a given index.

Murl.Resource.IMesh GetMesh(Integer index)

Parameters
indexThe object index, from 0 to GetNumberOfMeshes()-1.
Returns
Murl.Resource.IMesh The object, or null if the index is out of range.

GetMesh(id)

Get the first specialized IMesh resource object matching the current configuration.

Murl.Resource.IMesh GetMesh(String id)

Parameters
idThe resource object ID.
Returns
Murl.Resource.IMesh The object, or null if not found.

GetFont(index)

Get the specialized IFont resource object at a given index.

Murl.Resource.IFont GetFont(Integer index)

Parameters
indexThe object index, from 0 to GetNumberOfFonts()-1.
Returns
Murl.Resource.IFont The object, or null if the index is out of range.

GetFont(id)

Get the first specialized IFont resource object matching the current configuration.

Murl.Resource.IFont GetFont(String id)

Parameters
idThe resource object ID.
Returns
Murl.Resource.IFont The object, or null if not found.

GetShader(index)

Get the specialized IShader resource object at a given index.

Murl.Resource.IShader GetShader(Integer index)

Parameters
indexThe object index, from 0 to GetNumberOfShaders()-1.
Returns
Murl.Resource.IShader The object, or null if the index is out of range.

GetShader(id)

Get the first specialized IShader resource object matching the current configuration.

Murl.Resource.IShader GetShader(String id)

Parameters
idThe resource object ID.
Returns
Murl.Resource.IShader The object, or null if not found.

GetAudio(index)

Get the specialized IAudio resource object at a given index.

Murl.Resource.IAudio GetAudio(Integer index)

Parameters
indexThe object index, from 0 to GetNumberOfAudios()-1.
Returns
Murl.Resource.IAudio The object, or null if the index is out of range.

GetAudio(id)

Get the first specialized IAudio resource object matching the current configuration.

Murl.Resource.IAudio GetAudio(String id)

Parameters
idThe resource object ID.
Returns
Murl.Resource.IAudio The object, or null if not found.

GetAnimation(index)

Get the specialized IAnimation resource object at a given index.

Murl.Resource.IAnimation GetAnimation(Integer index)

Parameters
indexThe object index, from 0 to GetNumberOfAnimations()-1.
Returns
Murl.Resource.IAnimation The object, or null if the index is out of range.

GetAnimation(id)

Get the first specialized IAnimation resource object matching the current configuration.

Murl.Resource.IAnimation GetAnimation(String id)

Parameters
idThe resource object ID.
Returns
Murl.Resource.IAnimation The object, or null if not found.

GetAtlas(index)

Get the specialized IAtlas resource object at a given index.

Murl.Resource.IAtlas GetAtlas(Integer index)

Parameters
indexThe object index, from 0 to GetNumberOfAtlases()-1.
Returns
Murl.Resource.IAtlas The object, or null if the index is out of range.

GetAtlas(id)

Get the first specialized IAtlas resource object matching the current configuration.

Murl.Resource.IAtlas GetAtlas(String id)

Parameters
idThe resource object ID.
Returns
Murl.Resource.IAtlas The object, or null if not found.

GetArchive(index)

Get the specialized IArchive resource object at a given index.

Murl.Resource.IArchive GetArchive(Integer index)

Parameters
indexThe object index, from 0 to GetNumberOfArchives()-1.
Returns
Murl.Resource.IArchive The object, or null if the index is out of range.

GetArchive(id)

Get the first specialized IArchive resource object matching the current configuration.

Murl.Resource.IArchive GetArchive(String id)

Parameters
idThe resource object ID.
Returns
Murl.Resource.IArchive The object, or null if not found.

GetVideo(index)

Get the specialized IVideo resource object at a given index.

Murl.Resource.IVideo GetVideo(Integer index)

Parameters
indexThe object index, from 0 to GetNumberOfVideos()-1.
Returns
Murl.Resource.IVideo The object, or null if the index is out of range.

GetVideo(id)

Get the first specialized IVideo resource object matching the current configuration.

Murl.Resource.IVideo GetVideo(String id)

Parameters
idThe resource object ID.
Returns
Murl.Resource.IVideo The object, or null if not found.

GetScript(index)

Get the script resource at a given index.

Murl.Resource.IScript GetScript(Integer index)

Parameters
indexThe script index, from 0 to GetNumberOfScripts()-1.
Returns
Murl.Resource.IScript The object, or null if the index is out of range.

GetScript(id)

Get the first script resource matching the current configuration.

Murl.Resource.IScript GetScript(String id)

Parameters
idThe resource object ID.
Returns
Murl.Resource.IScript The object, or null if not found.

GetDictionary(index)

Get the dictionary resource at a given index.

Murl.Resource.IDictionary GetDictionary(Integer index)

Parameters
indexThe dictionary index, from 0 to GetNumberOfDictionaries()-1.
Returns
Murl.Resource.IDictionary The object, or null if the index is out of range.

GetDictionary(id)

Get the first dictionary resource matching the current configuration.

Murl.Resource.IDictionary GetDictionary(String id)

Parameters
idThe resource object ID.
Returns
Murl.Resource.IDictionary The object, or null if not found.

GetGrid(index)

Get the grid resource at a given index.

Murl.Resource.IGrid GetGrid(Integer index)

Parameters
indexThe grid index, from 0 to GetNumberOfGrids()-1.
Returns
Murl.Resource.IGrid The object, or null if the index is out of range.

GetGrid(id)

Get the first grid resource matching the current configuration.

Murl.Resource.IGrid GetGrid(String id)

Parameters
idThe resource object ID.
Returns
Murl.Resource.IGrid The object, or null if not found.

GetText(index)

Get the text resource at a given index.

Murl.Resource.IText GetText(Integer index)

Parameters
indexThe text index, from 0 to GetNumberOfTexts()-1.
Returns
Murl.Resource.IText The text object, or null if the index is out of range.

GetText(id)

Get the first text resource matching the current configuration.

Murl.Resource.IText GetText(String id)

Parameters
idThe text ID.
Returns
Murl.Resource.IText The text object, or null if not found.

GetSubPackage(index)

Get the sub-package at a given index.

Murl.Resource.IPackage GetSubPackage(Integer index)

Parameters
indexThe sub-package index, from 0 to GetNumberOfSubPackages()-1.
Returns
Murl.Resource.IPackage The sub-package, or null if the index is out of range.

GetSubPackage(id)

Get the first sub-package matching the current configuration.

Murl.Resource.IPackage GetSubPackage(String id)

Parameters
idThe sub-package ID.
Returns
Murl.Resource.IPackage The sub-package, or null if not found.

SetParentPackage(parentPackage)

Set the optional parent package this package belongs to.

Boolean SetParentPackage(Murl.Resource.IPackage parentPackage)

Parameters
parentPackageThe containing package, or null for removing.
Returns
Boolean true if successful.

GetParentPackage()

Get the optional parent package this package belongs to.

Murl.Resource.IPackage GetParentPackage()

Returns
Murl.Resource.IPackage The containing package, or null if the package is not contained in another package.

GetNumberOfAllocatedResourceBytes()

Query the total number of allocated resource bytes in this package.

Integer GetNumberOfAllocatedResourceBytes()

Returns
Integer The number of allocated bytes.