FileFormatHandlerInterface Class Reference

#include <fileformat_handler.h>

Inheritance diagram for FileFormatHandlerInterface:

详细描述

FileFormatHandlerInterface implements a handler for a specific FileFormat. E.g. two different implementations could offer different loaders for one and the same FileFormat. FileFormat::Zip implements one handler for Directory Browsing (IoBrowseRef) and one for ReadArchiveRef.

公共成员函数

const MAXON_METHOD FileFormat &  GetFileFormat () const
MAXON_METHOD Result < DataType GetHandlerType () const
MAXON_METHOD Result < ObjectRef >  CreateHandler (const Url &url) const
template<typename HANDLER >
MAXON_FUNCTION Result < HANDLER >  CreateHandler (const Url &url) const
MAXON_METHOD FILEFORMAT_PRIORITY   GetDependends () const

私有成员函数

  MAXON_INTERFACE ( FileFormatHandlerInterface , MAXON_REFERENCE_CONST , "net.maxon.interface.fileformathandler")

成员函数文档编制

◆  MAXON_INTERFACE()

MAXON_INTERFACE ( FileFormatHandlerInterface   ,
MAXON_REFERENCE_CONST   ,
"net.maxon.interface.fileformathandler"   
)
private

◆  GetFileFormat()

const MAXON_METHOD FileFormat& GetFileFormat ( ) const

Returns the FileFormat which is handled by this FileFormatHandler.

◆  GetHandlerType()

MAXON_METHOD Result < DataType > GetHandlerType ( ) const

Returns the datatype of the reference class of the handler returned by CreateHandler() .

◆  CreateHandler() [1/2]

MAXON_METHOD Result <ObjectRef> CreateHandler ( const Url url ) const

Creates an ObjectRef which handles the given url with the generic interface. CreateHandler<InterfaceRef>() can be used to get the expected reference in the right format. E.g. FileFormat::Zip implements one handler for Directory Browsing "IoBrowseRef" and one for working with archives "ReadArchiveRef".

参数
[in] url Url to be used with this handler.

◆  CreateHandler() [2/2]

MAXON_FUNCTION Result <HANDLER> CreateHandler ( const Url url ) const

Creates an ObjectRef which handles the given url with the specific interface. E.g. FileFormat::Zip implements one handler for Directory Browsing "IoBrowseRef" and one for workign with archives "ReadArchiveRef".

参数
[in] url Url to be used with this handler.
Template Parameters
HANDLER Reference class to be expected with the result of CreateHandler.

◆  GetDependends()

MAXON_METHOD FILEFORMAT_PRIORITY GetDependends ( ) const

Returns the dependencies of this FileFormatHandler. This allows to give an priority order for a implementation. This function should not be called except from FileFormatDetectionInterface::DetectAll() .