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 UInt32 GetNumberOfCollectionFactories () const =0
 Get the total number of known collection factories. More...
 
virtual ICollectionFactoryGetCollectionFactory (UInt32 index)=0
 Get the collection factory at a given index. More...
 
virtual const ICollectionFactoryGetCollectionFactory (UInt32 index) const =0
 Get the collection factory at a given index. More...
 
virtual ICollectionFactoryGetDefaultCollectionFactory ()=0
 Get the default collection factory. More...
 
virtual const ICollectionFactoryGetDefaultCollectionFactory () const =0
 Get the default collection factory. More...
 
virtual ICollectionFactoryGetCollectionFactory (const String &className)=0
 Get a known collection factory by its class name. More...
 
virtual const ICollectionFactoryGetCollectionFactory (const String &className) const =0
 Get a known collection factory by its class name. More...
 
virtual ICollectionFactoryGetCollectionFactory (const ICollectionFactory::ClassInfo &classInfo)=0
 Get a known collection factory by its class info structure. More...
 
virtual const ICollectionFactoryGetCollectionFactory (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 IPackageFactoryGetPackageFactory (UInt32 index)=0
 Get the package factory at a given index. More...
 
virtual const IPackageFactoryGetPackageFactory (UInt32 index) const =0
 Get the package factory at a given index. More...
 
virtual IPackageFactoryGetDefaultPackageFactory ()=0
 Get the default package factory. More...
 
virtual const IPackageFactoryGetDefaultPackageFactory () const =0
 Get the default package factory. More...
 
virtual IPackageFactoryGetPackageFactory (const String &className)=0
 Get a known package factory by its class name. More...
 
virtual const IPackageFactoryGetPackageFactory (const String &className) const =0
 Get a known package factory by its class name. More...
 
virtual IPackageFactoryGetPackageFactory (const IPackageFactory::ClassInfo &classInfo)=0
 Get a known package factory by its class info structure. More...
 
virtual const IPackageFactoryGetPackageFactory (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 IObjectFactoryGetObjectFactory (UInt32 index)=0
 Get the object factory at a given index. More...
 
virtual const IObjectFactoryGetObjectFactory (UInt32 index) const =0
 Get the object factory at a given index. More...
 
virtual IObjectFactoryGetDefaultObjectFactory ()=0
 Get the default object factory. More...
 
virtual const IObjectFactoryGetDefaultObjectFactory () const =0
 Get the default object factory. More...
 
virtual IObjectFactoryGetObjectFactory (const String &className)=0
 Get a known object factory by its class name. More...
 
virtual const IObjectFactoryGetObjectFactory (const String &className) const =0
 Get a known object factory by its class name. More...
 
virtual IObjectFactoryGetObjectFactory (const IObjectFactory::ClassInfo &classInfo)=0
 Get a known object factory by its class info structure. More...
 
virtual const IObjectFactoryGetObjectFactory (const IObjectFactory::ClassInfo &classInfo) const =0
 Get a known object factory by its class info structure. More...
 
virtual ICollectionCreateDefaultCollection () const =0
 Create a default resource collection. More...
 
virtual ICollectionCreateCollection (const String &className) const =0
 Create a resource collection using a given collection class name. More...
 
virtual ICollectionCreateCollection (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 IObjectCreateObjectFromFile (IEnums::ResourceType type, const String &fileName) const =0
 Create a single resource object from a given file. More...
 
virtual IObjectCreateObjectFromFile (IEnums::ResourceType type, const String &fileName, Result &result) const =0
 Create a single resource object from a given file. More...
 
virtual IObjectCreateObjectFromFile (IEnums::ResourceType type, const IAttributes *params, const String &fileName) const =0
 Create a single resource object from a given file. More...
 
virtual IObjectCreateObjectFromFile (IEnums::ResourceType type, const IAttributes *params, const String &fileName, Result &result) const =0
 Create a single resource object from a given file. More...
 
virtual IObjectCreateObjectFromMemory (IEnums::ResourceType type, const ConstData &data, Bool &dataCanBeDisposed) const =0
 Create a single resource object from a given block of memory. More...
 
virtual IObjectCreateObjectFromMemory (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 IObjectCreateObjectFromMemory (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 IObjectCreateObjectFromMemory (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 IImageCreateRawImage (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 IPlatformConfigurationGetPlatformConfiguration () const =0
 Get the current platform configuration. More...
 
virtual const IEngineConfigurationGetEngineConfiguration () const =0
 Get the current engine configuration. More...
 
virtual const IAppConfigurationGetAppConfiguration () const =0
 Get the current app configuration. More...
 
virtual IFileInterfaceGetFileInterface () const =0
 Get the current file interface. More...
 
virtual const Output::IDeviceHandlerGetOutputDeviceHandler () 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 ICollectionFactoryRegistryGetCollectionFactoryRegistry (UInt32 index)=0
 Get the registry interface of the collection factory at a given index. More...
 
virtual const ICollectionFactoryRegistryGetCollectionFactoryRegistry (UInt32 index) const =0
 Get the registry interface of the collection factory at a given index. More...
 
virtual ICollectionFactoryRegistryGetDefaultCollectionFactoryRegistry ()=0
 Get the registry interface of the default collection factory. More...
 
virtual const ICollectionFactoryRegistryGetDefaultCollectionFactoryRegistry () const =0
 Get the registry interface of the default collection factory. More...
 
virtual ICollectionFactoryRegistryGetCollectionFactoryRegistry (const String &className)=0
 Get the registry interface of a known collection factory by its class name. More...
 
virtual const ICollectionFactoryRegistryGetCollectionFactoryRegistry (const String &className) const =0
 Get the registry interface of a known collection factory by its class name. More...
 
virtual ICollectionFactoryRegistryGetCollectionFactoryRegistry (const ICollectionFactory::ClassInfo &classInfo)=0
 Get the registry interface of a known collection factory by its class info structure. More...
 
virtual const ICollectionFactoryRegistryGetCollectionFactoryRegistry (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 IPackageFactoryRegistryGetPackageFactoryRegistry (UInt32 index)=0
 Get the registry interface of the package factory at a given index. More...
 
virtual const IPackageFactoryRegistryGetPackageFactoryRegistry (UInt32 index) const =0
 Get the registry interface of the package factory at a given index. More...
 
virtual IPackageFactoryRegistryGetDefaultPackageFactoryRegistry ()=0
 Get the registry interface of the default package factory. More...
 
virtual const IPackageFactoryRegistryGetDefaultPackageFactoryRegistry () const =0
 Get the registry interface of the default package factory. More...
 
virtual IPackageFactoryRegistryGetPackageFactoryRegistry (const String &className)=0
 Get the registry interface of a known package factory by its class name. More...
 
virtual const IPackageFactoryRegistryGetPackageFactoryRegistry (const String &className) const =0
 Get the registry interface of a known package factory by its class name. More...
 
virtual IPackageFactoryRegistryGetPackageFactoryRegistry (const IPackageFactory::ClassInfo &classInfo)=0
 Get the registry interface of a known package factory by its class info structure. More...
 
virtual const IPackageFactoryRegistryGetPackageFactoryRegistry (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 IObjectFactoryRegistryGetObjectFactoryRegistry (UInt32 index)=0
 Get the registry interface of the object factory at a given index. More...
 
virtual const IObjectFactoryRegistryGetObjectFactoryRegistry (UInt32 index) const =0
 Get the registry interface of the object factory at a given index. More...
 
virtual IObjectFactoryRegistryGetDefaultObjectFactoryRegistry ()=0
 Get the registry interface of the default object factory. More...
 
virtual const IObjectFactoryRegistryGetDefaultObjectFactoryRegistry () const =0
 Get the registry interface of the default object factory. More...
 
virtual IObjectFactoryRegistryGetObjectFactoryRegistry (const String &className)=0
 Get the registry interface of a known object factory by its class name. More...
 
virtual const IObjectFactoryRegistryGetObjectFactoryRegistry (const String &className) const =0
 Get the registry interface of a known object factory by its class name. More...
 
virtual IObjectFactoryRegistryGetObjectFactoryRegistry (const IObjectFactory::ClassInfo &classInfo)=0
 Get the registry interface of a known object factory by its class info structure. More...
 
virtual const IObjectFactoryRegistryGetObjectFactoryRegistry (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.

◆ 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-2018 Spraylight GmbH.