From 19e740b447bf8d6c2210c5651deb538e9304a4ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Wed, 10 Oct 2018 14:51:47 +0200 Subject: [PATCH] Restore API functions remove in #450 --- include/exiv2/tags.hpp | 4 ++++ src/tags.cpp | 10 ++++++++++ src/tags_int.cpp | 15 +++++++++++++++ src/tags_int.hpp | 3 +++ 4 files changed, 32 insertions(+) diff --git a/include/exiv2/tags.hpp b/include/exiv2/tags.hpp index 3ce2599b..90e92568 100644 --- a/include/exiv2/tags.hpp +++ b/include/exiv2/tags.hpp @@ -112,6 +112,10 @@ namespace Exiv2 { ExifTags& operator=(const ExifTags& rhs); public: + //! Return read-only list of built-in groups + static const GroupInfo* groupList(); + //! Return read-only list of built-in \em groupName tags. + static const TagInfo* tagList(const std::string& groupName); //! Print a list of all standard Exif tags to output stream static void taglist(std::ostream& os); //! Print the list of tags for \em groupName diff --git a/src/tags.cpp b/src/tags.cpp index 420faa55..538f0a99 100644 --- a/src/tags.cpp +++ b/src/tags.cpp @@ -178,6 +178,16 @@ namespace Exiv2 { return Internal::isExifIfd(ifdId); } + const GroupInfo *ExifTags::groupList() + { + return Internal::groupList(); + } + + const TagInfo *ExifTags::tagList(const std::string &groupName) + { + return Internal::tagList(groupName); + } + void ExifTags::taglist(std::ostream& os) { const TagInfo* ifd = ifdTagList(); diff --git a/src/tags_int.cpp b/src/tags_int.cpp index b8432a8b..902c7f52 100644 --- a/src/tags_int.cpp +++ b/src/tags_int.cpp @@ -2870,4 +2870,19 @@ namespace Exiv2 { return os << stringValue; } + + const GroupInfo *groupList() + { + return groupInfo + 1; + } + + const TagInfo* tagList(const std::string& groupName) + { + const GroupInfo* ii = find(groupInfo, GroupInfo::GroupName(groupName)); + if (ii == 0 || ii->tagList_ == 0) { + return 0; + } + return ii->tagList_(); + } + } } diff --git a/src/tags_int.hpp b/src/tags_int.hpp index 97ef102c..91337e5b 100644 --- a/src/tags_int.hpp +++ b/src/tags_int.hpp @@ -307,6 +307,9 @@ namespace Exiv2 { //! Return read-only list of built-in mfp Tags http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/MPF.html const TagInfo* mpfTagList(); + const GroupInfo* groupList(); + const TagInfo* tagList(const std::string& groupName); + //! Return the group id for a group name IfdId groupId(const std::string& groupName); //! Return the name of the IFD