#include "exv_conf.h"
#include "version.hpp"
#include <string>
#include <vector>
#include <iosfwd>
#include <utility>
#include <algorithm>
#include <sstream>
#include <stdint.h>
Include dependency graph for types.hpp:
This graph shows which files directly or indirectly include this file:
Namespaces | |
namespace | Exiv2 |
Classes | |
class | Exiv2::TypeInfo |
Type information lookup functions. Implemented as a static class. More... | |
struct | Exiv2::DataBufRef |
Auxiliary type to enable copies and assignments, similar to std::auto_ptr_ref. See http://www.josuttis.com/libbook/auto_ptr.html for a discussion. More... | |
class | Exiv2::DataBuf |
Utility class containing a character array. All it does is to take care of memory allocation and deletion. Its primary use is meant to be as a stack variable in functions that need a temporary data buffer. More... | |
Defines | |
#define | EXV_CALL_MEMBER_FN(object, ptrToMember) ((object).*(ptrToMember)) |
Macro to make calls to member functions through a pointer more readable. See the C++ FAQ LITE, item [33.5] How can I avoid syntax errors when calling a member function using a pointer-to-member-function?. | |
#define | EXV_MIN(a, b) ((a) < (b) ? (a) : (b)) |
Simple common min macro. | |
#define | EXV_MAX(a, b) ((a) > (b) ? (a) : (b)) |
Simple common max macro. | |
#define | EXV_COUNTOF(a) (sizeof(Exiv2::sizer(a))) |
Macro to determine the size of an array. | |
Typedefs | |
typedef uint8_t | byte |
1 byte unsigned integer type. | |
typedef std::pair< uint32_t, uint32_t > | URational |
8 byte unsigned rational type. | |
typedef std::pair< int32_t, int32_t > | Rational |
8 byte signed rational type. | |
typedef std::vector< byte > | Blob |
Container for binary data. | |
Enumerations | |
enum | ByteOrder { invalidByteOrder, littleEndian, bigEndian } |
Type to express the byte order (little or big endian). | |
enum | WriteMethod { wmIntrusive, wmNonIntrusive } |
Type to indicate write method used by TIFF parsers. | |
enum | MetadataId { mdNone = 0, mdExif = 1, mdIptc = 2, mdComment = 4, mdXmp = 8 } |
An identifier for each type of metadata. | |
enum | AccessMode { amNone = 0, amRead = 1, amWrite = 2, amReadWrite = 3 } |
An identifier for each mode of metadata support. | |
enum | TypeId { unsignedByte = 1, asciiString = 2, unsignedShort = 3, unsignedLong = 4, unsignedRational = 5, signedByte = 6, undefined = 7, signedShort = 8, signedLong = 9, signedRational = 10, tiffFloat = 11, tiffDouble = 12, tiffIfd = 13, string = 0x10000, date = 0x10001, time = 0x10002, comment = 0x10003, directory = 0x10004, xmpText = 0x10005, xmpAlt = 0x10006, xmpBag = 0x10007, xmpSeq = 0x10008, langAlt = 0x10009, invalidTypeId = 0x1fffe, lastTypeId = 0x1ffff } |
Exiv2 value type identifiers. More... | |
enum | IfdId { ifdIdNotSet, ifd0Id, exifIfdId, gpsIfdId, iopIfdId, ifd1Id, ifd2Id, ifd3Id, subImage1Id, subImage2Id, subImage3Id, subImage4Id, mnIfdId, canonIfdId, canonCsIfdId, canonSiIfdId, canonCfIfdId, canonPiIfdId, canonPaIfdId, canonFiIfdId, fujiIfdId, minoltaIfdId, minoltaCs5DIfdId, minoltaCs7DIfdId, minoltaCsOldIfdId, minoltaCsNewIfdId, nikon1IfdId, nikon2IfdId, nikon3IfdId, nikonPvIfdId, nikonVrIfdId, nikonPcIfdId, nikonWtIfdId, nikonIiIfdId, nikonAfIfdId, nikonSi1IfdId, nikonSi2IfdId, nikonSi3IfdId, nikonSi4IfdId, nikonSi5IfdId, nikonSi6IfdId, nikonLd1IfdId, nikonLd2IfdId, nikonLd3IfdId, nikonCb1IfdId, nikonCb2IfdId, nikonCb2aIfdId, nikonCb2bIfdId, nikonCb3IfdId, nikonCb4IfdId, olympusIfdId, olympus2IfdId, olympusCsIfdId, olympusEqIfdId, olympusRdIfdId, olympusRd2IfdId, olympusIpIfdId, olympusFiIfdId, olympusFe1IfdId, olympusFe2IfdId, olympusFe3IfdId, olympusFe4IfdId, olympusFe5IfdId, olympusFe6IfdId, olympusFe7IfdId, olympusFe8IfdId, olympusFe9IfdId, olympusRiIfdId, panasonicIfdId, panaRawIfdId, pentaxIfdId, sigmaIfdId, sonyIfdId, lastIfdId } |
Type to specify the IFD to which a metadata belongs. | |
Functions | |
template<typename T, typename K, int N> | |
const T * | find (T(&src)[N], const K &key) |
Find an element that matches key in the array src. | |
template<typename T, int N> | |
char (&sizer(T(&)[N]))[N] | |
Template used in the COUNTOF macro to determine the size of an array. | |
template<typename T> | |
std::string | toString (const T &arg) |
Utility function to convert the argument of any type to a string. | |
template<typename T> | |
T | stringTo (const std::string &s, bool &ok) |
Utility function to convert a string to a value of type T . | |
template<typename IntType> | |
IntType | gcd (IntType n, IntType m) |
Return the greatest common denominator of n and m. (Implementation from Boost rational.hpp). |
|
Exiv2 value type identifiers. Used primarily as identifiers when creating Exiv2 Value instances. See Value::create. 0x0000 to 0xffff are reserved for TIFF (Exif) types.
|
|
Find an element that matches key in the array src. Designed to be used with lookup tables as shown in the example below. Requires a Key structure (ideally in the array) and a comparison operator to compare a key with an array element. The size of the array is determined automagically. Thanks to Stephan Broennimann for this nifty implementation.
struct Bar { int i; int k; const char* data; struct Key; bool operator==(const Bar::Key& rhs) const; }; struct Bar::Key { Key(int a, int b) : i(a), k(b) {} int i; int k; }; bool Bar::operator==(const Bar::Key& key) const // definition { return i == key.i && k == key.k; } const Bar bars[] = { { 1, 1, "bar data 1" }, { 1, 2, "bar data 2" }, { 1, 3, "bar data 3" } }; int main ( void ) { const Bar* bar = find(bars, Bar::Key(1, 3)); if (bar) std::cout << bar->data << "\n"; else std::cout << "Key not found.\n"; return 0; } |
|
Return the greatest common denominator of n and m. (Implementation from Boost rational.hpp).
|
|
Utility function to convert a string to a value of type
The string representation of the value must match that recognized by the input operator for
|