Exiv2
Loading...
Searching...
No Matches
xmpsidecar.hpp
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#ifndef XMPSIDECAR_HPP_
4#define XMPSIDECAR_HPP_
5
6// *****************************************************************************
7#include "exiv2lib_export.h"
8
9// included header files
10#include "image.hpp"
11
12// *****************************************************************************
13// namespace extensions
14namespace Exiv2 {
15// *****************************************************************************
16// class definitions
17
21class EXIV2API XmpSidecar : public Image {
22 public:
24
25
38 XmpSidecar(BasicIo::UniquePtr io, bool create);
40
42
43 void readMetadata() override;
44 void writeMetadata() override;
49 void setComment(const std::string&) override;
51
53
54 [[nodiscard]] std::string mimeType() const override;
56
57 Exiv2::Dictionary dates_;
58}; // class XmpSidecar
59
60// *****************************************************************************
61// template, inline and free functions
62
63// These could be static private functions on Image subclasses but then
64// ImageFactory needs to be made a friend.
70EXIV2API Image::UniquePtr newXmpInstance(BasicIo::UniquePtr io, bool create);
71
73EXIV2API bool isXmpType(BasicIo& iIo, bool advance);
74
75} // namespace Exiv2
76
77#endif // #ifndef XMPSIDECAR_HPP_
An interface for simple binary IO.
Definition basicio.hpp:35
std::unique_ptr< BasicIo > UniquePtr
BasicIo auto_ptr type.
Definition basicio.hpp:38
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
virtual BasicIo & io() const
Return a reference to the BasicIo instance being used for Io.
Definition image.cpp:680
std::unique_ptr< Image > UniquePtr
Image auto_ptr type.
Definition image.hpp:53
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
void writeMetadata() override
Write metadata back to the image.
Definition xmpsidecar.cpp:88
XmpSidecar(BasicIo::UniquePtr io, bool create)
Constructor for an XMP sidecar file. Since the constructor can not return a result,...
Definition xmpsidecar.cpp:23
void readMetadata() override
Read all metadata supported by a specific image format from the image. Before this method is called,...
Definition xmpsidecar.cpp:39
std::string mimeType() const override
Return the MIME type of the image.
Definition xmpsidecar.cpp:30
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
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
std::map< std::string, std::string > Dictionary
typedef for string:string map
Definition datasets.hpp:312
EXIV2API bool isXmpType(BasicIo &iIo, bool advance)
Check if the file iIo is an XMP sidecar file.
Definition xmpsidecar.cpp:156