![]() |
LeechCraft Monocle
%{LEECHCRAFT_VERSION}
Modular document viewer for LeechCraft
|
Basic interface for format backends plugins for Monocle. More...
#include "ibackendplugin.h"
Public Member Functions | |
virtual | ~IBackendPlugin () |
Virtual destructor. More... | |
virtual bool | CanLoadDocument (const QString &filename)=0 |
Checks whether the given document can be loaded. More... | |
virtual IDocument_ptr | LoadDocument (const QString &filename)=0 |
Loads the given document. More... | |
virtual bool | IsThreaded () const |
Returns true whether the backend is threaded. More... | |
Basic interface for format backends plugins for Monocle.
This interface should be implemented by plugins that provide format backends for Monocle document reader — that is, for those plugins that can load documents.
Definition at line 48 of file ibackendplugin.h.
|
inlinevirtual |
Virtual destructor.
Definition at line 53 of file ibackendplugin.h.
|
pure virtual |
Checks whether the given document can be loaded.
This method should return true
if the document can possibly be loaded and false
otherwise.
The cheaper this function is, the better. It is discouraged to check by extension, though.
It is OK to return nullptr or invalid document from LoadDocument() even if this method returns true
for a given document.
filename] | in Path to the document to check. |
|
inlinevirtual |
Returns true whether the backend is threaded.
This function returns true if the implementation supports threaded pages rendering.
The default implementation simply returns false.
Definition at line 106 of file ibackendplugin.h.
|
pure virtual |
Loads the given document.
This method should load the document at filename and return a pointer to it, or a null pointer if the document is invalid.
The ownership is passed to the caller: that is, this backend plugin should keep no strong shared references to the returned document.
It is OK for this method to return a null or invalid document even if CanLoadDocument() returned true
for this filename,
filename] | in The document to load. |