From 1f07715141ab03df21e38e11bf6539162abcb336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Tue, 8 Feb 2022 07:57:22 +0100 Subject: [PATCH] Revert "Delete dead code" This reverts commit 1d6bac61f2c3f2a15be6fdfaed4aa33682dd9034. --- include/exiv2/datasets.hpp | 15 +++++++++++++++ src/datasets.cpp | 10 ++++++++++ 2 files changed, 25 insertions(+) diff --git a/include/exiv2/datasets.hpp b/include/exiv2/datasets.hpp index 3fcaedea11..df6f4769bf 100644 --- a/include/exiv2/datasets.hpp +++ b/include/exiv2/datasets.hpp @@ -238,6 +238,21 @@ namespace Exiv2 { */ static const char* recordDesc(uint16_t recordId); + /*! + @brief Return the Id number of a record + @param recordName Name of a record type + @return the Id number of a Record + @throw Error if the record is not known; + */ + static uint16_t recordId(const std::string& recordName); + + //! Return read-only list of built-in Envelope Record datasets + static const DataSet* envelopeRecordList(); + + //! Return read-only list of built-in Application2 Record datasets + static const DataSet* application2RecordList(); + + //! Print a list of all dataSets to output stream static void dataSetList(std::ostream& os); private: diff --git a/src/datasets.cpp b/src/datasets.cpp index 8654e00e3a..07ee9a3c60 100644 --- a/src/datasets.cpp +++ b/src/datasets.cpp @@ -421,6 +421,16 @@ namespace Exiv2 { 0xffffffff, Exiv2::string, IptcDataSets::invalidRecord, N_("Unknown dataset"), }; + const DataSet* IptcDataSets::envelopeRecordList() + { + return envelopeRecord; + } + + const DataSet* IptcDataSets::application2RecordList() + { + return application2Record; + } + // Dataset lookup lists.This is an array with pointers to one list per IIM4 Record. // The record id is used as the index into the array. constexpr const DataSet* IptcDataSets::records_[] = {