URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2007-11-15 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
Review the mln/literal directory.
* mln/literal/black.hh,
* mln/literal/colors.hh,
* mln/literal/grays.hh,
* mln/literal/one.hh,
* mln/literal/origin.hh,
* mln/literal/white.hh,
* tests/literal/black.cc: Use extern const ref, not static. Move
impl. within MLN_INCLUDE_ONLY.
Move/add some unit tests.
* tests/literal/literal_medium_gray.cc: Rename as...
* tests/literal/medium_gray.cc: ...this.
* tests/literal/literal_zero.cc: Rename as...
* tests/literal/zero.cc: ...this.
* tests/literal/one.cc: New.
* tests/literal/white.cc: New.
---
mln/literal/black.hh | 9 +++++-
mln/literal/colors.hh | 14 ++++++++--
mln/literal/grays.hh | 9 +++++-
mln/literal/one.hh | 4 ++
mln/literal/origin.hh | 9 +++++-
mln/literal/white.hh | 9 +++++-
tests/literal/black.cc | 52 ++++++++++++++++++++++++++++++++++++++
tests/literal/medium_gray.cc | 57 ++++++++++++++++++++++++++++++++++++++++++
tests/literal/one.cc | 58 +++++++++++++++++++++++++++++++++++++++++++
tests/literal/white.cc | 53 +++++++++++++++++++++++++++++++++++++++
tests/literal/zero.cc | 58 +++++++++++++++++++++++++++++++++++++++++++
11 files changed, 323 insertions(+), 9 deletions(-)
Index: trunk/milena/tests/literal/literal_zero.cc (deleted)
===================================================================
Index: trunk/milena/tests/literal/literal_medium_gray.cc (deleted)
===================================================================
Index: trunk/milena/tests/literal/black.cc
===================================================================
--- trunk/milena/tests/literal/black.cc (revision 0)
+++ trunk/milena/tests/literal/black.cc (revision 1484)
@@ -0,0 +1,52 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library 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 library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/*! \file tests/literal/black.cc
+ *
+ * \brief Tests on mln::literal::black.
+ */
+
+#include <mln/value/rgb8.hh>
+#include <mln/literal/black.hh>
+
+
+int main()
+{
+ using namespace mln;
+ using value::rgb8;
+ using literal::black;
+
+ {
+ rgb8 c(0, 0, 0);
+
+ c.green() = 254;
+ mln_assertion(c != black);
+
+ c = black;
+ mln_assertion(c == black);
+ }
+}
Index: trunk/milena/tests/literal/zero.cc
===================================================================
--- trunk/milena/tests/literal/zero.cc (revision 0)
+++ trunk/milena/tests/literal/zero.cc (revision 1484)
@@ -0,0 +1,58 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library 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 library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/*! \file tests/literal/zero.cc
+ *
+ * \brief Tests on mln::literal::zero.
+ */
+
+#include <mln/literal/zero.hh>
+#include <mln/literal/one.hh>
+#include <mln/literal/ops.hh>
+#include <mln/value/int_u8.hh>
+
+
+
+int main()
+{
+ using namespace mln;
+
+ unsigned char c;
+ c = literal::zero;
+ mln_assertion(c == 0);
+
+ double d;
+ d = literal::zero;
+ mln_assertion(d == 0);
+
+ mln_assertion(literal::zero != literal::one);
+
+ value::int_u8 u(literal::zero), uu;
+ uu = literal::zero;
+
+ mln_assertion(u == 0 && 0 == u);
+}
Index: trunk/milena/tests/literal/white.cc
===================================================================
--- trunk/milena/tests/literal/white.cc (revision 0)
+++ trunk/milena/tests/literal/white.cc (revision 1484)
@@ -0,0 +1,53 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library 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 library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/*! \file tests/literal/white.cc
+ *
+ * \brief Tests on mln::literal::white.
+ */
+
+#include <mln/value/rgb8.hh>
+#include <mln/literal/white.hh>
+
+
+int main()
+{
+ using namespace mln;
+ using value::rgb8;
+ using literal::white;
+
+ {
+ rgb8 c(255, 255, 255);
+
+
+ c.green() = 254;
+ mln_assertion(c != white);
+
+ c = white;
+ mln_assertion(c == white);
+ }
+}
Index: trunk/milena/tests/literal/one.cc
===================================================================
--- trunk/milena/tests/literal/one.cc (revision 0)
+++ trunk/milena/tests/literal/one.cc (revision 1484)
@@ -0,0 +1,58 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library 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 library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/*! \file tests/literal/one.cc
+ *
+ * \brief Tests on mln::literal::one.
+ */
+
+#include <mln/literal/one.hh>
+#include <mln/literal/zero.hh>
+#include <mln/literal/ops.hh>
+#include <mln/value/int_u8.hh>
+
+
+
+int main()
+{
+ using namespace mln;
+
+ unsigned char c;
+ c = literal::one;
+ mln_assertion(c == 1);
+
+ double d;
+ d = literal::one;
+ mln_assertion(d == 1);
+
+ mln_assertion(literal::one != literal::zero);
+
+ value::int_u8 u(literal::one), uu;
+ uu = literal::one;
+
+ mln_assertion(u == 1 && 1 == u);
+}
Index: trunk/milena/tests/literal/medium_gray.cc
===================================================================
--- trunk/milena/tests/literal/medium_gray.cc (revision 0)
+++ trunk/milena/tests/literal/medium_gray.cc (revision 1484)
@@ -0,0 +1,57 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library 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 library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/*! \file tests/literal/medium_gray.cc
+ *
+ * \brief Tests on mln::literal::medium_gray.
+ */
+
+#include <mln/literal/grays.hh>
+#include <mln/value/graylevel.hh>
+
+
+int main()
+{
+ using namespace mln;
+
+ using literal::medium_gray;
+ using value::gl8;
+ using value::gl16;
+
+ gl8 a;
+ gl16 b;
+
+ a = medium_gray;
+
+ std::cout << int(a.value()) << std::endl;
+
+ b = a;
+ std::cout << int(b.value()) << std::endl;
+
+ b = medium_gray;
+ std::cout << int(b.value()) << std::endl;
+}
Index: trunk/milena/mln/literal/colors.hh
===================================================================
--- trunk/milena/mln/literal/colors.hh (revision 1483)
+++ trunk/milena/mln/literal/colors.hh (revision 1484)
@@ -58,13 +58,21 @@
/// Literal red.
- static red_t red = red_t();
+ extern const red_t& red;
/// Literal green.
- static green_t green = green_t();
+ extern const green_t& green;
/// Literal blue.
- static blue_t blue = blue_t();
+ extern const blue_t& blue;
+
+# ifndef MLN_INCLUDE_ONLY
+
+ const red_t& red = red_t();
+ const green_t& green = green_t();
+ const blue_t& blue = blue_t();
+
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::literal
Index: trunk/milena/mln/literal/one.hh
===================================================================
--- trunk/milena/mln/literal/one.hh (revision 1483)
+++ trunk/milena/mln/literal/one.hh (revision 1484)
@@ -54,7 +54,7 @@
/// Literal one.
- static one_t one = one_t();
+ extern const one_t& one;
# ifndef MLN_INCLUDE_ONLY
@@ -66,6 +66,8 @@
return 1;
}
+ const one_t& one = one_t();
+
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::literal
Index: trunk/milena/mln/literal/grays.hh
===================================================================
--- trunk/milena/mln/literal/grays.hh (revision 1483)
+++ trunk/milena/mln/literal/grays.hh (revision 1484)
@@ -47,7 +47,14 @@
};
/// Literal medium_gray.
- static medium_gray_t medium_gray = medium_gray_t();
+ extern const medium_gray_t& medium_gray;
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ const medium_gray_t& medium_gray = medium_gray_t();
+
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::literal
Index: trunk/milena/mln/literal/origin.hh
===================================================================
--- trunk/milena/mln/literal/origin.hh (revision 1483)
+++ trunk/milena/mln/literal/origin.hh (revision 1484)
@@ -47,9 +47,14 @@
{
};
-
/// Literal origin.
- static origin_t origin = origin_t();
+ extern const origin_t& origin;
+
+# ifndef MLN_INCLUDE_ONLY
+
+ const origin_t& origin = origin_t();
+
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::literal
Index: trunk/milena/mln/literal/black.hh
===================================================================
--- trunk/milena/mln/literal/black.hh (revision 1483)
+++ trunk/milena/mln/literal/black.hh (revision 1484)
@@ -48,7 +48,14 @@
/// Literal black.
- static black_t black = black_t();
+ extern const black_t& black;
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ const black_t& black = black_t();
+
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::literal
Index: trunk/milena/mln/literal/white.hh
===================================================================
--- trunk/milena/mln/literal/white.hh (revision 1483)
+++ trunk/milena/mln/literal/white.hh (revision 1484)
@@ -48,7 +48,14 @@
/// Literal white.
- static white_t white = white_t();
+ extern const white_t& white;
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ const white_t& white = white_t();
+
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::literal
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2007-11-15 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
Move literals tests into tests/literal directory.
* tests/literal: New.
* tests/literal_medium_gray.cc: Rename as...
* tests/literal/literal_medium_gray.cc: ...this.
* tests/literal_zero.cc: Rename as...
* tests/literal/literal_zero.cc: ...this.
---
literal_medium_gray.cc | 57 ++++++++++++++++++++++++++++++++++++++++++++++++
literal_zero.cc | 58 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 115 insertions(+)
Index: trunk/milena/tests/literal_zero.cc (deleted)
===================================================================
Index: trunk/milena/tests/literal_medium_gray.cc (deleted)
===================================================================
Index: trunk/milena/tests/literal/literal_zero.cc
===================================================================
--- trunk/milena/tests/literal/literal_zero.cc (revision 0)
+++ trunk/milena/tests/literal/literal_zero.cc (revision 1483)
@@ -0,0 +1,58 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library 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 library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/*! \file tests/literal_zero.cc
+ *
+ * \brief Tests on mln::literal::zero.
+ */
+
+#include <mln/literal/zero.hh>
+#include <mln/literal/one.hh>
+#include <mln/literal/ops.hh>
+#include <mln/value/int_u8.hh>
+
+
+
+int main()
+{
+ using namespace mln;
+
+ unsigned char c;
+ c = literal::zero;
+ mln_assertion(c == 0);
+
+ double d;
+ d = literal::zero;
+ mln_assertion(d == 0);
+
+ mln_assertion(literal::zero != literal::one);
+
+ value::int_u8 u(literal::zero), uu;
+ uu = literal::zero;
+
+ mln_assertion(u == 0 && 0 == u);
+}
Index: trunk/milena/tests/literal/literal_medium_gray.cc
===================================================================
--- trunk/milena/tests/literal/literal_medium_gray.cc (revision 0)
+++ trunk/milena/tests/literal/literal_medium_gray.cc (revision 1483)
@@ -0,0 +1,57 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library 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 library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/*! \file tests/literal_medium_gray.cc
+ *
+ * \brief Tests on mln::literal::medium_gray.
+ */
+
+#include <mln/literal/grays.hh>
+#include <mln/value/graylevel.hh>
+
+
+int main()
+{
+ using namespace mln;
+
+ using literal::medium_gray;
+ using value::gl8;
+ using value::gl16;
+
+ gl8 a;
+ gl16 b;
+
+ a = medium_gray;
+
+ std::cout << int(a.value()) << std::endl;
+
+ b = a;
+ std::cout << int(b.value()) << std::endl;
+
+ b = medium_gray;
+ std::cout << int(b.value()) << std::endl;
+}
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2007-11-13 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
Add function save and show for pratical using.
* mln/display/save_and_show.hh: New function which saves and
show an image.
* tests/save_and_show.cc: New test for that.
---
mln/display/save_and_show.hh | 91 +++++++++++++++++++++++++++++++++++++++++++
tests/save_and_show.cc | 74 ++++++++++++++++++++++++++++++++++
2 files changed, 165 insertions(+)
Index: trunk/milena/tests/save_and_show.cc
===================================================================
--- trunk/milena/tests/save_and_show.cc (revision 0)
+++ trunk/milena/tests/save_and_show.cc (revision 1478)
@@ -0,0 +1,74 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library 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 library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/*! \file tests/save_and_show.cc
+ *
+ * \brief Tests on mln::display::show.
+ */
+
+# include <mln/core/image2d.hh>
+# include <mln/io/pbm/load.hh>
+# include <mln/make/win_chamfer.hh>
+# include <mln/geom/chamfer.hh>
+# include <mln/value/rgb8.hh>
+# include <mln/core/sub_image.hh>
+# include <mln/core/image_if_value.hh>
+# include <mln/core/inplace.hh>
+# include <mln/core/w_window2d_int.hh>
+# include <mln/display/show.hh>
+# include <mln/io/ppm/save.hh>
+# include <mln/display/save_and_show.hh>
+
+
+int main()
+{
+ using namespace mln;
+
+ unsigned max = 51;
+
+
+ image2d<bool> input = io::pbm::load("../img/toto.pbm");
+
+ // Create a weighted windows :
+ // 0 2 0
+ // 2 p 2
+ // 0 2 0
+ const w_window2d_int& w_win = make::mk_chamfer_3x3_int<2, 0> ();
+
+ // Call chamfer for a distance image.
+ image2d<unsigned> tmp = geom::chamfer(input, w_win, max);
+
+ // Call color_pretty for sub_image.
+ for (unsigned i = 2; i < 6; i += 2)
+ {
+ image_if_value<image2d<unsigned> > t = inplace (tmp | i);
+ display::save_and_show (t, "xv");
+ }
+
+// image2d<value::rgb8> ima (100, 100);
+// display::save_and_show (ima, "xv");
+}
Index: trunk/milena/mln/display/save_and_show.hh
===================================================================
--- trunk/milena/mln/display/save_and_show.hh (revision 0)
+++ trunk/milena/mln/display/save_and_show.hh (revision 1478)
@@ -0,0 +1,91 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library 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 library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_DISPLAY_SAVE_AND_SHOW_HH
+# define MLN_DISPLAY_SAVE_AND_SHOW_HH
+
+/*! \file mln/display/save_and_show.hh
+ *
+ * \brief Definition of function which saves and shows an image in the
+ * same call.
+ */
+
+# include <mln/display/save.hh>
+# include <mln/display/show.hh>
+
+namespace mln
+{
+
+ namespace display
+ {
+
+ template <typename I>
+ void
+ save_and_show(const Image<I>& input_, std::string cmd);
+
+# ifndef MLN_INCLUDE_ONLY
+
+ namespace impl
+ {
+ template <typename I>
+ void
+ save_and_show_(trait::value::kind::color,
+ const Image<I>& input, std::string cmd)
+ {
+ save_color(input);
+ show(input, cmd);
+ }
+
+ template <typename I>
+ void
+ save_and_show_(trait::value::kind::any,
+ const Image<I>& input,
+ std::string cmd)
+ {
+ save(input);
+ show(input, cmd);
+ }
+
+ } // end of namespace mln::display::impl
+
+ /// Facade.
+ template <typename I>
+ void
+ save_and_show(const Image<I>& input_, std::string cmd)
+ {
+ impl::save_and_show_(mln_trait_value_kind(mln_value(I)) (),
+ input_, cmd);
+ }
+
+# endif // !MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::display
+
+} // end of namespace mln
+
+
+#endif // ! MLN_DISPLAY_SAVE_AND_SHOW_HH
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2007-11-13 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
Exclude sandbox and *spe.hh from documentation.
* doc/Doxyfile.in: Set EXCLUDE and EXCLUDE_PATTERNS.
---
Doxyfile.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: trunk/milena/doc/Doxyfile.in
===================================================================
--- trunk/milena/doc/Doxyfile.in (revision 1475)
+++ trunk/milena/doc/Doxyfile.in (revision 1476)
@@ -501,7 +501,7 @@
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
-EXCLUDE =
+EXCLUDE = @top_srcdir@/milena/sandbox
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded
@@ -515,7 +515,7 @@
# against the file with absolute path, so to exclude all test directories
# for example use the pattern */test/*
-EXCLUDE_PATTERNS =
+EXCLUDE_PATTERNS = *spe.hh
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol
# names (namespaces, classes, functions, etc.) that should be excluded