![]() |
Murl Engine API
Version 2018.3
|
The IPackageFactory interface. More...
#include <murl_resource_i_package_factory.h>
The IPackageFactory interface.
Public Member Functions | |
virtual Bool | Init ()=0 |
Initialize the factory. More... | |
virtual Bool | DeInit ()=0 |
Deinitialize the factory. More... | |
virtual IPackage * | CreatePackageFromFile (const String &id, const String &fileName, IEnums::FileCategory fileCategory, Result &result) const =0 |
Create a resource package from a file. More... | |
virtual IPackage * | CreatePackageFromMemory (const String &id, const String &fileName, IEnums::FileCategory fileCategory, const ConstData &data, Bool &dataCanBeDisposed, Result &result) const =0 |
Create a resource package from a block of memory. More... | |
virtual Bool | DestroyPackage (IPackage *&package) const =0 |
Destroy a previously created package. More... | |
virtual Bool | QueryPackageFromFile (const String &fileName, IEnums::FileCategory fileCategory, String *id, UInt32 *revision, Bool *isDataValid, Bool *isVersionValid, Bool *isChecksumValid) const =0 |
Query information about a package file. More... | |
virtual Bool | QueryPackageFromFile (const String &fileName, IEnums::FileCategory fileCategory, IEnums::ResourceType *resourceType, IEnums::FileType *fileType, String *id, UInt32 *revision, Bool *isDataValid, Bool *isVersionValid, Bool *isChecksumValid) const =0 |
Query information about a package file. More... | |
virtual Bool | QueryPackageFromMemory (const ConstData &data, String *id, UInt32 *revision, Bool *isDataValid, Bool *isVersionValid, Bool *isChecksumValid) const =0 |
Query information about a package in memory. More... | |
virtual Bool | QueryPackageFromMemory (const ConstData &data, IEnums::ResourceType *resourceType, IEnums::FileType *fileType, String *id, UInt32 *revision, Bool *isDataValid, Bool *isVersionValid, Bool *isChecksumValid) const =0 |
Query information about a package in memory. More... | |
virtual const IFactory * | GetResourceFactory () const =0 |
Get the main resource factory. More... | |
![]() | |
virtual | ~IFactoryObject () |
The destructor. More... | |
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. | |
![]() | |
virtual Bool | RegisterPackageClass (const IPackage::ClassInfo &packageClassInfo, const IObjectFactory *objectFactory, const String &fileNamePattern)=0 |
Register a package class. More... | |
virtual Bool | UnregisterPackageClass (const IPackage::ClassInfo &packageClassInfo, const IObjectFactory *objectFactory, const String &fileNamePattern)=0 |
Unregister a previously registered package class/object factory/file name pattern combination. More... | |
virtual SInt32 | GetRegisteredPackageClassInfoIndex (const IPackage::ClassInfo &classInfo) const =0 |
Query the first index of a registered package class, by its ClassInfo structure. More... | |
virtual SInt32 | GetRegisteredPackageClassInfoIndex (const String &className) const =0 |
Query the first index of a registered package class, by its class name. More... | |
virtual UInt32 | GetNumberOfRegisteredPackageClassInfos () const =0 |
Get the total number of registered package classes. More... | |
virtual const IPackage::ClassInfo * | GetRegisteredPackageClassInfo (UInt32 index) const =0 |
Get the ClassInfo structure of a registered package class. More... | |
virtual const String & | GetRegisteredPackageClassInfoFileNamePattern (UInt32 index) const =0 |
Get the file name pattern of a registered package class. More... | |
virtual const IObjectFactory * | GetRegisteredPackageClassInfoObjectFactory (UInt32 index) const =0 |
Get the associated object factory of a registered package class. More... | |
Additional Inherited Members | |
![]() | |
typedef Array< const ClassInfo *> | ClassInfoArray |
Definition of an array of ClassInfo objects. More... | |
![]() | |
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< IPackageFactory > *object) |
Reset an object instance's properties to their default values. More... | |
|
pure virtual |
Initialize the factory.
|
pure virtual |
Deinitialize the factory.
|
pure virtual |
Create a resource package from a file.
id | The internal package ID. |
fileName | The name of the package file, relative to the given file category below. |
fileCategory | The file system category where to look for the given file. |
result | The object to receive the result of the operation. |
|
pure virtual |
Create a resource package from a block of memory.
id | The internal package ID. |
fileName | The file name of the package, relative to which any individual file sub-resources/-packages are accessed from the file system. |
fileCategory | The file system category to prepend to the file name. |
data | The binary package data. |
dataCanBeDisposed | A reference to a Bool variable receiving true whenever it is safe to delete the input data right after package creation. If this value receives false, the input data must be kept until the package is destroyed using DestroyPackage(). |
result | The object to receive the result of the operation. |
|
pure virtual |
Destroy a previously created package.
package | A reference to a pointer holding the package to destroy. |
|
pure virtual |
Query information about a package file.
fileName | The name of the package file, relative to the given file category below. |
fileCategory | The file system category where to look for the given file. |
id | An optional pointer to receive the package ID, if present. |
revision | An optional pointer to receive the user-defined package revision, if present. |
isDataValid | An optional pointer to receive the result of the overall data validity check. |
isVersionValid | An optional pointer to receive the result of the version check. |
isChecksumValid | An optional pointer to receive the result of the checksum comparison, if the package does include one. |
|
pure virtual |
Query information about a package file.
fileName | The name of the package file, relative to the given file category below. |
fileCategory | The file system category where to look for the given file. |
resourceType | An optional pointer to receive the package resource type. |
fileType | An optional pointer to receive the package file type. |
id | An optional pointer to receive the package ID, if present. |
revision | An optional pointer to receive the user-defined package revision, if present. |
isDataValid | An optional pointer to receive the result of the overall data validity check. |
isVersionValid | An optional pointer to receive the result of the version check. |
isChecksumValid | An optional pointer to receive the result of the checksum comparison, if the package does include one. |
|
pure virtual |
Query information about a package in memory.
data | The binary package data. |
id | An optional pointer to receive the package ID, if present. |
revision | An optional pointer to receive the user-defined package revision, if present. |
isDataValid | An optional pointer to receive the result of the overall data validity check. |
isVersionValid | An optional pointer to receive the result of the version check. |
isChecksumValid | An optional pointer to receive the result of the checksum comparison, if the package does include one. |
|
pure virtual |
Query information about a package in memory.
data | The binary package data. |
resourceType | An optional pointer to receive the package resource type. |
fileType | An optional pointer to receive the package file type. |
id | An optional pointer to receive the package ID, if present. |
revision | An optional pointer to receive the user-defined package revision, if present. |
isDataValid | An optional pointer to receive the result of the overall data validity check. |
isVersionValid | An optional pointer to receive the result of the version check. |
isChecksumValid | An optional pointer to receive the result of the checksum comparison, if the package does include one. |
|
pure virtual |
Get the main resource factory.