https://svn.lrde.epita.fr/svn/oln/trunk/olena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Fix explicit instantiations of oln::bbox_.
* oln/basics1d.hh (bbox_<point1d>): Move explicit
instantiation...
* oln/core/1d/bbox1d.hh: ...here (new file).
* oln/core/1d/image1d.hh: Include it.
* oln/basics2d.hh (bbox_<point2d>): Move explicit
instantiation...
* oln/core/2d/bbox2d.hh: ...here (new file).
* oln/core/2d/image2d.hh: Include it.
* oln/core/3d/bbox3d.hh: New file.
* oln/basics3d.hh, oln/core/3d/image3d.hh: Include it.
* oln/Makefile.am (nobase_oln_HEADERS): Add core/1d/bbox1d.hh,
core/2d/bbox2d.hh and core/3d/bbox3d.hh.
* oln/core/2d/array2d.hh: Aesthetic changes.
Makefile.am | 3 +++
basics1d.hh | 7 +------
basics2d.hh | 7 +------
basics3d.hh | 2 +-
core/1d/bbox1d.hh | 45 +++++++++++++++++++++++++++++++++++++++++++++
core/1d/image1d.hh | 5 +++--
core/2d/bbox2d.hh | 46 ++++++++++++++++++++++++++++++++++++++++++++++
core/2d/image2d.hh | 5 +++--
core/3d/bbox3d.hh | 46 ++++++++++++++++++++++++++++++++++++++++++++++
core/3d/image3d.hh | 13 ++++++-------
10 files changed, 155 insertions(+), 24 deletions(-)
Index: oln/basics1d.hh
--- oln/basics1d.hh (revision 625)
+++ oln/basics1d.hh (working copy)
@@ -38,13 +38,8 @@
# include <oln/core/1d/dpoint1d.hh>
# include <oln/core/gen/bbox.hh>
-// FIXME: Inexplicably, this explicit instantiation is required to
-// have topo_lbbox_<point1d> work. See if we can get rid of it.
-namespace oln {
- template class bbox_<point1d>;
-}
-
# include <oln/core/gen/topo_lbbox.hh>
+# include <oln/core/1d/bbox1d.hh>
# include <oln/core/gen/fwd_piter_bbox.hh>
# include <oln/core/gen/bkd_piter_bbox.hh>
Index: oln/core/1d/bbox1d.hh
--- oln/core/1d/bbox1d.hh (revision 0)
+++ oln/core/1d/bbox1d.hh (revision 0)
@@ -0,0 +1,45 @@
+// Copyright (C) 2006 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 OLN_CORE_1D_BBOX1D_HH
+# define OLN_CORE_1D_BBOX1D_HH
+
+# include <oln/core/1d/aliases.hh>
+# include <oln/core/1d/point1d.hh>
+# include <oln/core/gen/bbox.hh>
+
+namespace oln
+{
+
+ // FIXME: Inexplicably, this explicit instantiation is required to
+ // have topo_lbbox_<point1d> work. See if we can get rid of it.
+ template class bbox_<point1d>;
+
+} // end of namespace oln
+
+
+#endif // ! OLN_CORE_1D_BBOX1D_HH
Index: oln/core/1d/image1d.hh
--- oln/core/1d/image1d.hh (revision 625)
+++ oln/core/1d/image1d.hh (working copy)
@@ -30,10 +30,11 @@
# define OLN_CORE_1D_IMAGE1D_HH
# include <oln/core/image_entry.hh>
-# include <oln/core/1d/array1d.hh>
-# include <oln/core/1d/point1d.hh>
# include <oln/core/gen/topo_lbbox.hh>
# include <oln/core/internal/tracked_ptr.hh>
+# include <oln/core/1d/array1d.hh>
+# include <oln/core/1d/point1d.hh>
+# include <oln/core/1d/bbox1d.hh>
// For topo1d.
# include <oln/core/1d/aliases.hh>
// For fwd_piter and bkd_piter virtual types.
Index: oln/basics2d.hh
--- oln/basics2d.hh (revision 625)
+++ oln/basics2d.hh (working copy)
@@ -38,13 +38,8 @@
# include <oln/core/2d/dpoint2d.hh>
# include <oln/core/gen/bbox.hh>
-// FIXME: Inexplicably, this explicit instantiation is required to
-// have topo_lbbox_<point2d> work. See if we can get rid of it.
-namespace oln {
- template class bbox_<point2d>;
-}
-
# include <oln/core/gen/topo_lbbox.hh>
+# include <oln/core/2d/bbox2d.hh>
# include <oln/core/gen/fwd_piter_bbox.hh>
# include <oln/core/gen/bkd_piter_bbox.hh>
Index: oln/core/2d/bbox2d.hh
--- oln/core/2d/bbox2d.hh (revision 0)
+++ oln/core/2d/bbox2d.hh (revision 0)
@@ -0,0 +1,46 @@
+// Copyright (C) 2006 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 OLN_CORE_2D_BBOX2D_HH
+# define OLN_CORE_2D_BBOX2D_HH
+
+# include <oln/core/2d/aliases.hh>
+# include <oln/core/2d/point2d.hh>
+# include <oln/core/gen/bbox.hh>
+
+namespace oln
+{
+
+ typedef bbox_<point2d> bbox2d;
+ // FIXME: Inexplicably, this explicit instantiation is required to
+ // have topo_lbbox_<point2d> work. See if we can get rid of it.
+ template class bbox_<point2d>;
+
+} // end of namespace oln
+
+
+#endif // ! OLN_CORE_2D_BBOX2D_HH
Index: oln/core/2d/image2d.hh
--- oln/core/2d/image2d.hh (revision 625)
+++ oln/core/2d/image2d.hh (working copy)
@@ -30,10 +30,11 @@
# define OLN_CORE_2D_IMAGE2D_HH
# include <oln/core/image_entry.hh>
-# include <oln/core/2d/array2d.hh>
-# include <oln/core/2d/point2d.hh>
# include <oln/core/gen/topo_lbbox.hh>
# include <oln/core/internal/tracked_ptr.hh>
+# include <oln/core/2d/array2d.hh>
+# include <oln/core/2d/point2d.hh>
+# include <oln/core/2d/bbox2d.hh>
// For topo2d.
# include <oln/core/2d/aliases.hh>
// For fwd_piter and bkd_piter virtual types.
Index: oln/core/3d/bbox3d.hh
--- oln/core/3d/bbox3d.hh (revision 0)
+++ oln/core/3d/bbox3d.hh (revision 0)
@@ -0,0 +1,46 @@
+// Copyright (C) 2006 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 OLN_CORE_3D_BBOX3D_HH
+# define OLN_CORE_3D_BBOX3D_HH
+
+# include <oln/core/3d/aliases.hh>
+# include <oln/core/3d/point3d.hh>
+# include <oln/core/gen/bbox.hh>
+
+namespace oln
+{
+
+ typedef bbox_<point3d> bbox3d;
+ // FIXME: Inexplicably, this explicit instantiation is required to
+ // have topo_lbbox_<point3d> work. See if we can get rid of it.
+ template class bbox_<point3d>;
+
+} // end of namespace oln
+
+
+#endif // ! OLN_CORE_3D_BBOX3D_HH
Index: oln/basics3d.hh
--- oln/basics3d.hh (revision 625)
+++ oln/basics3d.hh (working copy)
@@ -39,8 +39,8 @@
# include <oln/core/3d/dpoint3d.hh>
# include <oln/core/gen/bbox.hh>
-
# include <oln/core/gen/topo_lbbox.hh>
+# include <oln/core/3d/bbox3d.hh>
# include <oln/core/gen/fwd_piter_bbox.hh>
Index: oln/core/3d/image3d.hh
--- oln/core/3d/image3d.hh (revision 625)
+++ oln/core/3d/image3d.hh (working copy)
@@ -30,22 +30,21 @@
# define OLN_CORE_3D_IMAGE3D_HH
# include <oln/core/image_entry.hh>
-# include <oln/core/3d/array3d.hh>
-# include <oln/core/3d/point3d.hh>
# include <oln/core/gen/topo_lbbox.hh>
# include <oln/core/internal/tracked_ptr.hh>
+# include <oln/core/3d/array3d.hh>
+# include <oln/core/3d/point3d.hh>
+# include <oln/core/3d/bbox3d.hh>
// For topo3d.
# include <oln/core/3d/aliases.hh>
+// For fwd_piter and bkd_piter virtual types.
+// FIXME: Really necessary?
+# include <oln/core/fwd_piter.hh>
namespace oln
{
- // FIXME: Inexplicably, this explicit instantiation is required to
- // have topo_lbbox_<point3d> work. See if we can get rid of it.
- template class bbox_<point3d>;
-
-
// Forward declaration.
template <typename T> class image3d;
Index: oln/Makefile.am
--- oln/Makefile.am (revision 625)
+++ oln/Makefile.am (working copy)
@@ -7,6 +7,7 @@
\
core/1d/aliases.hh \
core/1d/array1d.hh \
+ core/1d/bbox1d.hh \
core/1d/dpoint1d.hh \
core/1d/grid1d.hh \
core/1d/image1d.hh \
@@ -15,6 +16,7 @@
\
core/2d/aliases.hh \
core/2d/array2d.hh \
+ core/2d/bbox2d.hh \
core/2d/dpoint2d.hh \
core/2d/grid2d.hh \
core/2d/image2d.hh \
@@ -23,6 +25,7 @@
\
core/3d/aliases.hh \
core/3d/array3d.hh \
+ core/3d/bbox3d.hh \
core/3d/dpoint3d.hh \
core/3d/grid3d.hh \
core/3d/image3d.hh \
Index: oln/core/2d/array2d.hh