7#include "exiv2lib_export.h"
12#include "datasets.hpp"
66 static const XmpNsInfo* nsInfoUnsafe(
const std::string& prefix);
67 static void unregisterNsUnsafe(
const std::string& ns);
111 static std::string
ns(
const std::string& prefix);
119 static const char*
nsDesc(
const std::string& prefix);
143 static std::string
prefix(
const std::string& ns);
157 static void registerNs(
const std::string& ns,
const std::string& prefix);
232 XmpKey(
const std::string& prefix,
const std::string& property);
247 [[nodiscard]] std::string
key()
const override;
254 [[nodiscard]] std::string
tagName()
const override;
255 [[nodiscard]] std::string
tagLabel()
const override;
256 [[nodiscard]] std::string
tagDesc()
const override;
258 [[nodiscard]] uint16_t
tag()
const override;
264 [[nodiscard]] std::string
ns()
const;
269 [[nodiscard]]
XmpKey* clone_()
const override;
273 std::unique_ptr<Impl> p_;
Abstract base class defining the Key of a metadatum. Keys are used to identify and group metadata.
Definition metadatum.hpp:26
Common interface for all types of values used with metadata.
Definition value.hpp:33
Concrete keys for XMP metadata.
Definition properties.hpp:207
std::string groupName() const override
Return the name of the group (the second part of the key). For XMP keys, the group name is the schema...
uint16_t tag() const override
Properties don't have a tag number. Return 0.
std::string tagDesc() const override
Return a description for the tag.
std::string tagName() const override
Return the name of the tag (which is also the third part of the key)
XmpKey(const XmpKey &rhs)
Copy constructor.
std::unique_ptr< XmpKey > UniquePtr
Shortcut for an XmpKey auto pointer.
Definition properties.hpp:210
std::string key() const override
Return the key of the metadatum as a string. The key is of the form 'familyName.groupName....
std::string tagLabel() const override
Return a label for the tag.
std::string ns() const
Return the schema namespace for the prefix of the key.
XmpKey & operator=(const XmpKey &rhs)
Assignment operator.
const char * familyName() const override
Return an identifier for the type of metadata (the first part of the key)
XmpKey(const std::string &key)
Constructor to create an XMP key from a key string.
XmpKey(const std::string &prefix, const std::string &property)
Constructor to create an XMP key from a schema prefix and a property name.
~XmpKey() override
Virtual destructor.
XMP property reference, implemented as a static class.
Definition properties.hpp:64
static const char * nsDesc(const std::string &prefix)
Return the namespace description for the schema associated with prefix.
std::map< std::string, XmpNsInfo > NsRegistry
Type for the namespace registry.
Definition properties.hpp:188
static TypeId propertyType(const XmpKey &key)
Return the type for property key. The default for unknown keys is xmpText.
static const char * propertyDesc(const XmpKey &key)
Return the description of the property.
static std::mutex mutex_
Lock to be used while modifying properties.
Definition properties.hpp:176
static NsRegistry nsRegistry_
Namespace registry.
Definition properties.hpp:195
static const XmpNsInfo * lookupNsRegistry(const XmpNsInfo::Prefix &prefix)
Get the registered namespace for a specific prefix from the registry.
static void unregisterNs()
Unregister all custom namespaces.
static std::string ns(const std::string &prefix)
Return the namespace name for the schema associated with prefix.
static void unregisterNs(const std::string &ns)
Unregister a custom namespace ns.
static const XmpPropertyInfo * propertyInfo(const XmpKey &key)
Return information for the property for key.
static std::string prefix(const std::string &ns)
Return the (preferred) prefix for schema namespace ns.
static const XmpPropertyInfo * propertyList(const std::string &prefix)
Return read-only list of built-in properties for prefix.
static void printProperties(std::ostream &os, const std::string &prefix)
Print a list of properties of a schema namespace to output stream os.
static void registeredNamespaces(Exiv2::Dictionary &nsDict)
Get all registered namespaces (for both Exiv2 and XMPsdk)
static std::ostream & printProperty(std::ostream &os, const std::string &key, const Value &value)
Interpret and print the value of an XMP property.
static const char * propertyTitle(const XmpKey &key)
Return the title (label) of the property.
static void registerNs(const std::string &ns, const std::string &prefix)
Register namespace ns with preferred prefix prefix.
static const XmpNsInfo * nsInfo(const std::string &prefix)
Return information about a schema namespace for prefix. Always returns a valid pointer.
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
EXIV2API std::ostream & operator<<(std::ostream &os, const DataSet &dataSet)
Output operator for dataSet.
Definition datasets.cpp:590
std::map< std::string, std::string > Dictionary
typedef for string:string map
Definition datasets.hpp:312
TypeId
Exiv2 value type identifiers.
Definition types.hpp:70
XmpCategory
Category of an XMP property.
Definition properties.hpp:25
For comparison with namespace.
Definition properties.hpp:48
std::string ns_
The namespace string.
Definition properties.hpp:50
For comparison with prefix.
Definition properties.hpp:43
std::string prefix_
The prefix string.
Definition properties.hpp:45
Structure mapping XMP namespaces and (preferred) prefixes.
Definition properties.hpp:41
const XmpPropertyInfo * xmpPropertyInfo_
List of known properties.
Definition properties.hpp:59
bool operator==(const Prefix &prefix) const
Comparison operator for prefix.
const char * desc_
Brief description of the namespace.
Definition properties.hpp:60
const char * prefix_
(Preferred) prefix
Definition properties.hpp:58
const char * ns_
Namespace.
Definition properties.hpp:57
bool operator==(const Ns &ns) const
Comparison operator for namespace.
Information about one XMP property.
Definition properties.hpp:28
const char * name_
Property name.
Definition properties.hpp:32
const char * desc_
Property description.
Definition properties.hpp:37
const char * title_
Property title or label.
Definition properties.hpp:33
bool operator==(const std::string &name) const
Comparison operator for name.
XmpCategory xmpCategory_
Category (internal or external)
Definition properties.hpp:36
const char * xmpValueType_
XMP value type (for info only)
Definition properties.hpp:34
TypeId typeId_
Exiv2 default type for the property.
Definition properties.hpp:35