The factory class used to create and destroy any type of resource objects. More...

#include "murl_resource_i_factory.h"

Inheritance diagram for Murl::Resource::IFactory:

Public Member Functions

virtual Bool Init ()=0
 Initialize the factory. More...
 
virtual Bool DeInit ()=0
 Deinitialize the factory. More...
 
virtual Bool AddParameterOverride (const String &tag, const IAttributes *parameters)=0
 Add a parameter override for a given tag. More...
 
virtual Bool RemoveParameterOverride (const String &tag)=0
 Remove a parameter override for a given tag. More...
 
virtual UInt32 GetNumberOfParameterOverrides () const =0
 Get the total number of parameter overrides currently defined. More...
 
virtual SInt32 GetParameterOverrideIndex (const String &tag) const =0
 Get the index of a parameter override for a given tag. More...
 
virtual const IAttributes * GetParameterOverride (UInt32 index) const =0
 Get the parameter override at a given index. More...
 
virtual const IAttributes * GetParameterOverride (const String &tag) const =0
 Get the parameter override for a given tag. More...
 
virtual UInt32 GetNumberOfCollectionFactories () const =0
 Get the total number of known collection factories. More...
 
virtual ICollectionFactory * GetCollectionFactory (UInt32 index)=0
 Get the collection factory at a given index. More...
 
virtual const ICollectionFactory * GetCollectionFactory (UInt32 index) const =0
 Get the collection factory at a given index. More...
 
virtual ICollectionFactory * GetDefaultCollectionFactory ()=0
 Get the default collection factory. More...
 
virtual const ICollectionFactory * GetDefaultCollectionFactory () const =0
 Get the default collection factory. More...
 
virtual ICollectionFactory * GetCollectionFactory (const String &className)=0
 Get a known collection factory by its class name. More...
 
virtual const ICollectionFactory * GetCollectionFactory (const String &className) const =0
 Get a known collection factory by its class name. More...
 
virtual ICollectionFactory * GetCollectionFactory (const ICollectionFactory::ClassInfo &classInfo)=0
 Get a known collection factory by its class info structure. More...
 
virtual const ICollectionFactory * GetCollectionFactory (const ICollectionFactory::ClassInfo &classInfo) const =0
 Get a known collection factory by its class info structure. More...
 
virtual UInt32 GetNumberOfPackageFactories () const =0
 Get the total number of known package factories. More...
 
virtual IPackageFactory * GetPackageFactory (UInt32 index)=0
 Get the package factory at a given index. More...
 
virtual const IPackageFactory * GetPackageFactory (UInt32 index) const =0
 Get the package factory at a given index. More...
 
virtual IPackageFactory * GetDefaultPackageFactory ()=0
 Get the default package factory. More...
 
virtual const IPackageFactory * GetDefaultPackageFactory () const =0
 Get the default package factory. More...
 
virtual IPackageFactory * GetPackageFactory (const String &className)=0
 Get a known package factory by its class name. More...
 
virtual const IPackageFactory * GetPackageFactory (const String &className) const =0
 Get a known package factory by its class name. More...
 
virtual IPackageFactory * GetPackageFactory (const IPackageFactory::ClassInfo &classInfo)=0
 Get a known package factory by its class info structure. More...
 
virtual const IPackageFactory * GetPackageFactory (const IPackageFactory::ClassInfo &classInfo) const =0
 Get a known package factory by its class info structure. More...
 
virtual UInt32 GetNumberOfObjectFactories () const =0
 Get the total number of known object factories. More...
 
virtual IObjectFactory * GetObjectFactory (UInt32 index)=0
 Get the object factory at a given index. More...
 
virtual const IObjectFactory * GetObjectFactory (UInt32 index) const =0
 Get the object factory at a given index. More...
 
virtual IObjectFactory * GetDefaultObjectFactory ()=0
 Get the default object factory. More...
 
virtual const IObjectFactory * GetDefaultObjectFactory () const =0
 Get the default object factory. More...
 
virtual IObjectFactory * GetObjectFactory (const String &className)=0
 Get a known object factory by its class name. More...
 
virtual const IObjectFactory * GetObjectFactory (const String &className) const =0
 Get a known object factory by its class name. More...
 
