Changed MakerNoteFactory according to ImageFactory. Removes the need to link applications with mn.o. Fixes bug #427
parent
ac13e33080
commit
a70511cc4a
@ -0,0 +1,42 @@
|
||||
// ***************************************************************** -*- C++ -*-
|
||||
/*
|
||||
* Copyright (C) 2004, 2005 Andreas Huggel <ahuggel@gmx.net>
|
||||
*
|
||||
* This program is part of the Exiv2 distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
/*!
|
||||
@file mn.hpp
|
||||
@brief Include all makernote header files. Makes sure that the static
|
||||
variable used to register makernotes is instantiated.
|
||||
@version $Rev$
|
||||
@author Andreas Huggel (ahu)
|
||||
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
|
||||
@date 28-May-05, ahu: created
|
||||
*/
|
||||
#ifndef MN_HPP_
|
||||
#define MN_HPP_
|
||||
|
||||
// *****************************************************************************
|
||||
// included header files
|
||||
#include "canonmn.hpp"
|
||||
#include "fujimn.hpp"
|
||||
#include "nikonmn.hpp"
|
||||
#include "olympusmn.hpp"
|
||||
#include "sigmamn.hpp"
|
||||
#include "sonymn.hpp"
|
||||
|
||||
#endif // #ifndef MN_HPP_
|
@ -1,28 +0,0 @@
|
||||
#! /bin/sh
|
||||
################################################################################
|
||||
# File : mn.sh
|
||||
# Version : $Rev$
|
||||
# Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
# History : 08-Mar-04, ahu: created
|
||||
#
|
||||
# Description:
|
||||
# Create a module mn.cpp that depends on all MakerNote subclasses
|
||||
# to force initialisation of static data in the corresponding
|
||||
# components when using the static library.
|
||||
################################################################################
|
||||
|
||||
rm -f mn.cpp
|
||||
echo "// Generated by mn.sh on" `date` "- do not edit" > mn.cpp
|
||||
for file in *mn.hpp; do
|
||||
echo "#include \""$file"\"" >> mn.cpp
|
||||
done
|
||||
echo "namespace {" >> mn.cpp
|
||||
for file in *mn.hpp; do
|
||||
awk '
|
||||
/class .*MakerNote.*:/ {
|
||||
name = $2;
|
||||
sub(/MakerNote.*/, "mn", name);
|
||||
printf " Exiv2::%s %s;\n", $2, tolower(name);
|
||||
}' $file >> mn.cpp
|
||||
done
|
||||
echo "}" >> mn.cpp
|
Loading…
Reference in New Issue