![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The resource collection interface.
A resource collection provides methods to manage individual Resource::IPackage objects, which contain a number of individual Resource::IObject instances. The resource collection also provides methods to retrieve individual objects via a package/object identifier pair in the form "packageId:objectId", as in GetObject() and related methods.
Get the constant ICollection interface.
Murl.Resource.ICollection GetCollectionInterface()
Initialize this collection.
Boolean Init()
De-initialize this collection.
Boolean DeInit()
Register a specific package from a block of memory. This method can be used to register a package from memory as if it was a file on disk. Internally, the CreatePackageFromFile() first checks if any package with the given file name was registered through this method before actually searching the file system.
Boolean RegisterPackageData(String name, Murl.ConstData data)
name | The file name to register. |
data | A Data object containing the binary package. |
Unregister a package previously registered through RegisterPackageData().
Boolean UnregisterPackageData(String name)
name | The file name to unregister. |
Destroy a previously created package.
Boolean, Murl.Resource.IPackage DestroyPackage(Murl.Resource.IPackage package)
package | A reference to a pointer holding the package to destroy. |
Get the total number of packages in this collection.
Integer GetNumberOfPackages()
Get the package at a given index.
Murl.Resource.IPackage GetPackage(Integer index)
index | The index of the package, from 0 to GetNumberOfPackages()-1. |
Get a package by its ID.
Murl.Resource.IPackage GetPackage(String id)
id | The package ID to query. |
Get a single object as a specialized Resource::IBinary. See GetObject().
Murl.Resource.IBinary GetBinary(String id)
id | The ID of the object to retrieve. |
Get a single object as a specialized Resource::IGraph. See GetObject().
Murl.Resource.IGraph GetGraph(String id)
id | The ID of the object to retrieve. |
Get a single object as a specialized Resource::IImage. See GetObject().
Murl.Resource.IImage GetImage(String id)
id | The ID of the object to retrieve. |
Get a single object as a specialized Resource::IMesh. See GetObject().
Murl.Resource.IMesh GetMesh(String id)
id | The ID of the object to retrieve. |
Get a single object as a specialized Resource::IFont. See GetObject().
Murl.Resource.IFont GetFont(String id)
id | The ID of the object to retrieve. |
Get a single object as a specialized Resource::IShader. See GetObject().
Murl.Resource.IShader GetShader(String id)
id | The ID of the object to retrieve. |
Get a single object as a specialized Resource::IAudio. See GetObject().
Murl.Resource.IAudio GetAudio(String id)
id | The ID of the object to retrieve. |
Get a single object as a specialized Resource::IAnimation. See GetObject().
Murl.Resource.IAnimation GetAnimation(String id)
id | The ID of the object to retrieve. |
Get a single object as a specialized Resource::IAtlas. See GetObject().
Murl.Resource.IAtlas GetAtlas(String id)
id | The ID of the object to retrieve. |
Get a single object as a specialized Resource::IArchive. See GetObject().
Murl.Resource.IArchive GetArchive(String id)
id | The ID of the object to retrieve. |
Get a single object as a specialized Resource::IVideo. See GetObject().
Murl.Resource.IVideo GetVideo(String id)
id | The ID of the object to retrieve. |
Get a single object as a specialized Resource::IScript. See GetObject().
Murl.Resource.IScript GetScript(String id)
id | The ID of the object to retrieve. |
Get a single object as a specialized Resource::IDictionary. See GetObject().
Murl.Resource.IDictionary GetDictionary(String id)
id | The ID of the object to retrieve. |
Get a single object as a specialized Resource::IGrid. See GetObject().
Murl.Resource.IGrid GetGrid(String id)
id | The ID of the object to retrieve. |
Get a single text resource. See GetObject().
Murl.Resource.IText GetText(String id)
id | The ID of the text to retrieve. |
Set the optional parent package this collection belongs to.
Boolean SetParentPackage(Murl.Resource.IPackage parentPackage)
parentPackage | The containing package, or null for removing. |
Get the optional parent package this collection belongs to.
Murl.Resource.IPackage GetParentPackage()
Set the optional parent collection. An optional parent collection can be defined to perform an additional search for a resource (via package and object ID) if it cannot be found in this collection.
Boolean SetParentCollection(Murl.Resource.ICollection parentCollection)
parentCollection | The parent collection, or null for removing. |
Get the optional parent collection.
Murl.Resource.ICollection GetParentCollection()
Query the total number of allocated resource bytes in this collection.
Integer GetNumberOfAllocatedResourceBytes()