virtual IObjectFactory * GetObjectFactory (const IObjectFactory::ClassInfo &classInfo)=0
 Get a known object factory by its class info structure. More...
 
virtual const IObjectFactory * GetObjectFactory (const IObjectFactory::ClassInfo &classInfo) const =0
 Get a known object factory by its class info structure. More...
 
virtual ICollection * CreateDefaultCollection () const =0
 Create a default resource collection. More...
 
virtual ICollection * CreateCollection (const String &className) const =0
 Create a resource collection using a given collection class name. More...
 
virtual ICollection * CreateCollection (const ICollection::ClassInfo &classInfo) const =0
 Create a resource collection using a given collection class info. More...
 
virtual Bool DestroyCollection (ICollection *&collection) const =0
 Destroy a previously created resource collection. More...
 
virtual IObject * CreateObjectFromFile (IEnums::ResourceType type, const String &fileName) const =0
 Create a single resource object from a given file. More...
 
virtual IObject * CreateObjectFromFile (IEnums::ResourceType type, const String &fileName, Result &result) const =0
 Create a single resource object from a given file. More...
 
virtual IObject * CreateObjectFromFile (IEnums::ResourceType type, const IAttributes *params, const String &fileName) const =0
 Create a single resource object from a given file. More...
 
virtual IObject * CreateObjectFromFile (IEnums::ResourceType type, const IAttributes *params, const String &fileName, Result &result) const =0
 Create a single resource object from a given file. More...
 
virtual IObject * CreateObjectFromMemory (IEnums::ResourceType type, const ConstData &data, Bool &dataCanBeDisposed) const =0
 Create a single resource object from a given block of memory. More...
 
virtual IObject * CreateObjectFromMemory (IEnums::ResourceType type, const ConstData &data, Bool &dataCanBeDisposed, Result &result) const =0
 Create a single resource object from a given block of memory. More...
 
virtual IObject * CreateObjectFromMemory (IEnums::ResourceType type, const IAttributes *params, const ConstData &data, Bool &dataCanBeDisposed) const =0
 Create a single resource object from a given block of memory. More...
 
virtual IObject * CreateObjectFromMemory (IEnums::ResourceType type, const IAttributes *params, const ConstData &data, Bool &dataCanBeDisposed, Result &result) const =0
 Create a single resource object from a given block of memory. More...
 
virtual Bool DestroyObject (IObject *&object) const =0
 Destroy a previously created resource object. More...
 
virtual IImage * CreateRawImage (IEnums::PixelFormat pixelFormat, UInt32 pixelSizeX, UInt32 pixelSizeY) const =0
 Create a raw image resource. More...
 
virtual Bool DestroyRawImage (IImage *&image) const =0
 Destroy a previously created image resource. More...
 
virtual const IPlatformConfiguration * GetPlatformConfiguration () const =0
 Get the current platform configuration. More...
 
virtual const IEngineConfiguration * GetEngineConfiguration () const =0
 Get the current engine configuration. More...
 
virtual const IAppConfiguration * GetAppConfiguration () const =0
 Get the current app configuration. More...
 
virtual IFileInterface * GetFileInterface () const =0
 Get the current file interface. More...
 
virtual const Output::IDeviceHandler * GetOutputDeviceHandler () const =0
 Get the current output device handler. More...
 
- Public Member Functions inherited from Murl::Resource::IFactoryRegistry
virtual Bool RegisterCollectionFactoryClass (const ICollectionFactory::ClassInfo &classInfo)=0
 Register a collection factory class. More...
 
virtual Bool UnregisterCollectionFactoryClass (const ICollectionFactory::ClassInfo &classInfo)=0
 Unregister a previously registered collection factory class. More...
 
virtual Bool RegisterPackageFactoryClass (const IPackageFactory::ClassInfo &classInfo)=0
 Register a package factory class. More...
 
virtual Bool UnregisterPackageFactoryClass (const IPackageFactory::ClassInfo &classInfo)=0
 Unregister a previously registered package factory class. More...
 
virtual Bool RegisterObjectFactoryClass (const IObjectFactory::ClassInfo &classInfo)=0
 Register an object factory class. More...
 
