The XML package class. More...
#include "murl_resource_xml_package.h"
Additional Inherited Members | |
Public Types inherited from Murl::Resource::IPackage | |
enum | Flags { FLAG_HAS_CHECKSUM } |
Package flags. More... | |
Public Types inherited from Murl::IFactoryObject< IPackage > | |
using | ClassInfoArray = Array< const ClassInfo * > |
Definition of an array of ClassInfo objects. | |
Public Member Functions inherited from Murl::IFactoryObject< IPackage > | |
~IFactoryObject () override | |
The destructor. | |
virtual const ClassInfo * | GetObjectClassInfo () const=0 |
Get the object instance's class info, if present. More... | |
virtual void | ResetObjectProperties ()=0 |
Reset the object instance's properties to their default values. | |
Static Public Member Functions inherited from Murl::IFactoryObject< IPackage > | |
static const PropertyInfo * | GetPropertyInfo () |
Get the class' property info struct. More... | |
static const AttributeInfo * | GetAttributeInfo () |
Get the class' attribute info struct. More... | |
static void | ResetProperties (IFactoryObject< IPackage > *object) |
Reset an object instance's properties to their default values. More... | |
Detailed Description
The XML package class.
An XML package in the Murl Engine is represented by a sub-folder on disk. In order to be recognized as an XML package, that folder must have the predefined name extension ".murlres" and a mandatory accompanying "package.xml" inside that folder, where the actual resource contents are defined.
The actual package contents may be comprised of any number of individual resource objects of different types, texts, sub-packages, and also instance rules for automatically creating and attaching sub-graph instances to the engine's master scene graph.
An valid package.xml file is recognized by its <Package> root element. The following attributes are accepted for the root element:
- id: Mandatory internal ID of the package, by which it gets referenced from the engine. The ID must be unique among all packages that are simultaneously loaded at a given time.
- revision: An optional 32bit signed integer value that represents a user-defined application-specific internal revision.
- useChecksum: If true, an optional checksum is generated for the package, and verified every time the package is loaded. Note that enabling checksum verification may slow down the loading process, as every single byte in the binary package must be processed.
The following elements are allowed as children of the root element:
- <Resource>: Defines a single resource object to be included in the package. See Resource::Object.
- <Text>: Defines a single string resource to be included in the package. See Resource::Text.
- <Package>: Defines a sub-package to be included in the package. See below.
- <Instance>: Defines an instance of a Resource::IGraph or Resource::IScript to be automatically created upon package loading. See Resource::Instance.
If the given XML package represents a sub-package of another package, the same inclusion/ exclusion rules can be applied as for Resource::Object and Resource::Text. For sub-packages, the following attributes must be defined in the respective <Package> element where the sub-package is defined:
- id: The ID of the sub-package, which MUST match the internal ID of the package itself.
- fileName: The actual sub-package file name, relative to the container's package.xml file.
See Resource::Object for details.
The documentation for this class was generated from the following file:
- murl_resource_xml_package.h