Exiv2
version.hpp
Go to the documentation of this file.
1 // ***************************************************************** -*- C++ -*-
2 /*
3  * Copyright (C) 2004-2018 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  */
30 #ifndef VERSION_HPP_
31 #define VERSION_HPP_
32 
33 #include "exiv2lib_export.h"
34 #include "exv_conf.h"
35 
36 // *****************************************************************************
37 // included header files
38 // + standard includes
39 #include <vector>
40 
41 #if defined(EXV_HAVE_REGEX_H)
42 # include <regex.h>
46  typedef std::vector<regex_t> exv_grep_keys_t ;
47 # else
48 
55  Exiv2_grep_key_t(std::string pattern,bool bIgnoreCase)
56  :pattern_(pattern),bIgnoreCase_(bIgnoreCase) {}
57 
60 
63  };
67  typedef std::vector<Exiv2_grep_key_t> exv_grep_keys_t ;
68 #endif
69 
74 #define EXIV2_MAKE_VERSION(major,minor,patch) \
75  (((major) << 16) | ((minor) << 8) | (patch))
76 
80 #define EXIV2_VERSION \
81  EXIV2_MAKE_VERSION(EXIV2_MAJOR_VERSION,EXIV2_MINOR_VERSION,EXIV2_PATCH_VERSION)
82 
126 #define EXIV2_TEST_VERSION(major,minor,patch) \
127  ( EXIV2_VERSION >= EXIV2_MAKE_VERSION(major,minor,patch) )
128 
129 // *****************************************************************************
130 // namespace extensions
131 namespace Exiv2 {
135  EXIV2API int versionNumber();
139  EXIV2API std::string versionString();
144 
148  EXIV2API const char* version();
149 
157  EXIV2API bool testVersion(int major, int minor, int patch);
162  EXIV2API void dumpLibraryInfo(std::ostream& os,const exv_grep_keys_t& keys);
163 } // namespace Exiv2
164 
165 
166 
167 #endif // VERSION_HPP_
Exiv2::StringVector_i
StringVector::const_iterator StringVector_i
Class to provide a StringVector iterator.
Definition: datasets.hpp:398
Exiv2::versionNumber
EXIV2API int versionNumber()
Return the version of Exiv2 available at runtime as an integer.
Definition: version.cpp:82
Exiv2::StringVector
std::vector< std::string > StringVector
typedef for string vector
Definition: datasets.hpp:390
Exiv2::fileExists
EXIV2API bool fileExists(const std::string &path, bool ct=false)
Test if a file exists.
Definition: futils.cpp:307
Exiv2::Dictionary_i
Dictionary::const_iterator Dictionary_i
typedef for Dictionary iterator
Definition: datasets.hpp:372
Exiv2::StringSet
std::set< std::string > StringSet
typedef for string set (unique strings)
Definition: datasets.hpp:377
Exiv2_grep_key_t::Exiv2_grep_key_t
Exiv2_grep_key_t(std::string pattern, bool bIgnoreCase)
Exiv2_grep_key_t constructor.
Definition: version.hpp:55
version.hpp
Precompiler define and a function to test the Exiv2 version. References: Similar versioning defines a...
exv_grep_keys_t
std::vector< Exiv2_grep_key_t > exv_grep_keys_t
exv_grep_keys_t is a vector of keys to match to strings
Definition: version.hpp:67
Exiv2::Internal::Tag::next
const uint32_t next
Special tag: next IFD.
Definition: tiffcomposite_int.hpp:81
Exiv2::XmpProperties::registeredNamespaces
static void registeredNamespaces(Exiv2::Dictionary &nsDict)
Get all registered namespaces (for both Exiv2 and XMPsdk)
Exiv2::versionString
EXIV2API std::string versionString()
Return the version string Example: "0.25.0" (major.minor.patch)
Definition: version.cpp:87
Exiv2::testVersion
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:107
Exiv2::Internal::getExiv2ConfigPath
std::string getExiv2ConfigPath()
Determine the path to the Exiv2 configuration file.
Definition: makernote_int.cpp:94
Exiv2::getProcessPath
EXIV2API std::string getProcessPath()
Return the path of the current process.
Definition: futils.cpp:470
Exiv2_grep_key_t::bIgnoreCase_
bool bIgnoreCase_
should we ignore cast in the match?
Definition: version.hpp:62
makernote_int.hpp
Makernote factory and registry, IFD makernote header, and camera vendor specific makernote implementa...
Exiv2
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
Exiv2_grep_key_t
exv_grep_key_t is a simple string and the ignore flag
Definition: version.hpp:51
Exiv2::dumpLibraryInfo
EXIV2API void dumpLibraryInfo(std::ostream &os, const exv_grep_keys_t &keys)
dumpLibraryInfo implements the exiv2 option –version –verbose used by exiv2 test suite to inspect lib...
Definition: version.cpp:218
EXIV2_MAKE_VERSION
#define EXIV2_MAKE_VERSION(major, minor, patch)
Make an integer version number for comparison from a major, minor and a patch version number.
Definition: version.hpp:74
Exiv2_grep_key_t::pattern_
std::string pattern_
simple string to match
Definition: version.hpp:59
Exiv2::string
@ string
IPTC string type.
Definition: types.hpp:147
Exiv2::Dictionary
std::map< std::string, std::string > Dictionary
typedef for string:string map
Definition: datasets.hpp:364
Exiv2::version
const EXIV2API char * version()
Return the version of Exiv2 as "C" string eg "0.27.0.2".
Definition: version.cpp:102
futils.hpp
Basic file utility functions required by Exiv2.
Exiv2::versionNumberHexString
EXIV2API std::string versionNumberHexString()
Return the version of Exiv2 as hex string of fixed length 6.
Definition: version.cpp:95