Commit a58172d2 authored by Thierry Geraud's avatar Thierry Geraud
Browse files

2006-09-18 Thierry GERAUD <theo@tegucigalpa.lrde.epita.fr>

	Rename point set related classes.
	
	* oln/core/pset_entry.hh: Update and rename as...
	* oln/core/point_set_entry.hh: ...this.
	* oln/core/abstract/pset_fixed.hh: Update and rename as...
	* oln/core/abstract/point_set_having_known_size.hh: ...this.
	* oln/core/abstract/pset_ra.hh: Update and rename as...
	* oln/core/abstract/point_set_being_random_accessible.hh: ...this.
	* oln/core/abstract/pset_bboxed.hh: Update and rename as...
	* oln/core/abstract/point_set_having_bbox.hh: ...this.
	* oln/core/abstract/pset.hh: Update and rename as...
	* oln/core/abstract/point_set.hh: ...this.
	* oln/core/abstract/pset_hierarchies.hh: Update and rename as...
	* oln/core/abstract/point_set_hierarchies.hh: ...this.
	* oln/core/abstract/pset_cnx.hh: Update and rename as...
	* oln/core/abstract/point_set_being_connected.hh: ...this.
	* oln/core/abstract/piter.hh: Update and rename as...
	* oln/core/abstract/iterator_on_points.hh: ...this.
	* oln/core/abstract/iter.hh: Update and rename as...
	* oln/core/abstract/iterator.hh: ...this.
	* oln/core/typedefs.hh
	(fixed_type, ra_type, cnx_type): Rename as...
	(has_known_size_type, is_random_accessible_type): ...these and...
	(is_connected_type): ....this.
	* oln/core/abstract/bbox.hh: Update.
	* oln/core/gen/fwd_piter.hh: Update.
	* oln/core/gen/bkd_piter.hh: Update.



