2006-09-15 Thierry GERAUD <theo@tegucigalpa.lrde.epita.fr> Adapt topology hierarchy to new naming convention. * oln/core/topo_entry.hh: Rename into... * oln/core/topology_entry.hh: ...this. * oln/core/abstract/topo.hh: Rename into... * oln/core/abstract/topology.hh: ...this. * oln/core/abstract/topo_with_bbox.hh: Rename into... * oln/core/abstract/topology_having_bbox.hh: ...this. * oln/core/abstract/topo_hierarchies.hh: Rename into... * oln/core/abstract/topology_hierarchies.hh: ...this. * oln/core/abstract/topo_ra.hh: Rename into... * oln/core/abstract/topology_being_random_accessible.hh: ...this. * oln/core/gen/bbox_topo.hh: Rename into... * oln/core/gen/topo_bbox.hh: ...this. * oln/core/typedefs.hh (is_random_accessible_type): New. * oln/core/2d/aliases.hh: Update. * oln/basics2d.hh: Update. * oln/Makefile.am: Update. Index: oln/core/typedefs.hh =================================================================== --- oln/core/typedefs.hh (revision 545) +++ oln/core/typedefs.hh (working copy) @@ -105,6 +105,7 @@ mlc_decl_typedef(fixed_type); mlc_decl_typedef(ra_type); + mlc_decl_typedef(is_random_accessible_type); mlc_decl_typedef(cnx_type); Index: oln/core/topology_entry.hh =================================================================== --- oln/core/topology_entry.hh (revision 543) +++ oln/core/topology_entry.hh (working copy) @@ -25,11 +25,11 @@ // reasons why the executable file might be covered by the GNU General // Public License. -#ifndef OLENA_CORE_TOPO_ENTRY_HH -# define OLENA_CORE_TOPO_ENTRY_HH +#ifndef OLENA_CORE_TOPOLOGY_ENTRY_HH +# define OLENA_CORE_TOPOLOGY_ENTRY_HH # include <oln/core/abstract/entry.hh> -# include <oln/core/abstract/topo.hh> +# include <oln/core/abstract/topology.hh> @@ -37,30 +37,30 @@ { - /// Entry class for point sets: topo_entry<E> is an alias for - /// entry< abstract::topo, E>. + /// Entry class for point sets: topology_entry<E> is an alias for + /// entry< abstract::topology, E>. template <typename E> - struct topo_entry : public entry< abstract::topo, E> + struct topology_entry : public entry< abstract::topology, E> { protected: - topo_entry() {} + topology_entry() {} }; - /// Virtual types associated to topo_entry<E>. + /// Virtual types associated to topology_entry<E>. template <typename E> - struct vtypes< topo_entry<E> > + struct vtypes< topology_entry<E> > { + typedef mlc::undefined point_type; typedef mlc::undefined bbox_type; - typedef mlc::undefined ra_type; - typedef mlc::undefined point_type; + typedef mlc::undefined is_random_accessible_type; }; } // end of namespace oln -#endif // ! OLENA_CORE_TOPO_ENTRY_HH +#endif // ! OLENA_CORE_TOPOLOGY_ENTRY_HH Index: oln/core/topo_entry.hh =================================================================== --- oln/core/topo_entry.hh (revision 545) +++ oln/core/topo_entry.hh (working copy) @@ -1,66 +0,0 @@ -// 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 OLENA_CORE_TOPO_ENTRY_HH -# define OLENA_CORE_TOPO_ENTRY_HH - -# include <oln/core/abstract/entry.hh> -# include <oln/core/abstract/topo.hh> - - - -namespace oln -{ - - - /// Entry class for point sets: topo_entry<E> is an alias for - /// entry< abstract::topo, E>. - - template <typename E> - struct topo_entry : public entry< abstract::topo, E> - { - protected: - topo_entry() {} - }; - - - /// Virtual types associated to topo_entry<E>. - - template <typename E> - struct vtypes< topo_entry<E> > - { - typedef mlc::undefined bbox_type; - typedef mlc::undefined ra_type; - - typedef mlc::undefined point_type; - }; - - -} // end of namespace oln - - -#endif // ! OLENA_CORE_TOPO_ENTRY_HH Index: oln/core/abstract/topo.hh =================================================================== --- oln/core/abstract/topo.hh (revision 545) +++ oln/core/abstract/topo.hh (working copy) @@ -1,83 +0,0 @@ -// 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 OLENA_CORE_ABSTRACT_TOPO_HH -# define OLENA_CORE_ABSTRACT_TOPO_HH - -# include <oln/core/typedefs.hh> - - -namespace oln -{ - - namespace abstract - { - - - /// Abstract point class. - template <typename E> - class topo : public virtual stc::any__simple<E>, - public virtual oln::type - { - public: - - struct decl - { - stc_virtual_typedef(bbox); // for being bboxed; provides .bbox() - stc_virtual_typedef(ra); // for random access; provides .has(p) - - stc_virtual_typedef(point); - - decl() { - // constraint: -// mlc::assert_< mlc::implies_< mlc::neq_< bbox, mlc::none >, -// mlc_is_a(bbox, abstract::bbox) > >::check(); - } - }; - - protected: - - topo() - {} - - ~topo() { decl(); } - - }; // end of class oln::abstract::topo<E> - - - - } // end of namespace oln::abstract - -} // end of namespace oln - - - -# include <oln/core/abstract/topo_hierarchies.hh> - - - -#endif // ! OLENA_CORE_ABSTRACT_TOPO_HH Index: oln/core/abstract/topology_hierarchies.hh =================================================================== --- oln/core/abstract/topology_hierarchies.hh (revision 543) +++ oln/core/abstract/topology_hierarchies.hh (working copy) @@ -25,25 +25,28 @@ // reasons why the executable file might be covered by the GNU General // Public License. -#ifndef OLENA_CORE_ABSTRACT_TOPO_HIERARCHIES_HH -# define OLENA_CORE_ABSTRACT_TOPO_HIERARCHIES_HH +#ifndef OLENA_CORE_ABSTRACT_TOPOLOGY_HIERARCHIES_HH +# define OLENA_CORE_ABSTRACT_TOPOLOGY_HIERARCHIES_HH -# include <oln/core/abstract/topo.hh> +# include <oln/core/abstract/topology.hh> namespace oln { - typedef hierarchy< abstract::topo, 1 > topo_ra_hierarchy; - typedef hierarchy< abstract::topo, 2 > topo_with_bbox_hierarchy; + typedef hierarchy< abstract::topology, 1 > topology_hierarchy_wrt_accessibility; + typedef hierarchy< abstract::topology, 2 > topology_hierarchy_wrt_bbox; } // end of namespace oln -# include <oln/core/abstract/topo_ra.hh> -# include <oln/core/abstract/topo_with_bbox.hh> +// hierarchy 1: topology wrt accessibility +# include <oln/core/abstract/topology_being_random_accessible.hh> +// hierarchy 2: topology wrt bbox +# include <oln/core/abstract/topology_having_bbox.hh> -#endif // ! OLENA_CORE_ABSTRACT_TOPO_HIERARCHIES_HH +#endif // ! OLENA_CORE_ABSTRACT_TOPOLOGY_HIERARCHIES_HH + Index: oln/core/abstract/topology_having_bbox.hh =================================================================== --- oln/core/abstract/topology_having_bbox.hh (revision 543) +++ oln/core/abstract/topology_having_bbox.hh (working copy) @@ -25,10 +25,10 @@ // reasons why the executable file might be covered by the GNU General // Public License. -#ifndef OLENA_CORE_ABSTRACT_TOPO_WITH_BBOX_HH -# define OLENA_CORE_ABSTRACT_TOPO_WITH_BBOX_HH +#ifndef OLENA_CORE_ABSTRACT_TOPOLOGY_HAVING_BBOX_HH +# define OLENA_CORE_ABSTRACT_TOPOLOGY_HAVING_BBOX_HH -# include <oln/core/abstract/topo.hh> +# include <oln/core/abstract/topology.hh> namespace oln @@ -39,7 +39,7 @@ template <typename E> - class topo_with_bbox : public virtual topo<E> + class topology_having_bbox : public virtual topology<E> { typedef oln_type_of(E, bbox) bbox_t; @@ -59,7 +59,7 @@ protected: - topo_with_bbox() + topology_having_bbox() {} }; @@ -68,14 +68,14 @@ template <typename E> - struct case_ < topo_with_bbox_hierarchy, E, 1 > + struct case_ < topology_hierarchy_wrt_bbox, E, 1 > : where_< mlc::neq_< oln_type_of(E, bbox), mlc::none > > { - typedef abstract::topo_with_bbox<E> ret; + typedef abstract::topology_having_bbox<E> ret; }; } // end of namespace oln -#endif // ! OLENA_CORE_ABSTRACT_TOPO_WITH_BBOX_HH +#endif // ! OLENA_CORE_ABSTRACT_TOPOLOGY_HAVING_BBOX_HH Index: oln/core/abstract/topo_with_bbox.hh =================================================================== --- oln/core/abstract/topo_with_bbox.hh (revision 545) +++ oln/core/abstract/topo_with_bbox.hh (working copy) @@ -1,81 +0,0 @@ -// 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 OLENA_CORE_ABSTRACT_TOPO_WITH_BBOX_HH -# define OLENA_CORE_ABSTRACT_TOPO_WITH_BBOX_HH - -# include <oln/core/abstract/topo.hh> - - -namespace oln -{ - - namespace abstract - { - - - template <typename E> - class topo_with_bbox : public virtual topo<E> - { - typedef oln_type_of(E, bbox) bbox_t; - - public: - - // abstract - const bbox_t& bbox() const - { - return this->exact().impl_bbox(); - } - - // concrete - operator bbox_t() const - { - return this->bbox(); - } - - protected: - - topo_with_bbox() - {} - }; - - - } // end of namespace oln::abstract - - - template <typename E> - struct case_ < topo_with_bbox_hierarchy, E, 1 > - : where_< mlc::neq_< oln_type_of(E, bbox), mlc::none > > - { - typedef abstract::topo_with_bbox<E> ret; - }; - - -} // end of namespace oln - - -#endif // ! OLENA_CORE_ABSTRACT_TOPO_WITH_BBOX_HH Index: oln/core/abstract/topo_hierarchies.hh =================================================================== --- oln/core/abstract/topo_hierarchies.hh (revision 545) +++ oln/core/abstract/topo_hierarchies.hh (working copy) @@ -1,49 +0,0 @@ -// 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 OLENA_CORE_ABSTRACT_TOPO_HIERARCHIES_HH -# define OLENA_CORE_ABSTRACT_TOPO_HIERARCHIES_HH - -# include <oln/core/abstract/topo.hh> - - -namespace oln -{ - - typedef hierarchy< abstract::topo, 1 > topo_ra_hierarchy; - typedef hierarchy< abstract::topo, 2 > topo_with_bbox_hierarchy; - -} // end of namespace oln - - -# include <oln/core/abstract/topo_ra.hh> -# include <oln/core/abstract/topo_with_bbox.hh> - - - -#endif // ! OLENA_CORE_ABSTRACT_TOPO_HIERARCHIES_HH - Index: oln/core/abstract/topology_being_random_accessible.hh =================================================================== --- oln/core/abstract/topology_being_random_accessible.hh (revision 543) +++ oln/core/abstract/topology_being_random_accessible.hh (working copy) @@ -25,10 +25,10 @@ // reasons why the executable file might be covered by the GNU General // Public License. -#ifndef OLENA_CORE_ABSTRACT_TOPO_RA_HH -# define OLENA_CORE_ABSTRACT_TOPO_RA_HH +#ifndef OLENA_CORE_ABSTRACT_TOPOLOGY_BEING_RANDOM_ACCESSIBLE_HH +# define OLENA_CORE_ABSTRACT_TOPOLOGY_BEING_RANDOM_ACCESSIBLE_HH -# include <oln/core/abstract/topo.hh> +# include <oln/core/abstract/topology.hh> @@ -40,7 +40,7 @@ template <typename E> - class ra_topo : public virtual topo<E> + class topology_being_random_accessible : public virtual topology<E> { typedef oln_type_of(E, point) point_t; @@ -52,7 +52,8 @@ } protected: - ra_topo() + + topology_being_random_accessible() {} }; @@ -61,14 +62,14 @@ template <typename E> - struct case_ < topo_ra_hierarchy, E, 1 > - : where_< mlc::eq_< oln_type_of(E, ra), mlc::true_ > > + struct case_ < topology_hierarchy_wrt_accessibility, E, 1 > + : where_< mlc::eq_< oln_type_of(E, is_random_accessible), mlc::true_ > > { - typedef abstract::ra_topo<E> ret; + typedef abstract::topology_being_random_accessible<E> ret; }; } // end of namespace oln -#endif // ! OLENA_CORE_ABSTRACT_TOPO_RA_HH +#endif // ! OLENA_CORE_ABSTRACT_TOPOLOGY_BEING_RANDOM_ACCESSIBLE_HH Index: oln/core/abstract/topo_ra.hh =================================================================== --- oln/core/abstract/topo_ra.hh (revision 545) +++ oln/core/abstract/topo_ra.hh (working copy) @@ -1,74 +0,0 @@ -// 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 OLENA_CORE_ABSTRACT_TOPO_RA_HH -# define OLENA_CORE_ABSTRACT_TOPO_RA_HH - -# include <oln/core/abstract/topo.hh> - - - -namespace oln -{ - - namespace abstract - { - - - template <typename E> - class ra_topo : public virtual topo<E> - { - typedef oln_type_of(E, point) point_t; - - public: - - bool has(const point_t& p) const - { - return this->exact().impl_has(p); - } - - protected: - ra_topo() - {} - }; - - - } // end of namespace oln::abstract - - - template <typename E> - struct case_ < topo_ra_hierarchy, E, 1 > - : where_< mlc::eq_< oln_type_of(E, ra), mlc::true_ > > - { - typedef abstract::ra_topo<E> ret; - }; - - -} // end of namespace oln - - -#endif // ! OLENA_CORE_ABSTRACT_TOPO_RA_HH Index: oln/core/abstract/topology.hh =================================================================== --- oln/core/abstract/topology.hh (revision 543) +++ oln/core/abstract/topology.hh (working copy) @@ -25,8 +25,8 @@ // reasons why the executable file might be covered by the GNU General // Public License. -#ifndef OLENA_CORE_ABSTRACT_TOPO_HH -# define OLENA_CORE_ABSTRACT_TOPO_HH +#ifndef OLENA_CORE_ABSTRACT_TOPOLOGY_HH +# define OLENA_CORE_ABSTRACT_TOPOLOGY_HH # include <oln/core/typedefs.hh> @@ -34,22 +34,26 @@ namespace oln { + namespace abstract { - /// Abstract point class. + /// Abstract topology class. template <typename E> - class topo : public virtual stc::any__simple<E>, - public virtual oln::type + class topology : public virtual stc::any__simple<E>, + public virtual oln::type { public: struct decl { - stc_virtual_typedef(bbox); // for being bboxed; provides .bbox() - stc_virtual_typedef(ra); // for random access; provides .has(p) + stc_virtual_typedef(bbox); + // for being bboxed; provides .bbox() + stc_virtual_typedef(is_random_accessible); + // provides .has(p) and .has_large(p) + stc_virtual_typedef(point); decl() { @@ -61,12 +65,12 @@ protected: - topo() + topology() {} - ~topo() { decl(); } + ~topology() { decl(); } - }; // end of class oln::abstract::topo<E> + }; // end of class oln::abstract::topology<E> @@ -76,8 +80,8 @@ -# include <oln/core/abstract/topo_hierarchies.hh> +# include <oln/core/abstract/topology_hierarchies.hh> -#endif // ! OLENA_CORE_ABSTRACT_TOPO_HH +#endif // ! OLENA_CORE_ABSTRACT_TOPOLOGY_HH Index: oln/core/2d/aliases.hh =================================================================== --- oln/core/2d/aliases.hh (revision 545) +++ oln/core/2d/aliases.hh (working copy) @@ -38,7 +38,7 @@ template <typename C> class point2d_; template <typename C> class dpoint2d_; template <typename P> class bbox_; - template <typename P> class bbox_topo_; + template <typename P> class topo_bbox_; template <typename P> class fwd_piter_; template <typename P> class bkd_piter_; class grid2d; @@ -53,7 +53,7 @@ typedef bbox_<point2d> bbox2d; typedef fwd_piter_<point2d> fwd_piter2d; typedef bkd_piter_<point2d> bkd_piter2d; - typedef bbox_topo_<point2d> topo2d; + typedef topo_bbox_<point2d> topo2d; typedef point2d_<float> point2df; typedef dpoint2d_<float> dpoint2df; Index: oln/core/gen/bbox_topo.hh =================================================================== --- oln/core/gen/bbox_topo.hh (revision 545) +++ oln/core/gen/bbox_topo.hh (working copy) @@ -1,95 +0,0 @@ -// 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 OLENA_CORE_GEN_BBOX_TOPO_HH -# define OLENA_CORE_GEN_BBOX_TOPO_HH - -# include <oln/core/gen/bbox.hh> -# include <oln/core/topo_entry.hh> - - - -namespace oln -{ - - - // Forward declarations. - template <typename point> class bbox_topo_; - - - // Super type declaration. - template <typename point> - struct set_super_type< bbox_topo_<point> > - { - typedef bbox_topo_<point> self_t; - typedef topo_entry<self_t> ret; - }; - - - /// Virtual types associated to oln::bbox_<point>. - template <typename point> - struct vtypes< bbox_topo_<point> > - { - typedef bbox_<point> bbox_type; - typedef point point_type; - typedef mlc::true_ ra_type; - }; - - - /// Bounding box topology based on a point class. - template <typename point> - class bbox_topo_ : public topo_entry< bbox_topo_<point> > - { - typedef bbox_<point> bbox_t; - - public: - - bbox_topo_() - { - } - - bbox_topo_(const bbox_t& bb) - : bb_(bb) - { - } - - const bbox_t& impl_bbox() const - { - return bb_; - } - - protected: - - bbox_<point> bb_; - - }; - - -} // end of namespace oln - - -#endif // ! OLENA_CORE_GEN_BBOX_TOPO_HH Index: oln/core/gen/topo_bbox.hh =================================================================== --- oln/core/gen/topo_bbox.hh (revision 543) +++ oln/core/gen/topo_bbox.hh (working copy) @@ -25,11 +25,11 @@ // reasons why the executable file might be covered by the GNU General // Public License. -#ifndef OLENA_CORE_GEN_BBOX_TOPO_HH -# define OLENA_CORE_GEN_BBOX_TOPO_HH +#ifndef OLENA_CORE_GEN_TOPO_BBOX_HH +# define OLENA_CORE_GEN_TOPO_BBOX_HH # include <oln/core/gen/bbox.hh> -# include <oln/core/topo_entry.hh> +# include <oln/core/topology_entry.hh> @@ -38,41 +38,41 @@ // Forward declarations. - template <typename point> class bbox_topo_; + template <typename point> class topo_bbox_; // Super type declaration. template <typename point> - struct set_super_type< bbox_topo_<point> > + struct set_super_type< topo_bbox_<point> > { - typedef bbox_topo_<point> self_t; - typedef topo_entry<self_t> ret; + typedef topo_bbox_<point> self_t; + typedef topology_entry<self_t> ret; }; /// Virtual types associated to oln::bbox_<point>. template <typename point> - struct vtypes< bbox_topo_<point> > + struct vtypes< topo_bbox_<point> > { typedef bbox_<point> bbox_type; typedef point point_type; - typedef mlc::true_ ra_type; + typedef mlc::true_ is_random_accessible_type; }; /// Bounding box topology based on a point class. template <typename point> - class bbox_topo_ : public topo_entry< bbox_topo_<point> > + class topo_bbox_ : public topology_entry< topo_bbox_<point> > { typedef bbox_<point> bbox_t; public: - bbox_topo_() + topo_bbox_() { } - bbox_topo_(const bbox_t& bb) + topo_bbox_(const bbox_t& bb) : bb_(bb) { } @@ -82,6 +82,11 @@ return bb_; } + bool impl_has(const point& p) const + { + return bb_.has(p); + } + protected: bbox_<point> bb_; @@ -92,4 +97,4 @@ } // end of namespace oln -#endif // ! OLENA_CORE_GEN_BBOX_TOPO_HH +#endif // ! OLENA_CORE_GEN_TOPO_BBOX_HH Index: oln/basics2d.hh =================================================================== --- oln/basics2d.hh (revision 545) +++ oln/basics2d.hh (working copy) @@ -47,8 +47,8 @@ # include <oln/core/gen/bkd_piter.hh> namespace oln { template class bkd_piter_<point2d>; } -# include <oln/core/gen/bbox_topo.hh> -namespace oln { template class bbox_topo_<point2d>; } +# include <oln/core/gen/topo_bbox.hh> +namespace oln { template class topo_bbox_<point2d>; } # include <oln/core/2d/image2d.hh> Index: oln/Makefile.am =================================================================== --- oln/Makefile.am (revision 545) +++ oln/Makefile.am (working copy) @@ -2,59 +2,59 @@ olndir = $(includedir)/oln -nobase_oln_HEADERS = \ - core/1d/grid1d.hh \ - \ - core/2d/grid2d.hh \ - core/2d/aliases.hh \ - core/2d/dpoint2d.hh \ - core/2d/grid2d.hh \ - core/2d/image2d.hh \ - core/2d/point2d.hh \ - \ - core/3d/grid3d.hh \ - \ - core/abstract/internal/image_impl.hh \ - \ - core/abstract/any.hh \ - core/abstract/bbox.hh \ - core/abstract/dpoint.hh \ - core/abstract/dpoint_nd.hh \ - core/abstract/entry.hh \ - core/abstract/grid.hh \ - core/abstract/image_dimension.hh \ - core/abstract/image.hh \ - core/abstract/image_hierarchies.hh \ - core/abstract/image_type.hh \ - core/abstract/image_type_integre.hh \ - core/abstract/iter.hh \ - core/abstract/piter.hh \ - core/abstract/point.hh \ - core/abstract/point_nd.hh \ - core/abstract/pset_bboxed.hh \ - core/abstract/pset_cnx.hh \ - core/abstract/pset_fixed.hh \ - core/abstract/pset.hh \ - core/abstract/pset_hierarchies.hh \ - core/abstract/pset_ra.hh \ - core/abstract/topo.hh \ - core/abstract/topo_hierarchies.hh \ - core/abstract/topo_ra.hh \ - core/abstract/topo_with_bbox.hh \ - \ - core/gen/bbox.hh \ - core/gen/bbox_topo.hh \ - core/gen/bkd_piter.hh \ - core/gen/fwd_piter.hh \ - \ - core/case.hh \ - core/image_entry.hh \ - core/macros.hh \ - core/pset_entry.hh \ - core/traits.hh \ - core/traits_id.hh \ - core/topo_entry.hh \ - core/typedefs.hh \ - core/type.hh \ - \ +nobase_oln_HEADERS = \ + core/1d/grid1d.hh \ + \ + core/2d/grid2d.hh \ + core/2d/aliases.hh \ + core/2d/dpoint2d.hh \ + core/2d/grid2d.hh \ + core/2d/image2d.hh \ + core/2d/point2d.hh \ + \ + core/3d/grid3d.hh \ + \ + core/abstract/internal/image_impl.hh \ + \ + core/abstract/any.hh \ + core/abstract/bbox.hh \ + core/abstract/dpoint.hh \ + core/abstract/dpoint_nd.hh \ + core/abstract/entry.hh \ + core/abstract/grid.hh \ + core/abstract/image_dimension.hh \ + core/abstract/image.hh \ + core/abstract/image_hierarchies.hh \ + core/abstract/image_type.hh \ + core/abstract/image_type_integre.hh \ + core/abstract/iter.hh \ + core/abstract/piter.hh \ + core/abstract/point.hh \ + core/abstract/point_nd.hh \ + core/abstract/pset_bboxed.hh \ + core/abstract/pset_cnx.hh \ + core/abstract/pset_fixed.hh \ + core/abstract/pset.hh \ + core/abstract/pset_hierarchies.hh \ + core/abstract/pset_ra.hh \ + core/abstract/topology.hh \ + core/abstract/topology_hierarchies.hh \ + core/abstract/topology_being_random_accessible.hh \ + core/abstract/topology_having_bbox.hh \ + \ + core/gen/bbox.hh \ + core/gen/topo_bbox.hh \ + core/gen/bkd_piter.hh \ + core/gen/fwd_piter.hh \ + \ + core/case.hh \ + core/image_entry.hh \ + core/macros.hh \ + core/pset_entry.hh \ + core/traits.hh \ + core/traits_id.hh \ + core/topology_entry.hh \ + core/typedefs.hh \ + core/type.hh \ + \ basics2d.hh