version.hpp
// ***************************************************************** -*- C++ -*-
/*
* Copyright (C) 2004-2021 Exiv2 authors
* This program is part of the Exiv2 distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
*/
#ifndef VERSION_HPP_
#define VERSION_HPP_
#include "exiv2lib_export.h"
#include "exv_conf.h"
// *****************************************************************************
// included header files
// + standard includes
#include <vector>
#if defined(EXV_HAVE_REGEX_H)
# include <regex.h>
typedef std::vector<regex_t> exv_grep_keys_t ;
# else
struct Exiv2_grep_key_t {
Exiv2_grep_key_t(std::string pattern,bool bIgnoreCase)
:pattern_(pattern),bIgnoreCase_(bIgnoreCase) {}
std::string pattern_;
bool bIgnoreCase_;
};
typedef std::vector<Exiv2_grep_key_t> exv_grep_keys_t ;
#endif
#define EXIV2_MAKE_VERSION(major,minor,patch) \
(((major) << 16) | ((minor) << 8) | (patch))
#define EXIV2_VERSION \
EXIV2_MAKE_VERSION(EXIV2_MAJOR_VERSION,EXIV2_MINOR_VERSION,EXIV2_PATCH_VERSION)
#define EXIV2_TEST_VERSION(major,minor,patch) \
( EXIV2_VERSION >= EXIV2_MAKE_VERSION(major,minor,patch) )
// *****************************************************************************
// namespace extensions
namespace Exiv2 {
EXIV2API int versionNumber();
EXIV2API std::string versionString();
EXIV2API std::string versionNumberHexString();
EXIV2API const char* version();
EXIV2API bool testVersion(int major, int minor, int patch);
EXIV2API void dumpLibraryInfo(std::ostream& os,const exv_grep_keys_t& keys);
} // namespace Exiv2
#endif // VERSION_HPP_
Exiv2
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
Exiv2::version
EXIV2API const char * version()
Return the version of Exiv2 as "C" string eg "0.27.0.2".
Definition: version.cpp:103
Exiv2::versionNumberHexString
EXIV2API std::string versionNumberHexString()
Return the version of Exiv2 as hex string of fixed length 6.
Definition: version.cpp:96
Exiv2::versionString
EXIV2API std::string versionString()
Return the version string Example: "0.25.0" (major.minor.patch)
Definition: version.cpp:89
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:235
Exiv2::versionNumber
EXIV2API int versionNumber()
Return the version of Exiv2 available at runtime as an integer.
Definition: version.cpp:84
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:108
Exiv2_grep_key_t
exv_grep_key_t is a simple string and the ignore flag
Definition: version.hpp:41
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:45
Exiv2_grep_key_t::bIgnoreCase_
bool bIgnoreCase_
should we ignore cast in the match?
Definition: version.hpp:52
Exiv2_grep_key_t::pattern_
std::string pattern_
simple string to match
Definition: version.hpp:49