virtual Bool UnregisterObjectFactoryClass (const IObjectFactory::ClassInfo &classInfo)=0
 Unregister a previously registered object factory class. More...
 
virtual UInt32 GetNumberOfCollectionFactoryRegistries () const =0
 Get the total number of known collection factory registries. More...
 
virtual ICollectionFactoryRegistry * GetCollectionFactoryRegistry (UInt32 index)=0
 Get the registry interface of the collection factory at a given index. More...
 
virtual const ICollectionFactoryRegistry * GetCollectionFactoryRegistry (UInt32 index) const =0
 Get the registry interface of the collection factory at a given index. More...
 
virtual ICollectionFactoryRegistry * GetDefaultCollectionFactoryRegistry ()=0
 Get the registry interface of the default collection factory. More...
 
virtual const ICollectionFactoryRegistry * GetDefaultCollectionFactoryRegistry () const =0
 Get the registry interface of the default collection factory. More...
 
virtual ICollectionFactoryRegistry * GetCollectionFactoryRegistry (const String &className)=0
 Get the registry interface of a known collection factory by its class name. More...
 
virtual const ICollectionFactoryRegistry * GetCollectionFactoryRegistry (const String &className) const =0
 Get the registry interface of a known collection factory by its class name. More...
 
virtual ICollectionFactoryRegistry * GetCollectionFactoryRegistry (const ICollectionFactory::ClassInfo &classInfo)=0
 Get the registry interface of a known collection factory by its class info structure. More...
 
virtual const ICollectionFactoryRegistry * GetCollectionFactoryRegistry (const ICollectionFactory::ClassInfo &classInfo) const =0
 Get the registry interface of a known collection factory by its class info structure. More...
 
virtual UInt32 GetNumberOfPackageFactoryRegistries () const =0
 Get the total number of known package factory registries. More...
 
virtual IPackageFactoryRegistry * GetPackageFactoryRegistry (UInt32 index)=0
 Get the registry interface of the package factory at a given index. More...
 
virtual const IPackageFactoryRegistry * GetPackageFactoryRegistry (UInt32 index) const =0
 Get the registry interface of the package factory at a given index. More...
 
virtual IPackageFactoryRegistry * GetDefaultPackageFactoryRegistry ()=0
 Get the registry interface of the default package factory. More...
 
virtual const IPackageFactoryRegistry * GetDefaultPackageFactoryRegistry () const =0
 Get the registry interface of the default package factory. More...
 
virtual IPackageFactoryRegistry * GetPackageFactoryRegistry (const String &className)=0
 Get the registry interface of a known package factory by its class name. More...
 
virtual const IPackageFactoryRegistry * GetPackageFactoryRegistry (const String &className) const =0
 Get the registry interface of a known package factory by its class name. More...
 
virtual IPackageFactoryRegistry * GetPackageFactoryRegistry (const IPackageFactory::ClassInfo &classInfo)=0
 Get the registry interface of a known package factory by its class info structure. More...
 
virtual const IPackageFactoryRegistry * GetPackageFactoryRegistry (const IPackageFactory::ClassInfo &classInfo) const =0
 Get the registry interface of a known package factory by its class info structure. More...
 
virtual UInt32 GetNumberOfObjectFactoryRegistries () const =0
 Get the total number of known object factory registries. More...
 
virtual IObjectFactoryRegistry * GetObjectFactoryRegistry (UInt32 index)=0
 Get the registry interface of the object factory at a given index. More...
 
virtual const IObjectFactoryRegistry * GetObjectFactoryRegistry (UInt32 index) const =0
 Get the registry interface of the object factory at a given index. More...
 
virtual IObjectFactoryRegistry * GetDefaultObjectFactoryRegistry ()=0
 Get the registry interface of the default object factory. More...
 
virtual const IObjectFactoryRegistry * GetDefaultObjectFactoryRegistry () const =0
 Get the registry interface of the default object factory. More...
 
virtual IObjectFactoryRegistry * GetObjectFactoryRegistry (const String &className)=0
 Get the registry interface of a known object factory by its class name. More...
 
virtual const IObjectFactoryRegistry * GetObjectFactoryRegistry (const String &className) const =0
 Get the registry interface of a known object factory by its class name. More...
 
virtual IObjectFactoryRegistry * GetObjectFactoryRegistry (const IObjectFactory::ClassInfo &classInfo)=0
 Get the registry interface of a known object factory by its class info structure. More...
 
virtual const IObjectFactoryRegistry * GetObjectFactoryRegistry (const IObjectFactory::ClassInfo &classInfo) const =0
 Get the registry interface of a known object factory by its class info structure. More...
 

Detailed Description

The factory class used to create and destroy any type of resource objects.

Use the Resource::IFactoryRegistry base interface for managing registered resource collection, package and object classes.

Member Function Documentation

◆ Init()

virtual Bool Murl::Resource::IFactory::Init ( )
pure virtual

Initialize the factory.

Returns
true if successful.

◆ DeInit()

virtual Bool Murl::Resource::IFactory::DeInit ( )
pure virtual

Deinitialize the factory.

Returns
true if successful.

◆ AddParameterOverride()

virtual Bool Murl::Resource::IFactory::AddParameterOverride ( const String &  tag,
const IAttributes *  parameters 
)
pure virtual

Add a parameter override for a given tag.

Parameters
tagThe override tag to add.
parametersThe parameters to override for all resources that match the given tag.
Returns
true if successfully added, false if the given tag was already present.

◆ RemoveParameterOverride()

virtual Bool Murl::Resource::IFactory::RemoveParameterOverride ( const String &  tag)
pure virtual

Remove a parameter override for a given tag.

Parameters
tagThe override tag to remove.
Returns
true if successfully removed, false if the given tag was not found.

◆ GetNumberOfParameterOverrides()

virtual UInt32 Murl::Resource::IFactory::GetNumberOfParameterOverrides ( ) const
pure virtual

Get the total number of parameter overrides currently defined.

Returns
The number of present overrides.

◆ GetParameterOverrideIndex()

virtual SInt32 Murl::Resource::IFactory::GetParameterOverrideIndex ( const String &  tag) const
pure virtual

Get the index of a parameter override for a given tag.

Parameters
tagThe override tag to search for.
Returns
The zero based index, or -1 if the given tag was not found.

◆ GetParameterOverride() [1/2]

virtual const IAttributes* Murl::Resource::IFactory::GetParameterOverride ( UInt32  index) const
pure virtual

Get the parameter override at a given index.

Parameters
indexThe zero-based index, in the range [0..GetNumberOfParameterOverrides()].
Returns
The override, or null if index was out of range.

◆ GetParameterOverride() [2/2]

virtual const IAttributes* Murl::Resource::IFactory::GetParameterOverride ( const String &  tag) const
pure virtual

Get the parameter override for a given tag.

Parameters
tagThe override tag to search for.
Returns
The override, or null if the given tag was not found.

◆ GetNumberOfCollectionFactories()

virtual UInt32 Murl::Resource::IFactory::GetNumberOfCollectionFactories ( ) const
pure virtual

Get the total number of known collection factories.

Returns
The number of known factories.

◆ GetCollectionFactory() [1/6]

virtual ICollectionFactory* Murl::Resource::IFactory::GetCollectionFactory ( UInt32  index)
pure virtual

Get the collection factory at a given index.

Parameters
indexThe index, from 0 to GetNumberOfCollectionFactories()-1.
Returns
A mutable pointer to the collection factory interface.

◆ GetCollectionFactory() [2/6]

virtual const ICollectionFactory* Murl::Resource::IFactory::GetCollectionFactory ( UInt32  index) const
pure virtual

Get the collection factory at a given index.

Parameters
indexThe index, from 0 to GetNumberOfCollectionFactories()-1.
Returns
A constant pointer to the collection factory interface.

◆ GetDefaultCollectionFactory() [1/2]

virtual ICollectionFactory* Murl::Resource::IFactory::GetDefaultCollectionFactory ( )
pure virtual

Get the default collection factory.

Returns
A mutable pointer to the default collection factory.

◆ GetDefaultCollectionFactory() [2/2]

virtual const ICollectionFactory* Murl::Resource::IFactory::GetDefaultCollectionFactory ( ) const
pure virtual

Get the default collection factory.

Returns
A constant pointer to the default collection factory.

◆ GetCollectionFactory() [3/6]

