| 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
14 namespace Exiv2 {
15// *****************************************************************************
16// class definitions
17
21 class 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_
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