FileFormatDetectionInterface Class Reference

#include <fileformat_handler.h>

详细描述

FileFormatDetectionInterface offers functions to detect file formats.

Public Types

using  DetectedCallback = Delegate < Result < Bool >(const Url &url, const FileFormatHandler &handler)>

公共成员函数

template<typename... LIMITTYPES>
Result < BaseArray < FileFormatHandler > >  DetectAll (const Url &url, const DetectedCallback &detectedCallback)
template<typename... LIMITTYPES>
Result < FileFormatHandler >  Detect (const Url &url)

静态公共成员函数

static MAXON_METHOD Result < BaseArray < FileFormatHandler > >  DetectAll (const Url &url, const Block < const DataType > &limitDetection, const DetectedCallback &detectedCallback)
template<typename... LIMITTYPES>
static MAXON_WARN_UNUSED MAXON_FUNCTION Result < BaseArray < FileFormatHandler > >  DetectAll (const Url &url, const DetectedCallback &detectedCallback)
template<typename... LIMITTYPES>
static MAXON_WARN_UNUSED MAXON_FUNCTION Result < FileFormatHandler >  Detect (const Url &url)

私有成员函数

  MAXON_INTERFACE_NONVIRTUAL ( FileFormatDetectionInterface , MAXON_REFERENCE_NONE , "net.maxon.interface.fileformatdetection")

Member Typedef Documentation

◆  DetectedCallback

using DetectedCallback = Delegate < Result < Bool >(const Url & url, const FileFormatHandler& handler)>
返回
The callback should return true if the file format detection should stop at this point. Returning false will search other compatible fileformat handlers. If you return a error the search will be continued. If no valid handler can be found the first error will be returned as the result of DetectAll() .

成员函数文档编制

◆  MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( FileFormatDetectionInterface   ,
MAXON_REFERENCE_NONE   ,
"net.maxon.interface.fileformatdetection"   
)
private

◆  DetectAll() [1/3]

static MAXON_METHOD Result < BaseArray <FileFormatHandler> > DetectAll ( const Url url ,
const Block < const DataType > &  limitDetection ,
const DetectedCallback detectedCallback  
)
static

Detects all available FileFormatHandler in the order of priority. The first value in the array should be used first.

参数
[in] url Url to detect.
[in] limitDetection Limit FileFormatHandler which return the given data types in their CreateHandler() call.
[in] detectedCallback Every detected file format handler will call this callback before adding it to the result BaseArray<FileFormatHandler>. For details see DetectedCallback.
返回
Returns an array with FileFormatHandler which all can handle this url.

◆  DetectAll() [2/3]

static MAXON_WARN_UNUSED MAXON_FUNCTION Result < BaseArray <FileFormatHandler> > DetectAll ( const Url url ,
const DetectedCallback detectedCallback  
)
static

Detects all available FileFormatHandler in the order of priority. The first value in the array should be used first.

Template Parameters
LIMITTYPES List with reference types to limit the DetectAll call. E.g. DetectAll<MediaLoaderRef>() , DetectAll<MediaLoaderRef, MovieLoaderRef>() .
参数
[in] url Url to detect.
返回
Returns an array with FileFormatHandler which all can handle this url.

◆  Detect() [1/2]

static MAXON_WARN_UNUSED MAXON_FUNCTION Result <FileFormatHandler> Detect ( const Url url )
static

Detects the first available FileFormatHandler in the order of priority.

Template Parameters
LIMITTYPES List with reference types to limit the DetectAll call. E.g. DetectAll<MediaLoaderRef>() , DetectAll<MediaLoaderRef, MovieLoaderRef>() .
参数
[in] url Url to detect.
返回
Returns a FileFormatHandler which can handle this url.

◆  DetectAll() [3/3]

Result < BaseArray <FileFormatHandler> > DetectAll ( const Url url ,
const DetectedCallback detectedCallback  
)

◆  Detect() [2/2]

Result <FileFormatHandler> Detect ( const Url url )