Open 3D Engine Compression Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Compression::CompressionRegistrarImpl Class Referencefinal

Inherits Compression::CompressionRegistrarInterface.

Classes

struct  CompressionInterfaceDeleter
 

Public Member Functions

 AZ_TYPE_INFO_WITH_NAME_DECL (CompressionRegistrarImpl)
 
 AZ_RTTI_NO_TYPE_INFO_DECL ()
 
void VisitCompressionInterfaces (const VisitCompressionInterfaceCallback &) const override
 Invokes the supplied visitor for each register compression interface that is non-nullptr.
 
AZ::Outcome< void, AZStd::unique_ptr< ICompressionInterface > > RegisterCompressionInterface (CompressionAlgorithmId algorithmId, AZStd::unique_ptr< ICompressionInterface > compressionInterface) override
 Registers a compression interface with a standard deleter.
 
bool RegisterCompressionInterface (CompressionAlgorithmId algorithmId, ICompressionInterface &compressionInterface) override
 Registers a compression interface with a null deleter.
 
bool UnregisterCompressionInterface (CompressionAlgorithmId algorithmId) override
 
ICompressionInterfaceFindCompressionInterface (CompressionAlgorithmId algorithmId) const override
 
ICompressionInterfaceFindCompressionInterface (AZStd::string_view algorithmName) const override
 
bool IsRegistered (CompressionAlgorithmId algorithmId) const override
 
- Public Member Functions inherited from Compression::CompressionRegistrarInterface
 AZ_TYPE_INFO_WITH_NAME_DECL (CompressionRegistrarInterface)
 
 AZ_RTTI_NO_TYPE_INFO_DECL ()
 
virtual void VisitCompressionInterfaces (const VisitCompressionInterfaceCallback &) const =0
 Invokes the supplied visitor for each register compression interface that is non-nullptr.
 
virtual AZ::Outcome< void, AZStd::unique_ptr< ICompressionInterface > > RegisterCompressionInterface (CompressionAlgorithmId compressionAlgorithmId, AZStd::unique_ptr< ICompressionInterface > compressionInterface)=0
 
virtual bool RegisterCompressionInterface (CompressionAlgorithmId compressionAlgorithmId, ICompressionInterface &compressionInterface)=0
 
virtual bool UnregisterCompressionInterface (CompressionAlgorithmId compressionAlgorithmId)=0
 
virtual ICompressionInterfaceFindCompressionInterface (CompressionAlgorithmId compressionAlgorithmId) const =0
 
virtual ICompressionInterfaceFindCompressionInterface (AZStd::string_view algorithmName) const =0
 
virtual bool IsRegistered (CompressionAlgorithmId compressionAlgorithmId) const =0
 

Public Attributes

 AZ_CLASS_ALLOCATOR_DECL
 

Additional Inherited Members

- Public Types inherited from Compression::CompressionRegistrarInterface
using VisitCompressionInterfaceCallback = AZStd::function< bool(ICompressionInterface &)>
 

Member Function Documentation

◆ FindCompressionInterface() [1/2]

ICompressionInterface * Compression::CompressionRegistrarImpl::FindCompressionInterface ( AZStd::string_view  algorithmName) const
overridevirtual

Queries the compression interface using the name of the compression algorithm This is slower than the using the compression algorithm ID. Furthermore the algorithm name doesn't have to be unique, so this will return the first compression interface associated with the algorithm name

Parameters
algorithmNameName of the compression algorithm. NOTE: The compression algorithm name is not checked for uniqueness, unlike the algorithm id
Returns
pointer to the compression interface or nullptr if not found

Implements Compression::CompressionRegistrarInterface.

◆ FindCompressionInterface() [2/2]

ICompressionInterface * Compression::CompressionRegistrarImpl::FindCompressionInterface ( CompressionAlgorithmId  compressionAlgorithmId) const
overridevirtual

Queries the compression interface with the compression algorithm Id

Parameters
compressionAlgorithmIdunique Id of compression interface to query
Returns
pointer to the compression interface or nullptr if not found

Implements Compression::CompressionRegistrarInterface.

◆ IsRegistered()

bool Compression::CompressionRegistrarImpl::IsRegistered ( CompressionAlgorithmId  compressionAlgorithmId) const
overridevirtual

Return true if there is an compression interface registered with the specified id

Parameters
compressionAlgorithmIdCompressionAlgorithmId to determine if an compression interface is registered
Returns
bool indicating if there is an compression interface with the id registered

Implements Compression::CompressionRegistrarInterface.

◆ RegisterCompressionInterface() [1/2]

AZ::Outcome< void, AZStd::unique_ptr< ICompressionInterface > > Compression::CompressionRegistrarImpl::RegisterCompressionInterface ( CompressionAlgorithmId  algorithmId,
AZStd::unique_ptr< ICompressionInterface compressionInterface 
)
overridevirtual

Registers a compression interface with a standard deleter.

Implements Compression::CompressionRegistrarInterface.

◆ RegisterCompressionInterface() [2/2]

bool Compression::CompressionRegistrarImpl::RegisterCompressionInterface ( CompressionAlgorithmId  algorithmId,
ICompressionInterface compressionInterface 
)
overridevirtual

Registers a compression interface with a null deleter.

Implements Compression::CompressionRegistrarInterface.

◆ UnregisterCompressionInterface()

bool Compression::CompressionRegistrarImpl::UnregisterCompressionInterface ( CompressionAlgorithmId  compressionAlgorithmId)
overridevirtual

Unregisters the compression interface with the specified id

Parameters
compressionAlgorithmIdunique Id that identifies the compression interface
Returns
true if the unregistration is successful

Implements Compression::CompressionRegistrarInterface.

◆ VisitCompressionInterfaces()

void Compression::CompressionRegistrarImpl::VisitCompressionInterfaces ( const VisitCompressionInterfaceCallback ) const
overridevirtual

Invokes the supplied visitor for each register compression interface that is non-nullptr.

Implements Compression::CompressionRegistrarInterface.


The documentation for this class was generated from the following file: