#include <fileformat_handler.h>
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.
Public Member Functions | |
MAXON_METHOD const 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 |
Private Member Functions | |
MAXON_INTERFACE (FileFormatHandlerInterface, MAXON_REFERENCE_CONST, "net.maxon.interface.fileformathandler", MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel")) | |
|
private |
MAXON_METHOD const FileFormat& GetFileFormat | ( | ) | const |
Returns the FileFormat which is handled by this FileFormatHandler.
MAXON_METHOD Result<DataType> GetHandlerType | ( | ) | const |
Returns the datatype of the reference class of the handler returned by CreateHandler().
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. |
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. |
HANDLER | Reference class to be expected with the result of CreateHandler. |
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().