Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Delete dead code" #2078

Merged
merged 1 commit into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions include/exiv2/datasets.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions src/datasets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_[] = {
Expand Down