FileFormatInterface Class Reference

#include <fileformat.h>

Inheritance diagram for FileFormatInterface:

详细描述

FileFormatInterface allows to implement and register file formats with its detection algorithm. The FileFormats registry allows to register any format (e.g. FileFormats::Browsable, FileFormats::ImageJpg...).

公共成员函数

MAXON_METHOD Result < Bool Detect (const Url &url, const InputStreamRef &probeStream) const

私有成员函数

  MAXON_INTERFACE ( FileFormatInterface , MAXON_REFERENCE_CONST , "net.maxon.interface.fileformat")
Result < void >  SetData ( ForwardingDataPtr &&key, 数据 &&data)=delete

成员函数文档编制

◆  MAXON_INTERFACE()

MAXON_INTERFACE ( FileFormatInterface   ,
MAXON_REFERENCE_CONST   ,
"net.maxon.interface.fileformat"   
)
private

◆  SetData()

Result <void> SetData ( ForwardingDataPtr &&  key ,
数据 &&  data  
)
private delete

◆  Detect()

MAXON_METHOD Result < Bool > Detect ( const Url url ,
const InputStreamRef &  probeStream  
) const

For implementations to check if a given url/stream supports this file format. You should never call this function directly. It's triggered by FileFormatDetectionInterface::Detect() /DetectAll().

参数
[in] url Url to check.
[in] probeStream Optional parameter that allows to read content in case that the url is a file. This stream is not a plain file stream but wraps a memory cache stream which allows to seek and read already loaded data without overhead.
返回
Returns true if the url/stream fits to this file format implementation.