krita/image

KisMetaData::IOBackend Class Reference

This is a the interface for input or output backend to KisMetaData. More...

#include <kis_meta_data_io_backend.h>

List of all members.

Public Types

enum  BackendType { Binary, Text }
enum  HeaderType { NoHeader, JpegHeader }

Public Member Functions

virtual ~IOBackend ()
virtual bool canSaveAllEntries (Store *store) const =0
virtual QString id () const =0
virtual bool loadFrom (Store *store, QIODevice *ioDevice) const =0
virtual QString name () const =0
virtual bool saveTo (Store *store, QIODevice *ioDevice, HeaderType headerType=NoHeader) const =0
virtual bool supportLoading () const =0
virtual bool supportSaving () const =0
virtual BackendType type () const =0

Detailed Description

This is a the interface for input or output backend to KisMetaData.

For instance, to add support to exif or xmp or iptc or dublin core or anything else, it is needed to extend this interface.

Definition at line 36 of file kis_meta_data_io_backend.h.


Member Enumeration Documentation

enum KisMetaData::IOBackend::BackendType

Tell whether the backend input/output from/to binary data or text (XML or RDF) data.

Enumerator:
Binary 
Text 

Definition at line 44 of file kis_meta_data_io_backend.h.

enum KisMetaData::IOBackend::HeaderType
Enumerator:
NoHeader 

Don't append any header.

JpegHeader 

Append Jpeg-style header.

Definition at line 49 of file kis_meta_data_io_backend.h.


Constructor & Destructor Documentation

virtual KisMetaData::IOBackend::~IOBackend (  )  [inline, virtual]

Definition at line 56 of file kis_meta_data_io_backend.h.


Member Function Documentation

virtual bool KisMetaData::IOBackend::canSaveAllEntries ( Store store  )  const [pure virtual]
Parameters:
store the list of metadata
Returns:
true if this backend is capable of saving all the metadata of the store
virtual QString KisMetaData::IOBackend::id (  )  const [pure virtual]
virtual bool KisMetaData::IOBackend::loadFrom ( Store store,
QIODevice ioDevice 
) const [pure virtual]
Parameters:
store the list of metadata to load
ioDevice the device from where the metadata will be loaded
Returns:
true if the load was successful
virtual QString KisMetaData::IOBackend::name (  )  const [pure virtual]
virtual bool KisMetaData::IOBackend::saveTo ( Store store,
QIODevice ioDevice,
HeaderType  headerType = NoHeader 
) const [pure virtual]
Parameters:
store the list of metadata to save
ioDevice the device to where the metadata will be saved
headerType determine if an header must be prepend to the binary header, and if it does, which type of header
Returns:
true if the save was successful
virtual bool KisMetaData::IOBackend::supportLoading (  )  const [pure virtual]
Returns:
true if this backend support loading
virtual bool KisMetaData::IOBackend::supportSaving (  )  const [pure virtual]
Returns:
tell if this backend support saving
virtual BackendType KisMetaData::IOBackend::type (  )  const [pure virtual]
Returns:
the type of the backend

The documentation for this class was generated from the following file: