Murl::Resource::IPackageFactoryRegistry Interface Referenceabstract

The IPackageFactoryRegistry interface. More...

#include "murl_resource_i_package_factory_registry.h"

Inheritance diagram for Murl::Resource::IPackageFactoryRegistry:

Public Member Functions

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::ClassInfoGetRegisteredPackageClassInfo (UInt32 index) const =0
 Get the ClassInfo structure of a registered package class. More...
 
virtual const StringGetRegisteredPackageClassInfoFileNamePattern (UInt32 index) const =0
 Get the file name pattern of a registered package class. More...
 
virtual const IObjectFactoryGetRegisteredPackageClassInfoObjectFactory (UInt32 index) const =0
 Get the associated object factory of a registered package class. More...
 

Detailed Description

The IPackageFactoryRegistry interface.

The IPackageFactoryRegistry interface provides methods to add, remove and query different package classes that can be instantiated using the Resource::IPackageFactory implementing this interface.

Member Function Documentation

◆ RegisterPackageClass()

virtual Bool Murl::Resource::IPackageFactoryRegistry::RegisterPackageClass ( const IPackage::ClassInfo packageClassInfo,
const IObjectFactory objectFactory,
const String fileNamePattern 
)
pure virtual

Register a package class.

A specific package factory class may be registered multiple times with (mandatory) different file name patterns, and a possibly different object factory used for object creation.

Parameters
packageClassInfoThe ClassInfo structure of the package to register.
objectFactoryThe actual object factory used to create individual resource objects from within the package.
fileNamePatternThe file name pattern used to identify packages of this type, e.g. "murlpkg" or "murlres/package.xml".
Returns
true if successful.

◆ UnregisterPackageClass()

virtual Bool Murl::Resource::IPackageFactoryRegistry::UnregisterPackageClass ( const IPackage::ClassInfo packageClassInfo,
const IObjectFactory objectFactory,
const String fileNamePattern 
)
pure virtual

Unregister a previously registered package class/object factory/file name pattern combination.

Parameters
packageClassInfoThe ClassInfo structure of the package to unregister.
objectFactoryThe object factory the given package class was registered with.
fileNamePatternThe file name pattern the given package class was registered with.
Returns
true if successful.

◆ GetRegisteredPackageClassInfoIndex() [1/2]

virtual SInt32 Murl::Resource::IPackageFactoryRegistry::GetRegisteredPackageClassInfoIndex ( const IPackage::ClassInfo classInfo) const
pure virtual

Query the first index of a registered package class, by its ClassInfo structure.

Parameters
classInfoThe class info structure of the package class to query.
Returns
The zero-based index, or -1 if not registered.

◆ GetRegisteredPackageClassInfoIndex() [2/2]

virtual SInt32 Murl::Resource::IPackageFactoryRegistry::GetRegisteredPackageClassInfoIndex ( const String className) const
pure virtual

Query the first index of a registered package class, by its class name.

Parameters
classNameThe name of the package class to query.
Returns
The zero-based index, or -1 if not registered.

◆ GetNumberOfRegisteredPackageClassInfos()

virtual UInt32 Murl::Resource::IPackageFactoryRegistry::GetNumberOfRegisteredPackageClassInfos ( ) const
pure virtual

Get the total number of registered package classes.

Returns
The number of registered package classes.

◆ GetRegisteredPackageClassInfo()

virtual const IPackage::ClassInfo* Murl::Resource::IPackageFactoryRegistry::GetRegisteredPackageClassInfo ( UInt32  index) const
pure virtual

Get the ClassInfo structure of a registered package class.

Parameters
indexThe index to query, from 0 to GetNumberOfRegisteredPackageClassInfos()-1.
Returns
The class info, or null if the index is out of range.

◆ GetRegisteredPackageClassInfoFileNamePattern()

virtual const String& Murl::Resource::IPackageFactoryRegistry::GetRegisteredPackageClassInfoFileNamePattern ( UInt32  index) const
pure virtual

Get the file name pattern of a registered package class.

Parameters
indexThe index to query, from 0 to GetNumberOfRegisteredPackageClassInfos()-1.
Returns
The name pattern, or an empty string if the index is out of range.

◆ GetRegisteredPackageClassInfoObjectFactory()

virtual const IObjectFactory* Murl::Resource::IPackageFactoryRegistry::GetRegisteredPackageClassInfoObjectFactory ( UInt32  index) const
pure virtual

Get the associated object factory of a registered package class.

Parameters
indexThe index to query, from 0 to GetNumberOfRegisteredPackageClassInfos()-1.
Returns
The object factory, or null if the index is out of range.

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


Copyright © 2011-2024 Spraylight GmbH.