 |
Exiv2
|
20 #ifndef PROPERTIES_HPP_
21 #define PROPERTIES_HPP_
24 #include "exiv2lib_export.h"
47 bool operator==(
const std::string& name)
const;
62 explicit Prefix(
const std::string& prefix);
69 explicit Ns(
const std::string& ns);
94 static const XmpNsInfo* nsInfoUnsafe(
const std::string& prefix);
95 static void unregisterNsUnsafe(
const std::string& ns);
105 static const char* propertyTitle(
const XmpKey& key);
112 static const char* propertyDesc(
const XmpKey& key);
139 static std::string ns(
const std::string& prefix);
147 static const char* nsDesc(
const std::string& prefix);
163 static const XmpNsInfo* nsInfo(
const std::string& prefix);
171 static std::string prefix(
const std::string& ns);
173 static void printProperties(std::ostream& os,
const std::string& prefix);
176 static std::ostream& printProperty(std::ostream& os,
177 const std::string& key,
187 static void registerNs(
const std::string& ns,
const std::string& prefix);
196 static void unregisterNs(
const std::string& ns);
209 static void unregisterNs();
246 explicit XmpKey(
const std::string& key);
256 XmpKey(
const std::string& prefix,
const std::string& property);
271 virtual std::string key()
const;
272 virtual const char* familyName()
const;
278 virtual std::string tagName()
const;
279 virtual std::string tagLabel()
const;
281 virtual uint16_t tag()
const;
287 std::string ns()
const;
292 virtual XmpKey* clone_()
const;
297 std::auto_ptr<Impl> p_;
309 #endif // #ifndef PROPERTIES_HPP_
bool operator==(const std::string &name) const
Comparison operator for name.
const char * xmpValueType_
XMP value type (for info only)
Definition: properties.hpp:51
Key & operator=(const Key &rhs)
Assignment operator. Protected so that it can only be used by subclasses but not directly.
Definition: metadatum.cpp:42
virtual std::string tagName() const
Return the name of the tag (which is also the third part of the key)
static TypeId propertyType(const XmpKey &key)
Return the type for property key. The default for unknown keys is xmpText.
virtual std::string groupName() const
Return the name of the group (the second part of the key). For XMP keys, the group name is the schema...
std::ostream & print0x0009(std::ostream &os, const Value &value, const ExifData *metadata)
Print GPS status.
Definition: tags_int.cpp:2756
std::ostream & printXmpVersion(std::ostream &os, const Value &value, const ExifData *)
Print any version encoded in the ASCII string majormajorminorminor.
Definition: tags_int.cpp:3214
const char * prefix_
(Preferred) prefix
Definition: properties.hpp:79
static const char * propertyTitle(const XmpKey &key)
Return the title (label) of the property.
std::string prefix_
The prefix string.
Definition: properties.hpp:64
std::ostream & print0x9208(std::ostream &os, const Value &value, const ExifData *metadata)
Print light source.
Definition: tags_int.cpp:2990
const char * title_
Property title or label.
Definition: properties.hpp:50
std::string ns() const
Return the schema namespace for the prefix of the key.
Common interface for all types of values used with metadata.
Definition: value.hpp:51
static const char * nsDesc(const std::string &prefix)
Return the namespace description for the schema associated with prefix.
XmpKey(const std::string &key)
Constructor to create an XMP key from a key string.
std::ostream & print0xa40c(std::ostream &os, const Value &value, const ExifData *metadata)
Print subject distance range.
Definition: tags_int.cpp:3177
std::auto_ptr< Key > AutoPtr
Shortcut for a Key auto pointer.
Definition: metadatum.hpp:47
Ns(const std::string &ns)
Constructor.
std::ostream & printNormalSoftHard(std::ostream &os, const Value &value, const ExifData *metadata)
Print contrast, sharpness (normal, soft, hard)
Definition: tags_int.cpp:3194
std::ostream & printLong(std::ostream &os, const Value &value, const ExifData *)
Print the value converted to a long.
Definition: tags_int.cpp:2619
std::ostream & print0x9202(std::ostream &os, const Value &value, const ExifData *)
Print f-number converted from APEX aperture value.
Definition: tags_int.cpp:2911
static std::string ns(const std::string &prefix)
Return the namespace name for the schema associated with prefix.
std::ostream & print0x8822(std::ostream &os, const Value &value, const ExifData *metadata)
Print exposure program.
Definition: tags_int.cpp:2870
virtual uint16_t tag() const
Properties don't have a tag number. Return 0.
For comparison with prefix.
Definition: properties.hpp:60
bool operator==(const Ns &ns) const
Comparison operator for namespace.
std::ostream & printFloat(std::ostream &os, const Value &value, const ExifData *)
Print a Rational or URational value in floating point format.
Definition: tags_int.cpp:2626
std::ostream & print0x0019(std::ostream &os, const Value &value, const ExifData *metadata)
Print GPS destination distance ref.
Definition: tags_int.cpp:2771
Concrete keys for XMP metadata.
Definition: properties.hpp:230
std::string ns_
The namespace string.
Definition: properties.hpp:71
static void registeredNamespaces(Exiv2::Dictionary &nsDict)
Get all registered namespaces (for both Exiv2 and XMPsdk)
const char * desc_
Property description.
Definition: properties.hpp:54
const char * ns_
Namespace.
Definition: properties.hpp:78
std::ostream & printXmpDate(std::ostream &os, const Value &value, const ExifData *)
Print a date following the format YYYY-MM-DDTHH:MM:SSZ.
Definition: tags_int.cpp:3223
static const XmpNsInfo * nsInfo(const std::string &prefix)
Return information about a schema namespace for prefix. Always returns a valid pointer.
const char * groupName(IfdId ifdId)
Return the group name for a group id.
Definition: tags_int.cpp:2540
XmpCategory xmpCategory_
Category (internal or external)
Definition: properties.hpp:53
std::ostream & print0x001e(std::ostream &os, const Value &value, const ExifData *metadata)
Print GPS differential correction.
Definition: tags_int.cpp:2776
std::ostream &(* PrintFct)(std::ostream &, const Value &, const ExifData *pExifData)
Type for a function pointer for functions interpreting the tag value.
Definition: tags.hpp:49
Information about one XMP property.
Definition: properties.hpp:45
@ invalidTypeId
Invalid type id.
Definition: types.hpp:146
Abstract base class defining the Key of a metadatum. Keys are used to identify and group metadata.
Definition: metadatum.hpp:44
std::ostream & printGPSDirRef(std::ostream &os, const Value &value, const ExifData *metadata)
Print GPS direction ref.
Definition: tags_int.cpp:3182
static void unregisterNs()
Unregister all custom namespaces.
std::ostream & print0xa402(std::ostream &os, const Value &value, const ExifData *metadata)
Print exposure mode.
Definition: tags_int.cpp:3082
static void printProperties(std::ostream &os, const std::string &prefix)
Print a list of properties of a schema namespace to output stream os.
std::ostream & print0xa407(std::ostream &os, const Value &value, const ExifData *metadata)
Print gain control.
Definition: tags_int.cpp:3151
@ xmpBag
XMP bag type.
Definition: types.hpp:143
std::ostream & print0x0112(std::ostream &os, const Value &value, const ExifData *metadata)
Print orientation.
Definition: tags_int.cpp:2781
TypeId typeId_
Exiv2 default type for the property.
Definition: properties.hpp:52
std::ostream & printValue(std::ostream &os, const Value &value, const ExifData *)
Default print function, using the Value output operator.
Definition: tags_int.cpp:2547
std::ostream & print0x000c(std::ostream &os, const Value &value, const ExifData *metadata)
Print GPS speed ref.
Definition: tags_int.cpp:2766
const T * find(T(&src)[N], const K &key)
Find an element that matches key in the array src.
Definition: types.hpp:497
std::ostream & print0x000a(std::ostream &os, const Value &value, const ExifData *metadata)
Print GPS measurement mode.
Definition: tags_int.cpp:2761
static const char * propertyDesc(const XmpKey &key)
Return the description of the property.
@ langAlt
XMP language alternative type.
Definition: types.hpp:145
std::ostream & print0x9204(std::ostream &os, const Value &value, const ExifData *)
Print the exposure bias value.
Definition: tags_int.cpp:2926
EXIV2API std::ostream & operator<<(std::ostream &os, const DataSet &dataSet)
Output operator for dataSet.
Definition: datasets.cpp:709
std::map< std::string, XmpNsInfo > NsRegistry
Type for the namespace registry.
Definition: properties.hpp:211
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
static const XmpPropertyInfo * propertyInfo(const XmpKey &key)
Return information for the property for key.
TypeId
Exiv2 value type identifiers.
Definition: types.hpp:119
static const XmpPropertyInfo * propertyList(const std::string &prefix)
Return read-only list of built-in properties for prefix.
Structure mapping XMP namespaces and (preferred) prefixes.
Definition: properties.hpp:58
static void registerNs(const std::string &ns, const std::string &prefix)
Register namespace ns with preferred prefix prefix.
virtual std::string key() const
Return the key of the metadatum as a string. The key is of the form 'familyName.groupName....
static const char * typeName(TypeId typeId)
Return the name of the type, 0 if unknown.
Definition: types.cpp:102
#define EXV_WARNING
Shorthand for a temp warning log message object and return its ostringstream.
Definition: error.hpp:148
const char * desc_
Brief description of the namespace.
Definition: properties.hpp:81
Class to provide a Read-Write Lock.
Definition: rwlock.hpp:89
bool operator==(const TagDetails &td, const LensTypeAndFocalLengthAndMaxAperture <fl)
Compare tag details with a lens entry.
Definition: canonmn_int.cpp:2820
Prefix(const std::string &prefix)
Constructor.
std::ostream & print0x9201(std::ostream &os, const Value &value, const ExifData *)
Print exposure time converted from APEX shutter speed value.
Definition: tags_int.cpp:2898
static NsRegistry nsRegistry_
Namespace registry.
Definition: properties.hpp:218
std::ostream & print0xa406(std::ostream &os, const Value &value, const ExifData *metadata)
Print scene capture type.
Definition: tags_int.cpp:3137
std::ostream & print0x9101(std::ostream &os, const Value &value, const ExifData *)
Print components configuration specific to compressed data.
Definition: tags_int.cpp:2880
const char * name_
Property name.
Definition: properties.hpp:49
std::ostream & print0xa217(std::ostream &os, const Value &value, const ExifData *metadata)
Print sensing method.
Definition: tags_int.cpp:3037
virtual std::string tagLabel() const
Return a label for the tag.
std::ostream & print0xa401(std::ostream &os, const Value &value, const ExifData *metadata)
Print custom rendered.
Definition: tags_int.cpp:3070
std::ostream & print0xa409(std::ostream &os, const Value &value, const ExifData *metadata)
Print saturation.
Definition: tags_int.cpp:3163
std::ostream & print0x0213(std::ostream &os, const Value &value, const ExifData *metadata)
Print YCbCrPositioning.
Definition: tags_int.cpp:2791
virtual const char * familyName() const
Return an identifier for the type of metadata (the first part of the key)
std::ostream & print0x829d(std::ostream &os, const Value &value, const ExifData *)
Print the f-number.
Definition: tags_int.cpp:2839
std::auto_ptr< XmpKey > AutoPtr
Shortcut for an XmpKey auto pointer.
Definition: properties.hpp:234
For comparison with namespace.
Definition: properties.hpp:67
BasicError< char > Error
Error class used for exceptions (std::string based)
Definition: error.hpp:324
std::ostream & print0x0005(std::ostream &os, const Value &value, const ExifData *metadata)
Print GPS altitude ref.
Definition: tags_int.cpp:2700
@ xmpText
XMP text type.
Definition: types.hpp:141
static std::string prefix(const std::string &ns)
Return the (preferred) prefix for schema namespace ns.
std::ostream & printExifUnit(std::ostream &os, const Value &value, const ExifData *metadata)
Print function for Exif units.
Definition: tags_int.cpp:2680
std::map< std::string, std::string > Dictionary
typedef for string:string map
Definition: datasets.hpp:364
std::ostream & print0xa300(std::ostream &os, const Value &value, const ExifData *metadata)
Print file source.
Definition: tags_int.cpp:3049
std::ostream & print0x9207(std::ostream &os, const Value &value, const ExifData *metadata)
Print metering mode.
Definition: tags_int.cpp:2985
std::ostream & print0xa403(std::ostream &os, const Value &value, const ExifData *metadata)
Print white balance.
Definition: tags_int.cpp:3093
@ xmpSeq
XMP sequence type.
Definition: types.hpp:144
std::ostream & print0x920a(std::ostream &os, const Value &value, const ExifData *)
Print the actual focal length of the lens.
Definition: tags_int.cpp:2995
IPTC dataset and type information.
static Exiv2::RWLock rwLock_
lock to be used while modifying properties
Definition: properties.hpp:199
const XmpPropertyInfo * xmpPropertyInfo_
List of known properties.
Definition: properties.hpp:80
static std::ostream & printProperty(std::ostream &os, const std::string &key, const Value &value)
Interpret and print the value of an XMP property.
std::ostream & print0xa001(std::ostream &os, const Value &value, const ExifData *metadata)
Print color space.
Definition: tags_int.cpp:3021
XMP property reference, implemented as a static class.
Definition: properties.hpp:85
XmpKey & operator=(const XmpKey &rhs)
Assignment operator.
virtual ~XmpKey()
Virtual destructor.
XmpCategory
Category of an XMP property.
Definition: properties.hpp:42
std::ostream & print0xa301(std::ostream &os, const Value &value, const ExifData *metadata)
Print scene type.
Definition: tags_int.cpp:3059
static const XmpNsInfo * lookupNsRegistry(const XmpNsInfo::Prefix &prefix)
Get the registered namespace for a specific prefix from the registry.
Error class for exceptions, log message class.