virtual ICollectionFactory* Murl::Resource::IFactory::GetCollectionFactory ( const String &  className)
pure virtual

Get a known collection factory by its class name.

Parameters
classNameThe class name of the factory to query.
Returns
A mutable pointer to the requested collection factory, or null if not found.

◆ GetCollectionFactory() [4/6]

virtual const ICollectionFactory* Murl::Resource::IFactory::GetCollectionFactory ( const String &  className) const
pure virtual

Get a known collection factory by its class name.

Parameters
classNameThe class name of the factory to query.
Returns
A constant pointer to the requested collection factory, or null if not found.

◆ GetCollectionFactory() [5/6]

virtual ICollectionFactory* Murl::Resource::IFactory::GetCollectionFactory ( const ICollectionFactory::ClassInfo &  classInfo)
pure virtual

Get a known collection factory by its class info structure.

Parameters
classInfoThe factory's ClassInfo structure.
Returns
A mutable pointer to the requested collection factory, or null if not found.

◆ GetCollectionFactory() [6/6]

virtual const ICollectionFactory* Murl::Resource::IFactory::GetCollectionFactory ( const ICollectionFactory::ClassInfo &  classInfo) const
pure virtual

Get a known collection factory by its class info structure.

Parameters
classInfoThe factory's ClassInfo structure.
Returns
A constant pointer to the requested collection factory, or null if not found.

◆ GetNumberOfPackageFactories()

virtual UInt32 Murl::Resource::IFactory::GetNumberOfPackageFactories ( ) const
pure virtual

Get the total number of known package factories.

Returns
The number of known factories.

◆ GetPackageFactory() [1/6]

virtual IPackageFactory* Murl::Resource::IFactory::GetPackageFactory ( UInt32  index)
pure virtual

Get the package factory at a given index.

Parameters
indexThe index, from 0 to GetNumberOfPackageFactories()-1.
Returns
A mutable pointer to the package factory interface.

◆ GetPackageFactory() [2/6]

virtual const IPackageFactory* Murl::Resource::IFactory::GetPackageFactory ( UInt32  index) const
pure virtual

Get the package factory at a given index.

Parameters
indexThe index, from 0 to GetNumberOfPackageFactories()-1.
Returns
A constant pointer to the package factory interface.

◆ GetDefaultPackageFactory() [1/2]

virtual IPackageFactory* Murl::Resource::IFactory::GetDefaultPackageFactory ( )
pure virtual

Get the default package factory.

Returns
A mutable pointer to the default package factory.

◆ GetDefaultPackageFactory() [2/2]

virtual const IPackageFactory* Murl::Resource::IFactory::GetDefaultPackageFactory ( ) const
pure virtual

Get the default package factory.

Returns
A constant pointer to the default package factory.

◆ GetPackageFactory() [3/6]

virtual IPackageFactory* Murl::Resource::IFactory::GetPackageFactory ( const String &  className)
pure virtual

Get a known package factory by its class name.

Parameters
classNameThe class name of the factory to query.
Returns
A mutable pointer to the requested package factory, or null if not found.

◆ GetPackageFactory() [4/6]

virtual const IPackageFactory* Murl::Resource::IFactory::GetPackageFactory ( const String &  className) const
pure virtual

Get a known package factory by its class name.

Parameters
classNameThe class name of the factory to query.
Returns
A constant pointer to the requested package factory, or null if not found.

◆ GetPackageFactory() [5/6]

virtual IPackageFactory* Murl::Resource::IFactory::GetPackageFactory ( const IPackageFactory::ClassInfo &  classInfo)
pure virtual

Get a known package factory by its class info structure.

Parameters
classInfoThe factory's ClassInfo structure.
Returns
A mutable pointer to the requested package factory, or null if not found.

◆ GetPackageFactory() [6/6]

virtual const IPackageFactory* Murl::Resource::IFactory::GetPackageFactory ( const IPackageFactory::ClassInfo &  classInfo) const
pure virtual

Get a known package factory by its class info structure.

Parameters
classInfoThe factory's ClassInfo structure.
Returns
A constant pointer to the requested package factory, or null if not found.

◆ GetNumberOfObjectFactories()

virtual UInt32 Murl::Resource::IFactory::GetNumberOfObjectFactories ( ) const
pure virtual

