The abstract base class for a resource object. More...

#include "murl_resource_object.h"

Inheritance diagram for Murl::Resource::Object:

Additional Inherited Members

- Public Types inherited from Murl::IFactoryObject< IObject >
using ClassInfoArray = Array< const ClassInfo * >
 Definition of an array of ClassInfo objects.
 
- Public Member Functions inherited from Murl::Resource::IObject
virtual Bool CreateBinary (Data &data) const =0
 Create a binary representation from the object. More...
 
virtual IEnums::ResourceType GetResourceType () const =0
 Get the object's actual resource type. More...
 
virtual Bool GetFileDependencies (Array< String > &fileNames) const =0
 Fill a given string array with names of files the resource depends on. More...
 
- Public Member Functions inherited from Murl::IFactoryObject< IObject >
 ~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< IObject >
static const PropertyInfoGetPropertyInfo ()
 Get the class' property info struct. More...
 
static const AttributeInfoGetAttributeInfo ()
 Get the class' attribute info struct. More...
 
static void ResetProperties (IFactoryObject< IObject > *object)
 Reset an object instance's properties to their default values. More...
 

Detailed Description

The abstract base class for a resource object.

When specified within an XML resource package, there is a common set of resource attributes that can be used to control e.g. inclusion or exclusion of a specific resource for a given run-time configuration. All different resource objects must use the <Resource> tag for specifying a resource file.

Example of a package.xml file inside the murl_startup.murlres folder defining an XML package:

<?xml version="1.0" ?>
<Package id="murl_startup">
<!-- Bitmap resources -->
<Resource id="loading" fileName="startup_loading_german.png" includeForLanguages="GERMAN"/>
<Resource id="loading" fileName="startup_loading_default.png"/>
<Resource id="circle" fileName="startup_circle.png"/>
<!-- Animation resources -->
<Resource id="circle_anim" fileName="startup_circle_anim.xml"/>
<!-- Sub-Graphs -->
<Resource id="graph" fileName="startup_graph.xml"/>
<!-- Graph instances -->
<Instance graphResourceId="graph"/>
</Package>

XML Elements

XML Resource Object Tag:

<Resource>

XML Resource Object Attributes:

id="" [String]

The ID of the resource object. If a graph node accepts a resource object as an input attribute (e.g. "imageResourceId"), this resource must be specified in the form "<Package ID>:<Resource ID>".

type="DEFAULT" [IEnums::ResourceType]

The optional specific resource type.

fileName="" [String]

The actual file name of the resource on disk. Sub-directories can be included in the file name; the specified path is relative to the directory where the "package.xml" file is placed.

excludeForX="" [String]

A comma-separated list of enumeration values, to specify for which configuration(s) this resource should be excluded. See the "includeForX" attribute below.

includeForX="" [String]

A comma-separated list of enumeration values, to specify for which configuration(s) this resource should be included. Resources in a package that have one or more condition attributes are evaluated in a top-down manner until the first match is found for the specified inclusions and/or exclusions. Possible values for X (e.g. "includeForLanguages") and their data types:


The documentation for this class was generated from the following file:
  • murl_resource_object.h


Copyright © 2011-2024 Spraylight GmbH.