Krita Source Code Documentation
Loading...
Searching...
No Matches
KisMetaData::IOBackend Class Referenceabstract

#include <kis_meta_data_io_backend.h>

+ Inheritance diagram for KisMetaData::IOBackend:

Public Types

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

Public Member Functions

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 (const Store *store, QIODevice *ioDevice, HeaderType headerType=NoHeader) const =0
 
virtual bool supportLoading () const =0
 
virtual bool supportSaving () const =0
 
virtual BackendType type () const =0
 
virtual ~IOBackend ()
 

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 24 of file kis_meta_data_io_backend.h.

Member Enumeration Documentation

◆ BackendType

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

Enumerator
Binary 
Text 

Definition at line 31 of file kis_meta_data_io_backend.h.

◆ HeaderType

Enumerator
NoHeader 

Don't append any header.

JpegHeader 

Append Jpeg-style header.

Definition at line 33 of file kis_meta_data_io_backend.h.

33 {
34 NoHeader,
36 };
@ JpegHeader
Append Jpeg-style header.
@ NoHeader
Don't append any header.

Constructor & Destructor Documentation

◆ ~IOBackend()

virtual KisMetaData::IOBackend::~IOBackend ( )
inlinevirtual

Definition at line 39 of file kis_meta_data_io_backend.h.

39{};

Member Function Documentation

◆ canSaveAllEntries()

virtual bool KisMetaData::IOBackend::canSaveAllEntries ( Store * store) const
pure virtual
Parameters
storethe list of metadata
Returns
true if this backend is capable of saving all the metadata of the store

Implemented in KisXMPIO, KisExifIO, and KisIptcIO.

◆ id()

virtual QString KisMetaData::IOBackend::id ( ) const
pure virtual

Implemented in KisExifIO, KisIptcIO, and KisXMPIO.

◆ loadFrom()

virtual bool KisMetaData::IOBackend::loadFrom ( Store * store,
QIODevice * ioDevice ) const
pure virtual
Parameters
storethe list of metadata to load
ioDevicethe device from where the metadata will be loaded
Returns
true if the load was successful

Implemented in KisExifIO, KisIptcIO, and KisXMPIO.

◆ name()

virtual QString KisMetaData::IOBackend::name ( ) const
pure virtual

Implemented in KisExifIO, KisIptcIO, and KisXMPIO.

◆ saveTo()

virtual bool KisMetaData::IOBackend::saveTo ( const Store * store,
QIODevice * ioDevice,
HeaderType headerType = NoHeader ) const
pure virtual
Parameters
storethe list of metadata to save
ioDevicethe device to where the metadata will be saved
headerTypedetermine 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 (XXX: actually, all backends always return true...)

Implemented in KisExifIO, KisIptcIO, and KisXMPIO.

◆ supportLoading()

virtual bool KisMetaData::IOBackend::supportLoading ( ) const
pure virtual
Returns
true if this backend support loading

Implemented in KisExifIO, KisIptcIO, and KisXMPIO.

◆ supportSaving()

virtual bool KisMetaData::IOBackend::supportSaving ( ) const
pure virtual
Returns
tell if this backend support saving

Implemented in KisExifIO, KisIptcIO, and KisXMPIO.

◆ type()

virtual BackendType KisMetaData::IOBackend::type ( ) const
pure virtual
Returns
the type of the backend

Implemented in KisExifIO, KisIptcIO, and KisXMPIO.


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