Get the total number of known object factories.

Returns
The number of known factories.

◆ GetObjectFactory() [1/6]

virtual IObjectFactory* Murl::Resource::IFactory::GetObjectFactory ( UInt32  index)
pure virtual

Get the object factory at a given index.

Parameters
indexThe index, from 0 to GetNumberOfObjectFactories()-1.
Returns
A mutable pointer to the object factory interface.

◆ GetObjectFactory() [2/6]

virtual const IObjectFactory* Murl::Resource::IFactory::GetObjectFactory ( UInt32  index) const
pure virtual

Get the object factory at a given index.

Parameters
indexThe index, from 0 to GetNumberOfObjectFactories()-1.
Returns
A constant pointer to the object factory interface.

◆ GetDefaultObjectFactory() [1/2]

virtual IObjectFactory* Murl::Resource::IFactory::GetDefaultObjectFactory ( )
pure virtual

Get the default object factory.

Returns
A mutable pointer to the default object factory.

◆ GetDefaultObjectFactory() [2/2]

virtual const IObjectFactory* Murl::Resource::IFactory::GetDefaultObjectFactory ( ) const
pure virtual

Get the default object factory.

Returns
A constant pointer to the default object factory.

◆ GetObjectFactory() [3/6]

virtual IObjectFactory* Murl::Resource::IFactory::GetObjectFactory ( const String &  className)
pure virtual

Get a known object factory by its class name.

Parameters
classNameThe class name of the factory to query.
Returns
A mutable pointer to the requested object factory, or null if not found.

◆ GetObjectFactory() [4/6]

virtual const IObjectFactory* Murl::Resource::IFactory::GetObjectFactory ( const String &  className) const
pure virtual

Get a known object factory by its class name.

Parameters
classNameThe class name of the factory to query.
Returns
A constant pointer to the requested object factory, or null if not found.

◆ GetObjectFactory() [5/6]

virtual IObjectFactory* Murl::Resource::IFactory::GetObjectFactory ( const IObjectFactory::ClassInfo &  classInfo)
pure virtual

Get a known object factory by its class info structure.

Parameters
classInfoThe factory's ClassInfo structure.
Returns
A mutable pointer to the requested object factory, or null if not found.

◆ GetObjectFactory() [6/6]

virtual const IObjectFactory* Murl::Resource::IFactory::GetObjectFactory ( const IObjectFactory::ClassInfo &  classInfo) const
pure virtual

Get a known object factory by its class info structure.

Parameters
classInfoThe factory's ClassInfo structure.
Returns
A constant pointer to the requested object factory, or null if not found.

◆ CreateDefaultCollection()

virtual ICollection* Murl::Resource::IFactory::CreateDefaultCollection ( ) const
pure virtual

Create a default resource collection.

Returns
The newly created collection, or null if failed.

◆ CreateCollection() [1/2]

virtual ICollection* Murl::Resource::IFactory::CreateCollection ( const String &  className) const
pure virtual

Create a resource collection using a given collection class name.

Parameters
classNameThe class name of a registered collection used for creation.
Returns
The newly created collection, or null if failed.

◆ CreateCollection() [2/2]

virtual ICollection* Murl::Resource::IFactory::CreateCollection ( const ICollection::ClassInfo &  classInfo) const
pure virtual

Create a resource collection using a given collection class info.

Parameters
classInfoThe ClassInfo structure of a registered collection used for creation.
Returns
The newly created collection, or null if failed.

◆ DestroyCollection()

virtual Bool Murl::Resource::IFactory::DestroyCollection ( ICollection *&  collection) const
pure virtual

Destroy a previously created resource collection.

Parameters
collectionA reference to a pointer holding the collection to destroy.
Returns
true if successful.

◆ CreateObjectFromFile() [1/4]

virtual IObject* Murl::Resource::IFactory::CreateObjectFromFile ( IEnums::ResourceType  type,
const String &  fileName 
) const
pure virtual

Create a single resource object from a given file.

