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::CompressionRegistrarInterface Class Referenceabstract

Inherited by Compression::CompressionRegistrarImpl.

Public Types

using VisitCompressionInterfaceCallback = AZStd::function< bool(ICompressionInterface &)>
 

Public Member Functions

 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
 

Member Typedef Documentation

◆ VisitCompressionInterfaceCallback

Callback function that is invoked for every registered compression interface return true to indicate that visitation of compression interfaces should continue returning false halts iteration

Member Function Documentation

◆ FindCompressionInterface() [1/2]

virtual ICompressionInterface * Compression::CompressionRegistrarInterface::FindCompressionInterface ( AZStd::string_view  algorithmName) const
pure virtual

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

Implemented in Compression::CompressionRegistrarImpl.

◆ FindCompressionInterface() [2/2]

virtual ICompressionInterface * Compression::CompressionRegistrarInterface::FindCompressionInterface ( CompressionAlgorithmId  compressionAlgorithmId) const
pure virtual

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

Implemented in Compression::CompressionRegistrarImpl.

◆ IsRegistered()

virtual bool Compression::CompressionRegistrarInterface::IsRegistered ( CompressionAlgorithmId  compressionAlgorithmId) const
pure virtual

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

Implemented in Compression::CompressionRegistrarImpl.

◆ RegisterCompressionInterface() [1/2]

virtual AZ::Outcome< void, AZStd::unique_ptr< ICompressionInterface > > Compression::CompressionRegistrarInterface::RegisterCompressionInterface ( CompressionAlgorithmId  compressionAlgorithmId,
AZStd::unique_ptr< ICompressionInterface compressionInterface 
)
pure virtual

Registers compression interface and takes ownership of it if registration is successful

Parameters
compressionAlgorithmIdUnique id to associate with compression interface
compressionInterfacecompression interface to register
Returns
Success outcome if the compression interface was successfully registered Otherwise, a failure outcome with the compression interface is forward back to the caller

Implemented in Compression::CompressionRegistrarImpl.

◆ RegisterCompressionInterface() [2/2]

virtual bool Compression::CompressionRegistrarInterface::RegisterCompressionInterface ( CompressionAlgorithmId  compressionAlgorithmId,
ICompressionInterface compressionInterface 
)
pure virtual

Registers compression interface, but does not take ownership of it If a compression interface with a CompressionAlgorithmId is registered that matches the input compression interface, then registration does not occur

Registers compression interface, but does not take ownership of it

Parameters
compressionAlgorithmIdUnique id to associate with compression interface
compressionInterfacecompression interface to register
Returns
true if the ICompressionInterface was successfully registered

Implemented in Compression::CompressionRegistrarImpl.

◆ UnregisterCompressionInterface()

virtual bool Compression::CompressionRegistrarInterface::UnregisterCompressionInterface ( CompressionAlgorithmId  compressionAlgorithmId)
pure virtual

Unregisters the compression interface with the specified id

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

Implemented in Compression::CompressionRegistrarImpl.

◆ VisitCompressionInterfaces()

virtual void Compression::CompressionRegistrarInterface::VisitCompressionInterfaces ( const VisitCompressionInterfaceCallback ) const
pure virtual

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

Implemented in Compression::CompressionRegistrarImpl.


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