Loading...
Searching...
No Matches
xmpsidecar.hpp
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef XMPSIDECAR_HPP_
#define XMPSIDECAR_HPP_
// *****************************************************************************
#include "exiv2lib_export.h"
// included header files
#include "image.hpp"
// *****************************************************************************
// namespace extensions
namespace Exiv2 {
// *****************************************************************************
// class definitions
class EXIV2API XmpSidecar : public Image {
public:
XmpSidecar(BasicIo::UniquePtr io, bool create);
void readMetadata() override;
void writeMetadata() override;
void setComment(const std::string&) override;
[[nodiscard]] std::string mimeType() const override;
Exiv2::Dictionary dates_;
}; // class XmpSidecar
// *****************************************************************************
// template, inline and free functions
// These could be static private functions on Image subclasses but then
// ImageFactory needs to be made a friend.
EXIV2API Image::UniquePtr newXmpInstance(BasicIo::UniquePtr io, bool create);
EXIV2API bool isXmpType(BasicIo& iIo, bool advance);
} // namespace Exiv2
#endif // #ifndef XMPSIDECAR_HPP_
Exiv2::BasicIo
An interface for simple binary IO.
Definition basicio.hpp:35
Exiv2::BasicIo::UniquePtr
std::unique_ptr< BasicIo > UniquePtr
BasicIo auto_ptr type.
Definition basicio.hpp:38
Exiv2::Image::Image
Image(ImageType type, uint16_t supportedMetadata, BasicIo::UniquePtr io)
Constructor taking the image type, a bitmap of the supported metadata types and an auto-pointer that ...
Definition image.cpp:132
Exiv2::Image::io
virtual BasicIo & io() const
Return a reference to the BasicIo instance being used for Io.
Definition image.cpp:696
Exiv2::Image::UniquePtr
std::unique_ptr< Image > UniquePtr
Image auto_ptr type.
Definition image.hpp:53
Exiv2::XmpSidecar::setComment
void setComment(const std::string &) override
Not supported. XMP sidecar files do not contain a comment. Calling this function will throw an instan...
Definition xmpsidecar.cpp:34
Exiv2::XmpSidecar::writeMetadata
void writeMetadata() override
Write metadata back to the image.
Definition xmpsidecar.cpp:88
Exiv2::XmpSidecar::XmpSidecar
XmpSidecar(BasicIo::UniquePtr io, bool create)
Constructor for an XMP sidecar file. Since the constructor can not return a result,...
Definition xmpsidecar.cpp:23
Exiv2::XmpSidecar::readMetadata
void readMetadata() override
Read all metadata supported by a specific image format from the image. Before this method is called,...
Definition xmpsidecar.cpp:39
Exiv2::XmpSidecar::mimeType
std::string mimeType() const override
Return the MIME type of the image.
Definition xmpsidecar.cpp:30
Exiv2
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
Exiv2::newXmpInstance
EXIV2API Image::UniquePtr newXmpInstance(BasicIo::UniquePtr io, bool create)
Create a new XmpSidecar instance and return an auto-pointer to it. Caller owns the returned object an...
Definition xmpsidecar.cpp:148
Exiv2::Dictionary
std::map< std::string, std::string > Dictionary
typedef for string:string map
Definition datasets.hpp:312
Exiv2::isXmpType
EXIV2API bool isXmpType(BasicIo &iIo, bool advance)
Check if the file iIo is an XMP sidecar file.
Definition xmpsidecar.cpp:156