To automatically detect the actual type of resource represented by the given file, specify the IEnums::RESOURCE_TYPE_DEFAULT type. If it is desired to include the file "as is" (i.e. raw binary data), use IEnums::RESOURCE_TYPE_BINARY. To include the file as a compressed binary, IEnums::RESOURCE_TYPE_ARCHIVE can be used. The file with the given name is loaded from the default resource location, which can be set via IEngineConfiguration::SetResourceFileCategory().

Parameters
typeThe desired resource type.
fileNameThe name of the file to load.
Returns
A pointer to the newly created resource object, or null if failed.

◆ CreateObjectFromFile() [2/4]

virtual IObject* Murl::Resource::IFactory::CreateObjectFromFile ( IEnums::ResourceType  type,
const String &  fileName,
Result &  result 
) const
pure virtual

Create a single resource object from a given file.

To automatically detect the actual type of resource represented by the given file, specify the IEnums::RESOURCE_TYPE_DEFAULT type. If it is desired to include the file "as is" (i.e. raw binary data), use IEnums::RESOURCE_TYPE_BINARY. To include the file as a compressed binary, IEnums::RESOURCE_TYPE_ARCHIVE can be used. The file with the given name is loaded from the default resource location, which can be set via IEngineConfiguration::SetResourceFileCategory().

Parameters
typeThe desired resource type.
fileNameThe name of the file to load.
resultThe object to receive the result of the operation.
Returns
A pointer to the newly created resource object, or null if failed.

◆ CreateObjectFromFile() [3/4]

virtual IObject* Murl::Resource::IFactory::CreateObjectFromFile ( IEnums::ResourceType  type,
const IAttributes *  params,
const String &  fileName 
) const
pure virtual

Create a single resource object from a given file.

To automatically detect the actual type of resource represented by the given file, specify the IEnums::RESOURCE_TYPE_DEFAULT type. If it is desired to include the file "as is" (i.e. raw binary data), use IEnums::RESOURCE_TYPE_BINARY. To include the file as a compressed binary, IEnums::RESOURCE_TYPE_ARCHIVE can be used. The file with the given name is loaded from the default resource location, which can be set via IEngineConfiguration::SetResourceFileCategory().

Parameters
typeThe desired resource type.
paramsAn optional pointer to user-defined parameters used during creation.
fileNameThe name of the file to load.
Returns
A pointer to the newly created resource object, or null if failed.

◆ CreateObjectFromFile() [4/4]

virtual IObject* Murl::Resource::IFactory::CreateObjectFromFile ( IEnums::ResourceType  type,
const IAttributes *  params,
const String &  fileName,
Result &  result 
) const
pure virtual

Create a single resource object from a given file.

To automatically detect the actual type of resource represented by the given file, specify the IEnums::RESOURCE_TYPE_DEFAULT type. If it is desired to include the file "as is" (i.e. raw binary data), use IEnums::RESOURCE_TYPE_BINARY. To include the file as a compressed binary, IEnums::RESOURCE_TYPE_ARCHIVE can be used. The file with the given name is loaded from the default resource location, which can be set via IEngineConfiguration::SetResourceFileCategory().

Parameters
typeThe desired resource type.
paramsAn optional pointer to user-defined parameters used during creation.
fileNameThe name of the file to load.
resultThe object to receive the result of the operation.
Returns
A pointer to the newly created resource object, or null if failed.

◆ CreateObjectFromMemory() [1/4]

virtual IObject* Murl::Resource::IFactory::CreateObjectFromMemory ( IEnums::ResourceType  type,
const ConstData &  data,
Bool &  dataCanBeDisposed 
) const
pure virtual

Create a single resource object from a given block of memory.

See CreateObjectFromFile().

Parameters
typeThe desired resource type.
dataA data object holding the data for the resource to create.
dataCanBeDisposedA reference to a boolean variable receiving true when it is safe to destroy the given data object right after resource creation. If false, the data object must be kept until the object was successfully destroyed via DestroyObject().
Returns
A pointer to the newly created resource object, or null if failed.

◆ CreateObjectFromMemory() [2/4]

virtual IObject* Murl::Resource::IFactory::CreateObjectFromMemory ( IEnums::ResourceType  type,
const ConstData &  data,
Bool &  dataCanBeDisposed,
Result &  result 
) const
pure virtual

Create a single resource object from a given block of memory.

See CreateObjectFromFile().

Parameters
typeThe desired resource type.
dataA data object holding the data for the resource to create.
dataCanBeDisposedA reference to a boolean variable receiving true when it is safe to destroy the given data object right after resource creation. If false, the data object must be kept until the object was successfully destroyed via DestroyObject().
resultThe object to receive the result of the operation.
Returns
A pointer to the newly created resource object, or null if failed.

◆ CreateObjectFromMemory() [3/4]

virtual IObject* Murl::Resource::IFactory::CreateObjectFromMemory ( IEnums::ResourceType  type,
const IAttributes *  params,
const ConstData &  data,
Bool &  dataCanBeDisposed 
) const
pure virtual

Create a single resource object from a given block of memory.

See CreateObjectFromFile().

Parameters
typeThe desired resource type.
paramsAn optional pointer to user-defined parameters used during creation.
dataA data object holding the data for the resource to create.
dataCanBeDisposedA reference to a boolean variable receiving true when it is safe to destroy the given data object right after resource creation. If false, the data object must be kept until the object was successfully destroyed via DestroyObject().
Returns
A pointer to the newly created resource object, or null if failed.

◆ CreateObjectFromMemory() [4/4]

virtual IObject* Murl::Resource::IFactory::CreateObjectFromMemory ( IEnums::ResourceType  type,
const IAttributes *  params,
const ConstData &  data,
Bool &  dataCanBeDisposed,
Result &  result 
) const
pure virtual

Create a single resource object from a given block of memory.

See CreateObjectFromFile().

Parameters
typeThe desired resource type.
paramsAn optional pointer to user-defined parameters used during creation.
dataA data object holding the data for the resource to create.
dataCanBeDisposedA reference to a boolean variable receiving true when it is safe to destroy the given data object right after resource creation. If false, the data object must be kept until the object was successfully destroyed via DestroyObject().
resultThe object to receive the result of the operation.
Returns
A pointer to the newly created resource object, or null if failed.

◆ DestroyObject()

virtual Bool Murl::Resource::IFactory::DestroyObject ( IObject *&  object) const
pure virtual

Destroy a previously created resource object.

Parameters
objectA reference to a pointer holding the object to destroy.
Returns
true if successful.

◆ CreateRawImage()

virtual IImage* Murl::Resource::IFactory::CreateRawImage ( IEnums::PixelFormat  pixelFormat,
UInt32  pixelSizeX,
UInt32  pixelSizeY 
) const
pure virtual

Create a raw image resource.

Parameters
pixelFormatThe pixel format to use.
pixelSizeXThe width of the image in pixels.
pixelSizeYThe height of the image in pixels.
Returns
A pointer to the newly created image resource, or null if failed.

◆ DestroyRawImage()

virtual Bool Murl::Resource::IFactory::DestroyRawImage ( IImage *&  image) const
pure virtual

Destroy a previously created image resource.

Parameters
imageA reference to a pointer holding the image to destroy.
Returns
true if successful.

◆ GetPlatformConfiguration()

virtual const IPlatformConfiguration* Murl::Resource::IFactory::GetPlatformConfiguration ( ) const
pure virtual

Get the current platform configuration.

Returns
A pointer to the platform configuration object.

◆ GetEngineConfiguration()

virtual const IEngineConfiguration* Murl::Resource::IFactory::GetEngineConfiguration ( ) const
pure virtual

Get the current engine configuration.

Returns
A pointer to the engine configuration object.

◆ GetAppConfiguration()

virtual const IAppConfiguration* Murl::Resource::IFactory::GetAppConfiguration ( ) const
pure virtual

Get the current app configuration.

Returns
A pointer to the app configuration object.

◆ GetFileInterface()

virtual IFileInterface* Murl::Resource::IFactory::GetFileInterface ( ) const
pure virtual

Get the current file interface.

Returns
A pointer to the file interface object.

◆ GetOutputDeviceHandler()

virtual const Output::IDeviceHandler* Murl::Resource::IFactory::GetOutputDeviceHandler ( ) const
pure virtual

Get the current output device handler.

Returns
A pointer to the output device handler object.

The documentation for this interface was generated from the following file:
  • murl_resource_i_factory.h


Copyright © 2011-2026 Spraylight GmbH.