The base interface for all resource objects. More...

#include "murl_resource_i_object.h"

Inheritance diagram for Murl::Resource::IObject:

Classes

class  ClassInfo
 The class information object. More...
 

Public Member Functions

virtual IObjectGetObjectInterface ()=0
 Get the mutable IObject interface. More...
 
virtual const IObjectGetObjectInterface () const =0
 Get the constant IObject interface. More...
 
virtual const IObjectFactoryGetCreator () 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 IPackageGetParentPackage () 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 IMetaDataGetMetaData () 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 StringArrayGetTags () 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 StringGetId () 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 StringGetFileName () 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 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 base interface for all resource objects.

Member Function Documentation

◆ GetObjectInterface() [1/2]

virtual IObject* Murl::Resource::IObject::GetObjectInterface ( )
pure virtual

Get the mutable IObject interface.

Returns
The IObject interface.

◆ GetObjectInterface() [2/2]

virtual const IObject* Murl::Resource::IObject::GetObjectInterface ( ) const
pure virtual

Get the constant IObject interface.

Returns
The IObject interface.

◆ GetCreator()

virtual const IObjectFactory* Murl::Resource::IObject::GetCreator ( ) const
pure virtual

Get the object factory used to create this object.

Returns
The object factory.

◆ SetParentPackage()

virtual Bool Murl::Resource::IObject::SetParentPackage ( const IPackage parentPackage)
pure virtual

Set the optional package this object belongs to.

Parameters
parentPackageThe containing package, or null for removing.
Returns
true if successful.

◆ GetParentPackage()

virtual const IPackage* Murl::Resource::IObject::GetParentPackage ( ) const
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()

virtual Bool Murl::Resource::IObject::SetMetaData ( const IMetaData metaData)
pure virtual

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
metaDataThe meta data, or null for removing.
Returns
true if successful.

◆ GetMetaData()

virtual const IMetaData* Murl::Resource::IObject::GetMetaData ( ) const
pure virtual

Get the optional meta data held by this object.

Returns
The meta data, or null if not present.

◆ SetTags()

virtual Bool Murl::Resource::IObject::SetTags ( const StringArray tags)
pure virtual

Set optional resource tags for this object.

Parameters
tagsThe resource tags.
Returns
true if successful.

◆ GetTags()

virtual const StringArray& Murl::Resource::IObject::GetTags ( ) const
pure virtual

Get the optional resource tags held by this object.

Returns
The resource tags.

◆ Init()

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

Initialize this object.

Returns
true if successful.

◆ DeInit()

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

De-initialize this object.

Returns
true if successful.

◆ CreateBinary()

virtual Bool Murl::Resource::IObject::CreateBinary ( Data data) const
pure virtual

Create a binary representation from the object.

Parameters
dataA reference to a Data object receiving the binary.
Returns
true if successful.

◆ GetId()

virtual const String& Murl::Resource::IObject::GetId ( ) const
pure virtual

Get the object's ID.

Returns
The object ID.

◆ GetResourceType()

virtual IEnums::ResourceType Murl::Resource::IObject::GetResourceType ( ) const
pure virtual

Get the object's actual resource type.

Returns
The resource type.

◆ GetFileType()

virtual IEnums::FileType Murl::Resource::IObject::GetFileType ( ) const
pure virtual

Get the type of file this resource object was constructed from.

Returns
The file type.

◆ GetFileCategory()

virtual IEnums::FileCategory Murl::Resource::IObject::GetFileCategory ( ) const
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()

virtual const String& Murl::Resource::IObject::GetFileName ( ) const
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()

virtual Bool Murl::Resource::IObject::GetParameters ( IAttributes params) const
pure virtual

Fill a given IAttributes object with the actual parameters used during creation.

Parameters
paramsAn attributes object receiving the parameters.
Returns
true if successful.

◆ GetValidationResults()

virtual Bool Murl::Resource::IObject::GetValidationResults ( ObjectArray< Result > &  results) const
pure virtual

Fill a given array with possible error or warning results from validating given parameters.

Parameters
resultsAn array of result objects.
Returns
true if successful.

◆ GetFileDependencies()

virtual Bool Murl::Resource::IObject::GetFileDependencies ( Array< String > &  fileNames) const
pure virtual

Fill a given string array with names of files the resource depends on.

Parameters
fileNamesA string array receiving the dependency file names.
Returns
true if successful.

◆ TakeDataOwnership()

virtual Bool Murl::Resource::IObject::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


Copyright © 2011-2024 Spraylight GmbH.