Taglist takes a stream now

v0.27.3
Andreas Huggel 22 years ago
parent d21943ca94
commit b870d3d1a0

@ -3,13 +3,13 @@
Abstract: Print a simple comma separated list of tags defined in Exiv2
File: taglist.cpp
Version: $Name: $ $Revision: 1.2 $
Version: $Name: $ $Revision: 1.3 $
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
History: 07-Jan-04, ahu: created
*/
// *****************************************************************************
#include "rcsid.hpp"
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.2 $ $RCSfile: taglist.cpp,v $")
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.3 $ $RCSfile: taglist.cpp,v $")
#include "tags.hpp"
#include "error.hpp"
@ -20,7 +20,7 @@ using namespace Exif;
int main()
try {
ExifTags::taglist();
ExifTags::taglist(std::cout);
return 0;
}
catch (Error& e) {

@ -20,13 +20,13 @@
*/
/*
File: tags.cpp
Version: $Name: $ $Revision: 1.13 $
Version: $Name: $ $Revision: 1.14 $
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
History: 15-Jan-04, ahu: created
*/
// *****************************************************************************
#include "rcsid.hpp"
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.13 $ $RCSfile: tags.cpp,v $")
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.14 $ $RCSfile: tags.cpp,v $")
// *****************************************************************************
// included header files
@ -389,19 +389,19 @@ namespace Exif {
return tagInfos_[ifdId][idx].printFct_;
}
void ExifTags::taglist()
void ExifTags::taglist(std::ostream& os)
{
for (int i=0; ifdTagInfo[i].tag_ != 0xffff; ++i) {
std::cout << ifdTagInfo[i] << "\n";
os << ifdTagInfo[i] << "\n";
}
for (int i=0; exifTagInfo[i].tag_ != 0xffff; ++i) {
std::cout << exifTagInfo[i] << "\n";
os << exifTagInfo[i] << "\n";
}
for (int i=0; iopTagInfo[i].tag_ != 0xffff; ++i) {
std::cout << iopTagInfo[i] << "\n";
os << iopTagInfo[i] << "\n";
}
for (int i=0; gpsTagInfo[i].tag_ != 0xffff; ++i) {
std::cout << gpsTagInfo[i] << "\n";
os << gpsTagInfo[i] << "\n";
}
} // ExifTags::taglist

@ -21,7 +21,7 @@
/*!
@file tags.hpp
@brief %Exif tag and type information
@version $Name: $ $Revision: 1.13 $
@version $Name: $ $Revision: 1.14 $
@author Andreas Huggel (ahu)
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
@date 15-Jan-04, ahu: created
@ -180,7 +180,7 @@ namespace Exif {
//! Return the print function for the tag, IFD id combination
static PrintFct printFct(uint16 tag, IfdId ifdId);
//! Print a list of all tags to standart output
static void taglist();
static void taglist(std::ostream& os);
private:
static int tagInfoIdx(uint16 tag, IfdId ifdId);

Loading…
Cancel
Save