The base interface for all resource objects. More...
#include "murl_resource_i_object.h"
Classes | |
class | ClassInfo |
The class information object. More... | |
Public Member Functions | |
virtual IObject * | GetObjectInterface ()=0 |
Get the mutable IObject interface. More... | |
virtual const IObject * | GetObjectInterface () const =0 |
Get the constant IObject interface. More... | |
virtual const IObjectFactory * | GetCreator () const =0 |
Get the object factory used to create this object. More... | |
virtual Bool | SetParentPackage (const IPackage *parentPackage)=0 |
Set the optional package this object belongs to. More... | |
virtual const IPackage * | GetParentPackage () const =0 |
Get the optional package this object belongs to. More... | |
virtual Bool | SetMetaData (const IMetaData *metaData)=0 |
Set optional meta data for this object. More... | |
virtual const IMetaData * | GetMetaData () const =0 |
Get the optional meta data held by this object. More... | |
virtual Bool | SetTags (const StringArray &tags)=0 |
Set optional resource tags for this object. More... | |
virtual const StringArray & | GetTags () const =0 |
Get the optional resource tags held by this object. More... | |
virtual Bool | Init ()=0 |
Initialize this object. More... | |
virtual Bool | DeInit ()=0 |
De-initialize this object. More... | |
virtual Bool | CreateBinary (Data &data) const =0 |
Create a binary representation from the object. More... | |
virtual const String & | GetId () const =0 |
Get the object's ID. More... | |
virtual IEnums::ResourceType | GetResourceType () const =0 |
Get the object's actual resource type. More... | |
virtual IEnums::FileType | GetFileType () const =0 |
Get the type of file this resource object was constructed from. More... | |
virtual IEnums::FileCategory | GetFileCategory () const =0 |
Get the optional file category containing the file this resource was constructed from. More... | |
virtual const String & | GetFileName () const =0 |
Get the optional file name this resource was constructed from, relative to the file category returned via GetFileCategory(). More... | |
virtual Bool | GetParameters (IAttributes *params) const =0 |
Fill a given IAttributes object with the actual parameters used during creation. More... | |
virtual Bool | GetValidationResults (ObjectArray< Result > &results) const =0 |
Fill a given array with possible error or warning results from validating given parameters. More... | |
virtual Bool | GetFileDependencies (Array< String > &fileNames) const =0 |
Fill a given string array with names of files the resource depends on. More... | |
virtual Bool | TakeDataOwnership ()=0 |
Take ownership of the data buffer used to create the resource. 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. | |
Additional Inherited Members | |
Public Types inherited from Murl::IFactoryObject< IObject > | |
using | ClassInfoArray = Array< const ClassInfo * > |
Definition of an array of ClassInfo objects. | |
Static Public Member Functions inherited from Murl::IFactoryObject< IObject > | |
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< IObject > *object) |
Reset an object instance's properties to their default values. More... | |
Detailed Description
The base interface for all resource objects.
Member Function Documentation
◆ GetObjectInterface() [1/2]
|
pure virtual |
◆ GetObjectInterface() [2/2]
|
pure virtual |
◆ GetCreator()
|
pure virtual |
Get the object factory used to create this object.
- Returns
- The object factory.
◆ SetParentPackage()
|
pure virtual |
Set the optional package this object belongs to.
- Parameters
-
parentPackage The containing package, or null for removing.
- Returns
- true if successful.
◆ GetParentPackage()
|
pure virtual |
Get the optional package this object belongs to.
- Returns
- The containing package, or null if the object is not contained in a package.
◆ SetMetaData()
Set optional meta data for this object.
If set, the object takes ownership of the meta data. The meta data object is automatically deleted when the object is destroyed, or a different meta data object is set.
- Parameters
-
metaData The meta data, or null for removing.
- Returns
- true if successful.
◆ GetMetaData()
|
pure virtual |
Get the optional meta data held by this object.
- Returns
- The meta data, or null if not present.
◆ SetTags()
|
pure virtual |
Set optional resource tags for this object.
- Parameters
-
tags The resource tags.
- Returns
- true if successful.
◆ GetTags()
|
pure virtual |
Get the optional resource tags held by this object.
- Returns
- The resource tags.
◆ Init()
|
pure virtual |
Initialize this object.
- Returns
- true if successful.
◆ DeInit()
|
pure virtual |
De-initialize this object.
- Returns
- true if successful.
◆ CreateBinary()
Create a binary representation from the object.
- Parameters
-
data A reference to a Data object receiving the binary.
- Returns
- true if successful.
◆ GetId()
|
pure virtual |
Get the object's ID.
- Returns
- The object ID.
◆ GetResourceType()
|
pure virtual |
Get the object's actual resource type.
- Returns
- The resource type.
◆ GetFileType()
|
pure virtual |
Get the type of file this resource object was constructed from.
- Returns
- The file type.
◆ GetFileCategory()
|
pure virtual |
Get the optional file category containing the file this resource was constructed from.
- Returns
- The file category, or IEnums::FILE_CATEGORY_DEFAULT if the resource was constructed directly from memory.
◆ GetFileName()
|
pure virtual |
Get the optional file name this resource was constructed from, relative to the file category returned via GetFileCategory().
- Returns
- The file name, or an empty string if the resource was constructed directly from memory.
◆ GetParameters()
|
pure virtual |
Fill a given IAttributes object with the actual parameters used during creation.
- Parameters
-
params An attributes object receiving the parameters.
- Returns
- true if successful.
◆ GetValidationResults()
|
pure virtual |
Fill a given array with possible error or warning results from validating given parameters.
- Parameters
-
results An array of result objects.
- Returns
- true if successful.
◆ GetFileDependencies()
|
pure virtual |
Fill a given string array with names of files the resource depends on.
- Parameters
-
fileNames A string array receiving the dependency file names.
- Returns
- true if successful.
◆ TakeDataOwnership()
|
pure virtual |
Take ownership of the data buffer used to create the resource.
After taking ownership, the resource object will delete the underlying data when the resource itself is deleted. The caller must ensure that the given data is not deallocated in a different place.
- Returns
- true if successful.
The documentation for this interface was generated from the following file:
- murl_resource_i_object.h