git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@549 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent 6891a65c
2006-09-18 Thierry GERAUD <theo@tegucigalpa.lrde.epita.fr>
Rename point set related classes.
* oln/core/pset_entry.hh: Update and rename as...
* oln/core/point_set_entry.hh: ...this.
* oln/core/abstract/pset_fixed.hh: Update and rename as...
* oln/core/abstract/point_set_having_known_size.hh: ...this.
* oln/core/abstract/pset_ra.hh: Update and rename as...
* oln/core/abstract/point_set_being_random_accessible.hh: ...this.
* oln/core/abstract/pset_bboxed.hh: Update and rename as...
* oln/core/abstract/point_set_having_bbox.hh: ...this.
* oln/core/abstract/pset.hh: Update and rename as...
* oln/core/abstract/point_set.hh: ...this.
* oln/core/abstract/pset_hierarchies.hh: Update and rename as...
* oln/core/abstract/point_set_hierarchies.hh: ...this.
* oln/core/abstract/pset_cnx.hh: Update and rename as...
* oln/core/abstract/point_set_being_connected.hh: ...this.
* oln/core/abstract/piter.hh: Update and rename as...
* oln/core/abstract/iterator_on_points.hh: ...this.
* oln/core/abstract/iter.hh: Update and rename as...
* oln/core/abstract/iterator.hh: ...this.
* oln/core/typedefs.hh
(fixed_type, ra_type, cnx_type): Rename as...
(has_known_size_type, is_random_accessible_type): ...these and...
(is_connected_type): ....this.
* oln/core/abstract/bbox.hh: Update.
* oln/core/gen/fwd_piter.hh: Update.
* oln/core/gen/bkd_piter.hh: Update.
2006-09-18 Thierry GERAUD <theo@tegucigalpa.lrde.epita.fr>
Add oln topology class for enlarged bbox.
......
......@@ -29,7 +29,7 @@
#ifndef OLENA_CORE_ABSTRACT_BBOX_HH
# define OLENA_CORE_ABSTRACT_BBOX_HH
# include <oln/core/pset_entry.hh>
# include <oln/core/point_set_entry.hh>
namespace oln
......@@ -43,7 +43,7 @@ namespace oln
template <typename E>
struct set_super_type< abstract::bbox<E> >
{
typedef pset_entry<E> ret;
typedef point_set_entry<E> ret;
};
......@@ -51,9 +51,9 @@ namespace oln
template <typename E>
struct vtypes< abstract::bbox<E> >
{
typedef mlc::true_ ra_type;
typedef mlc::true_ fixed_type;
typedef mlc::true_ cnx_type;
typedef mlc::true_ is_random_accessible_type;
typedef mlc::true_ has_know_size_type;
typedef mlc::true_ is_connected_type;
typedef E bbox_type;
};
......@@ -63,7 +63,7 @@ namespace oln
/// Abstract bbox (bounding box) class.
template <typename E>
class bbox : public pset_entry<E>
class bbox : public point_set_entry<E>
{
typedef oln_type_of(E, point) point_t;
......
......@@ -26,8 +26,8 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
#ifndef OLENA_CORE_ABSTRACT_ITER_HH
# define OLENA_CORE_ABSTRACT_ITER_HH
#ifndef OLENA_CORE_ABSTRACT_ITERATOR_HH
# define OLENA_CORE_ABSTRACT_ITERATOR_HH
# include <oln/core/typedefs.hh>
......@@ -41,8 +41,8 @@ namespace oln
/// Abstract iterator class.
template <typename E>
class iter : public stc::any__best_memory<E>,
public oln::type
class iterator : public stc::any__best_memory<E>,
public oln::type
{
public:
......@@ -69,11 +69,11 @@ namespace oln
protected:
iter()
iterator()
{
}
}; // end of class oln::abstract::iter<E>
}; // end of class oln::abstract::iterator<E>
} // end of namespace oln::abstract
......@@ -85,4 +85,4 @@ namespace oln
#define for_all(i) for (i.start(); i.is_valid(); i.next())
#endif // ! OLENA_CORE_ABSTRACT_ITER_HH
#endif // ! OLENA_CORE_ABSTRACT_ITERATOR_HH
......@@ -26,10 +26,10 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
#ifndef OLENA_CORE_ABSTRACT_PITER_HH
# define OLENA_CORE_ABSTRACT_PITER_HH
#ifndef OLENA_CORE_ABSTRACT_ITERATOR_ON_POINTS_HH
# define OLENA_CORE_ABSTRACT_ITERATOR_ON_POINTS_HH
# include <oln/core/abstract/iter.hh>
# include <oln/core/abstract/iterator.hh>
# include <oln/core/abstract/point.hh>
......@@ -38,20 +38,20 @@ namespace oln
// Forward declaration.
namespace abstract { template <typename E> class piter; }
namespace abstract { template <typename E> class iterator_on_points; }
// Super type declaration.
template <typename E>
struct set_super_type< abstract::piter<E> >
struct set_super_type< abstract::iterator_on_points<E> >
{
typedef abstract::iter<E> ret;
typedef abstract::iterator<E> ret;
};
/// Virtual types associated to abstract::piter<E>.
/// Virtual types associated to abstract::iterator_on_points<E>.
template <typename E>
struct vtypes< abstract::piter<E> >
struct vtypes< abstract::iterator_on_points<E> >
{
typedef mlc::undefined point_type;
};
......@@ -62,7 +62,7 @@ namespace oln
/// Abstract point iterator class.
template <typename E>
class piter : public abstract::iter<E>
class iterator_on_points : public abstract::iterator<E>
{
typedef oln_type_of(E, point) point_t;
......@@ -84,17 +84,17 @@ namespace oln
point_t p_;
piter()
iterator_on_points()
{
}
~piter()
~iterator_on_points()
{
mlc::assert_defined_< point_t >::check();
mlc::assert_< mlc_is_a(point_t, abstract::point) >::check();
}
}; // end of class oln::abstract::piter<E>
}; // end of class oln::abstract::iterator_on_points<E>
} // end of namespace oln::abstract
......@@ -103,4 +103,4 @@ namespace oln
} // end of namespace oln
#endif // ! OLENA_CORE_ABSTRACT_PITER_HH
#endif // ! OLENA_CORE_ABSTRACT_ITERATOR_ON_POINTS_HH
......@@ -25,8 +25,8 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
#ifndef OLENA_CORE_ABSTRACT_PSET_HH
# define OLENA_CORE_ABSTRACT_PSET_HH
#ifndef OLENA_CORE_ABSTRACT_POINT_SET_HH
# define OLENA_CORE_ABSTRACT_POINT_SET_HH
# include <oln/core/typedefs.hh>
......@@ -40,8 +40,8 @@ namespace oln
/// Abstract point class.
template <typename E>
class pset : public virtual stc::any__simple<E>,
public virtual oln::type
class point_set : public virtual stc::any__simple<E>,
public virtual oln::type
{
public:
......@@ -58,10 +58,10 @@ namespace oln
stc_virtual_typedef(fwd_piter);
stc_virtual_typedef(bkd_piter);
stc_virtual_typedef(bbox); // for being bboxed; provides .bbox()
stc_virtual_typedef(ra); // for random access; provides .has(p)
stc_virtual_typedef(fixed); // for fixed size; provides .npoints()
stc_virtual_typedef(cnx); // for connected; provides, e.g., .nrows()
stc_virtual_typedef(bbox); // provides .bbox()
stc_virtual_typedef(is_random_accessible); // provides .has(p)
stc_virtual_typedef(has_known_size); // provides .npoints()
stc_virtual_typedef(is_connected); // provides, e.g., .nrows()
// derived from point:
stc_virtual_typedef(coord);
......@@ -79,12 +79,12 @@ namespace oln
protected:
pset()
point_set()
{}
~pset() { decl(); }
~point_set() { decl(); }
}; // end of class oln::abstract::pset<E>
}; // end of class oln::abstract::point_set<E>
......@@ -94,8 +94,8 @@ namespace oln
# include <oln/core/abstract/pset_hierarchies.hh>
# include <oln/core/abstract/point_set_hierarchies.hh>
#endif // ! OLENA_CORE_ABSTRACT_PSET_HH
#endif // ! OLENA_CORE_ABSTRACT_POINT_SET_HH
......@@ -25,10 +25,10 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
#ifndef OLENA_CORE_ABSTRACT_PSET_CNX_HH
# define OLENA_CORE_ABSTRACT_PSET_CNX_HH
#ifndef OLENA_CORE_ABSTRACT_POINT_SET_BEING_CONNECTED_HH
# define OLENA_CORE_ABSTRACT_POINT_SET_BEING_CONNECTED_HH
# include <oln/core/abstract/pset.hh>
# include <oln/core/abstract/point_set.hh>
namespace oln
......@@ -39,7 +39,7 @@ namespace oln
template <typename E>
class cnx2d_pset : public virtual abstract::pset<E>
class point_set_being_2d_connected : public virtual abstract::point_set<E>
{
public:
......@@ -57,7 +57,7 @@ namespace oln
protected:
cnx2d_pset()
point_set_being_2d_connected()
{}
};
......@@ -67,17 +67,16 @@ namespace oln
template <typename E>
struct case_ < pset_cnx_hierarchy, E, 1 >
struct case_ < point_set_hierarchy_wrt_connectivity, E, 1 >
: where_< mlc::and_list_< mlc::neq_< oln_type_of(E, bbox), mlc::none >,
mlc::eq_< oln_type_of(E, cnx), mlc::true_ >,
mlc::eq_< oln_type_of(E, is_connected), mlc::true_ >,
mlc::eq_< oln_type_of(E, grid), grid2d > > >
{
typedef abstract::cnx2d_pset<E> ret;
typedef abstract::point_set_being_2d_connected<E> ret;
};
} // end of namespace oln
#endif // ! OLENA_CORE_ABSTRACT_PSET_CNX_HH
#endif // ! OLENA_CORE_ABSTRACT_POINT_SET_BEING_CONNECTED_HH
......@@ -25,10 +25,10 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
#ifndef OLENA_CORE_ABSTRACT_PSET_RA_HH
# define OLENA_CORE_ABSTRACT_PSET_RA_HH
#ifndef OLENA_CORE_ABSTRACT_POINT_SET_BEING_RANDOM_ACCESSIBLE_HH
# define OLENA_CORE_ABSTRACT_POINT_SET_BEING_RANDOM_ACCESSIBLE_HH
# include <oln/core/abstract/pset.hh>
# include <oln/core/abstract/point_set.hh>
......@@ -40,7 +40,7 @@ namespace oln
template <typename E>
class ra_pset : public virtual pset<E>
class point_set_being_random_accessible : public virtual point_set<E>
{
typedef oln_type_of(E, point) point_t;
......@@ -52,7 +52,7 @@ namespace oln
}
protected:
ra_pset()
point_set_being_random_accessible()
{}
};
......@@ -61,14 +61,14 @@ namespace oln
template <typename E>
struct case_ < pset_ra_hierarchy, E, 1 >
: where_< mlc::eq_< oln_type_of(E, ra), mlc::true_ > >
struct case_ < point_set_hierarchy_wrt_accessibility, E, 1 >
: where_< mlc::eq_< oln_type_of(E, is_random_accessible), mlc::true_ > >
{
typedef abstract::ra_pset<E> ret;
typedef abstract::point_set_being_random_accessible<E> ret;
};
} // end of namespace oln
#endif // ! OLENA_CORE_ABSTRACT_PSET_RA_HH
#endif // ! OLENA_CORE_ABSTRACT_POINT_SET_BEING_RANDOM_ACCESSIBLE_HH
......@@ -25,10 +25,10 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
#ifndef OLENA_CORE_ABSTRACT_PSET_BBOXED_HH
# define OLENA_CORE_ABSTRACT_PSET_BBOXED_HH
#ifndef OLENA_CORE_ABSTRACT_POINT_SET_HAVING_BBOX_HH
# define OLENA_CORE_ABSTRACT_POINT_SET_HAVING_BBOX_HH
# include <oln/core/abstract/pset.hh>
# include <oln/core/abstract/point_set.hh>
namespace oln
......@@ -39,7 +39,7 @@ namespace oln
template <typename E>
class bboxed_pset : public virtual pset<E>
class point_set_having_bbox : public virtual point_set<E>
{
typedef oln_type_of(E, point) point_t;
typedef oln_type_of(E, bbox) bbox_t;
......@@ -87,7 +87,7 @@ namespace oln
protected:
bboxed_pset()
point_set_having_bbox()
{}
point_t pmin_, pmax_;
......@@ -98,14 +98,14 @@ namespace oln
template <typename E>
struct case_ < pset_bboxed_hierarchy, E, 1 >
struct case_ < point_set_hierarchy_wrt_bbox, E, 1 >
: where_< mlc::neq_< oln_type_of(E, bbox), mlc::none > >
{
typedef abstract::bboxed_pset<E> ret;
typedef abstract::point_set_having_bbox<E> ret;
};
} // end of namespace oln
#endif // ! OLENA_CORE_ABSTRACT_PSET_BBOXED_HH
#endif // ! OLENA_CORE_ABSTRACT_POINT_SET_HAVING_BBOX_HH
......@@ -25,10 +25,10 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
#ifndef OLENA_CORE_ABSTRACT_PSET_FIXED_HH
# define OLENA_CORE_ABSTRACT_PSET_FIXED_HH
#ifndef OLENA_CORE_ABSTRACT_POINT_SET_HAVING_KNOWN_SIZE_HH
# define OLENA_CORE_ABSTRACT_POINT_SET_HAVING_KNOWN_SIZE_HH
# include <oln/core/abstract/pset.hh>
# include <oln/core/abstract/point_set.hh>
......@@ -40,7 +40,7 @@ namespace oln
template <typename E>
class fixed_pset : public virtual pset<E>
class point_set_having_known_size : public virtual point_set<E>
{
public:
......@@ -50,7 +50,7 @@ namespace oln
}
protected:
fixed_pset()
point_set_having_known_size()
{}
};
......@@ -59,15 +59,15 @@ namespace oln
template <typename E>
struct case_ < pset_fixed_hierarchy, E, 1 >
: where_< mlc::eq_< oln_type_of(E, fixed), mlc::true_ > >
struct case_ < point_set_hierarchy_wrt_known_size, E, 1 >
: where_< mlc::eq_< oln_type_of(E, has_known_size), mlc::true_ > >
{
typedef abstract::fixed_pset<E> ret;
typedef abstract::point_set_having_known_size<E> ret;
};
} // end of namespace oln
#endif // ! OLENA_CORE_ABSTRACT_PSET_FIXED_HH
#endif // ! OLENA_CORE_ABSTRACT_POINT_SET_HAVING_KNOWN_SIZE_HH
......@@ -25,29 +25,29 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
#ifndef OLENA_CORE_ABSTRACT_PSET_HIERARCHIES_HH
# define OLENA_CORE_ABSTRACT_PSET_HIERARCHIES_HH
#ifndef OLENA_CORE_ABSTRACT_POINT_SET_HIERARCHIES_HH
# define OLENA_CORE_ABSTRACT_POINT_SET_HIERARCHIES_HH
# include <oln/core/abstract/pset.hh>
# include <oln/core/abstract/point_set.hh>
namespace oln
{
typedef hierarchy< abstract::pset, 1 > pset_fixed_hierarchy;
typedef hierarchy< abstract::pset, 2 > pset_ra_hierarchy;
typedef hierarchy< abstract::pset, 3 > pset_bboxed_hierarchy;
typedef hierarchy< abstract::pset, 4 > pset_cnx_hierarchy;
typedef hierarchy< abstract::point_set, 1 > point_set_hierarchy_wrt_known_size;
typedef hierarchy< abstract::point_set, 2 > point_set_hierarchy_wrt_accessibility;
typedef hierarchy< abstract::point_set, 3 > point_set_hierarchy_wrt_bbox;
typedef hierarchy< abstract::point_set, 4 > point_set_hierarchy_wrt_connectivity;
} // end of namespace oln
# include <oln/core/abstract/pset_fixed.hh>
# include <oln/core/abstract/pset_ra.hh>
# include <oln/core/abstract/pset_bboxed.hh>
# include <oln/core/abstract/pset_cnx.hh>
# include <oln/core/abstract/point_set_having_known_size.hh>
# include <oln/core/abstract/point_set_being_random_accessible.hh>
# include <oln/core/abstract/point_set_having_bbox.hh>
# include <oln/core/abstract/point_set_being_connected.hh>
#endif // ! OLENA_CORE_ABSTRACT_PSET_HIERARCHIES_HH
#endif // ! OLENA_CORE_ABSTRACT_POINT_SET_HIERARCHIES_HH
......@@ -29,7 +29,7 @@
#ifndef OLENA_CORE_GEN_BKD_PITER_HH
# define OLENA_CORE_GEN_BKD_PITER_HH
# include <oln/core/abstract/piter.hh>
# include <oln/core/abstract/iterator_on_points.hh>
# include <oln/core/abstract/point.hh>
# include <oln/core/gen/bbox.hh>
......@@ -47,7 +47,7 @@ namespace oln
struct set_super_type< bkd_piter_<point> >
{
typedef bkd_piter_<point> self_t;
typedef abstract::piter<self_t> ret;
typedef abstract::iterator_on_points<self_t> ret;
};
......@@ -63,11 +63,11 @@ namespace oln
/// Abstract forward point iterator class.
template <typename point>
class bkd_piter_ : public abstract::piter< bkd_piter_<point> >,
class bkd_piter_ : public abstract::iterator_on_points< bkd_piter_<point> >,
private mlc::assert_< mlc_is_a(point, abstract::point) >
{
typedef bkd_piter_<point> self_t;
typedef abstract::piter<self_t> super_t;
typedef abstract::iterator_on_points<self_t> super_t;
using super_t::p_;
......
......@@ -29,7 +29,7 @@
#ifndef OLENA_CORE_GEN_FWD_PITER_HH
# define OLENA_CORE_GEN_FWD_PITER_HH
# include <oln/core/abstract/piter.hh>
# include <oln/core/abstract/iterator_on_points.hh>
# include <oln/core/abstract/point.hh>
# include <oln/core/gen/bbox.hh>
......@@ -47,7 +47,7 @@ namespace oln
struct set_super_type< fwd_piter_<point> >
{
typedef fwd_piter_<point> self_t;
typedef abstract::piter<self_t> ret;
typedef abstract::iterator_on_points<self_t> ret;
};
......@@ -63,11 +63,11 @@ namespace oln
/// Abstract forward point iterator class.
template <typename point>
class fwd_piter_ : public abstract::piter< fwd_piter_<point> >,
class fwd_piter_ : public abstract::iterator_on_points< fwd_piter_<point> >,
private mlc::assert_< mlc_is_a(point, abstract::point) >
{
typedef fwd_piter_<point> self_t;
typedef abstract::piter<self_t> super_t;
typedef abstract::iterator_on_points<self_t> super_t;
using super_t::p_;
......
......@@ -25,11 +25,11 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
#ifndef OLENA_CORE_PSET_ENTRY_HH
# define OLENA_CORE_PSET_ENTRY_HH
#ifndef OLENA_CORE_POINT_SET_ENTRY_HH
# define OLENA_CORE_POINT_SET_ENTRY_HH
# include <oln/core/abstract/entry.hh>
# include <oln/core/abstract/pset.hh>
# include <oln/core/abstract/point_set.hh>
......@@ -37,21 +37,21 @@ namespace oln
{
/// Entry class for point sets: pset_entry<E> is an alias for
/// entry< abstract::pset, E>.
/// Entry class for point sets: point_set_entry<E> is an alias for
/// entry< abstract::point_set, E>.
template <typename E>
struct pset_entry : public entry< abstract::pset, E>
struct point_set_entry : public entry< abstract::point_set, E>
{
protected:
pset_entry() {}
point_set_entry() {}
};
/// Virtual types associated to pset_entry<E>.
/// Virtual types associated to point_set_entry<E>.
template <typename E>
struct vtypes< pset_entry<E> >
struct vtypes< point_set_entry<E> >
{
typedef mlc::undefined point_type;
......@@ -60,13 +60,13 @@ namespace oln
typedef mlc::undefined bkd_piter_type;
typedef mlc::none bbox_type;
typedef mlc::undefined ra_type;
typedef mlc::undefined fixed_type;
typedef mlc::undefined is_random_accessible_type;
typedef mlc::undefined has_known_size_type;
};
template <typename E>
struct single_vtype< pset_entry<E>, typedef_::coord_type >
struct single_vtype< point_set_entry<E>, typedef_::coord_type >
{
typedef oln_type_of(E, point) P;
typedef oln_type_of(P, coord) ret;
......@@ -74,7 +74,7 @@ namespace oln
template <typename E>
struct single_vtype< pset_entry<E>, typedef_::grid_type >
struct single_vtype< point_set_entry<E>, typedef_::grid_type >
{
typedef oln_type_of(E, point) P;