diff --git a/src/taglist.cpp b/src/taglist.cpp index 0a7acb2c..4b13cc1e 100644 --- a/src/taglist.cpp +++ b/src/taglist.cpp @@ -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) 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) { diff --git a/src/tags.cpp b/src/tags.cpp index a20d7daf..02d0fcf1 100644 --- a/src/tags.cpp +++ b/src/tags.cpp @@ -20,13 +20,13 @@ */ /* File: tags.cpp - Version: $Name: $ $Revision: 1.13 $ + Version: $Name: $ $Revision: 1.14 $ Author(s): Andreas Huggel (ahu) 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 diff --git a/src/tags.hpp b/src/tags.hpp index 2274d7f7..eae8f05f 100644 --- a/src/tags.hpp +++ b/src/tags.hpp @@ -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) ahuggel@gmx.net @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);