Exiv2
version.hpp
1// ***************************************************************** -*- C++ -*-
2/*
3 * Copyright (C) 2004-2021 Exiv2 authors
4 * This program is part of the Exiv2 distribution.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
19 */
20#ifndef VERSION_HPP_
21#define VERSION_HPP_
22
23#include "exiv2lib_export.h"
24#include "exv_conf.h"
25
26// *****************************************************************************
27// included header files
28// + standard includes
29#include <vector>
30#include <regex>
31
36#define EXIV2_MAKE_VERSION(major,minor,patch) \
37 (((major) << 16) | ((minor) << 8) | (patch))
42#define EXIV2_VERSION \
43 EXIV2_MAKE_VERSION(EXIV2_MAJOR_VERSION,EXIV2_MINOR_VERSION,EXIV2_PATCH_VERSION)
44
88#define EXIV2_TEST_VERSION(major,minor,patch) \
89 ( EXIV2_VERSION >= EXIV2_MAKE_VERSION(major,minor,patch) )
90
91// *****************************************************************************
92// namespace extensions
93namespace Exiv2 {
97 EXIV2API int versionNumber();
101 EXIV2API std::string versionString();
105 EXIV2API std::string versionNumberHexString();
106
110 EXIV2API const char* version();
111
119 EXIV2API bool testVersion(int major, int minor, int patch);
124 EXIV2API void dumpLibraryInfo(std::ostream& os,const std::vector<std::regex>& keys);
125} // namespace Exiv2
126
127
128
129#endif // VERSION_HPP_
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: basicio.hpp:43
EXIV2API const char * version()
Return the version of Exiv2 as "C" string eg "0.27.0.2".
Definition: version.cpp:105
EXIV2API void dumpLibraryInfo(std::ostream &os, const std::vector< std::regex > &keys)
dumpLibraryInfo implements the exiv2 option –version –verbose used by exiv2 test suite to inspect lib...
Definition: version.cpp:224
EXIV2API std::string versionNumberHexString()
Return the version of Exiv2 as hex string of fixed length 6.
Definition: version.cpp:98
EXIV2API std::string versionString()
Return the version string Example: "0.25.0" (major.minor.patch)
Definition: version.cpp:90
EXIV2API int versionNumber()
Return the version of Exiv2 available at runtime as an integer.
Definition: version.cpp:85
EXIV2API bool testVersion(int major, int minor, int patch)
Test the version of the available Exiv2 library at runtime. Return true if it is the same as or newer...
Definition: version.cpp:110