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

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

	Test how to define derived associated types in bbox hierarchy.

	* oln/core/abstract/bbox.hh (ext_vtype_): New definitions of
	fwd_piter_type and bkd_piter_type.
	(~bbox): Comment possible recursive code.
	* oln/core/gen/bbox.hh (vtypes_): Comment former definitions of
	fwd_piter_type and bkd_piter_type.
	* oln/core/abstract/pset.hh (ext_vtype_): New definition for grid.
	(fwd_piter_type, bkd_piter_type): Comment because they are now
	externally defined.



git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@519 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent ae1fe4ac
2006-09-04 Thierry GERAUD <theo@tegucigalpa.lrde.epita.fr>
Test how to define derived associated types in bbox hierarchy.
* oln/core/abstract/bbox.hh (ext_vtype_): New definitions of
fwd_piter_type and bkd_piter_type.
(~bbox): Comment possible recursive code.
* oln/core/gen/bbox.hh (vtypes_): Comment former definitions of
fwd_piter_type and bkd_piter_type.
* oln/core/abstract/pset.hh (ext_vtype_): New definition for grid.
(fwd_piter_type, bkd_piter_type): Comment because they are now
externally defined.
2006-09-01 Thierry GERAUD <theo@tegucigalpa.lrde.epita.fr>
* oln/core/abstract/piter.hh (to_point): New.
......
......@@ -40,6 +40,8 @@ namespace oln
// Forward declaration.
namespace abstract { template <typename E> class bbox; }
template <typename point> class fwd_piter_;
template <typename point> class bkd_piter_;
// Super type declaration.
......@@ -50,6 +52,26 @@ namespace oln
};
template <typename E>
struct ext_vtype_< abstract::bbox<E>, typedef_::fwd_piter_type >
{
private:
typedef oln_type_of(E, point) P;
public:
typedef fwd_piter_<P> ret;
};
template <typename E>
struct ext_vtype_< abstract::bbox<E>, typedef_::bkd_piter_type >
{
private:
typedef oln_type_of(E, point) P;
public:
typedef bkd_piter_<P> ret;
};
namespace abstract
{
......@@ -234,17 +256,17 @@ namespace oln
mlc::assert_defined_< point_t >::check();
typedef oln_type_of(E, fwd_piter) fwd_piter_t;
typedef oln_type_of(E, bkd_piter) bkd_piter_t;
// typedef oln_type_of(E, fwd_piter) fwd_piter_t;
// typedef oln_type_of(E, bkd_piter) bkd_piter_t;
mlc::assert_defined_< fwd_piter_t >::check();
mlc::assert_defined_< bkd_piter_t >::check();
// mlc::assert_defined_< fwd_piter_t >::check();
// mlc::assert_defined_< bkd_piter_t >::check();
mlc::assert_< mlc::eq_< oln_type_of(fwd_piter_t, grid),
oln_type_of(point_t, grid) > >::check();
// mlc::assert_< mlc::eq_< oln_type_of(fwd_piter_t, grid),
// oln_type_of(point_t, grid) > >::check();
mlc::assert_< mlc::eq_< oln_type_of(bkd_piter_t, grid),
oln_type_of(point_t, grid) > >::check();
// mlc::assert_< mlc::eq_< oln_type_of(bkd_piter_t, grid),
// oln_type_of(point_t, grid) > >::check();
}
......
......@@ -47,10 +47,32 @@ namespace oln
struct vtypes_< abstract::pset<E> >
{
typedef mlc::undefined point_type;
typedef mlc::undefined fwd_piter_type;
typedef mlc::undefined bkd_piter_type;
typedef mlc::undefined coord_type;
// FIXME: Add grid.
// typedef mlc::undefined fwd_piter_type;
// typedef mlc::undefined bkd_piter_type;
};
// template <typename E>
// struct vtype_< abstract::pset<E>, typedef_::coord_type >
// : type_of_< oln_type_of(E, point), typedef_::coord_type >
// {};
// template <typename E>
// struct extension_vtype_< abstract::pset<E>, typedef_::coord_type >
// {
// private:
// typedef oln_type_of(E, point) P;
// public:
// typedef oln_type_of(P, coord) ret;
// };
template <typename E>
struct ext_vtype_< abstract::pset<E>, typedef_::grid_type >
{
typedef oln_type_of(E, point) P;
typedef oln_type_of(P, grid) ret;
};
......@@ -71,8 +93,9 @@ namespace oln
~pset()
{
mlc::assert_defined_< oln_type_of(E, point) >::check();
mlc::assert_defined_< oln_type_of(E, coord) >::check();
// FIXME: Trouble with circular dependencies.
// FIXME: BUG! Trouble with circular dependencies.
// mlc::assert_defined_< fwd_piter_t >::check();
// mlc::assert_defined_< bkd_piter_t >::check();
......
......@@ -56,11 +56,11 @@ namespace oln
struct vtypes_< bbox_<point> >
{
typedef point point_type;
typedef fwd_piter_<point> fwd_piter_type;
typedef bkd_piter_<point> bkd_piter_type;
// typedef fwd_piter_<point> fwd_piter_type;
// typedef bkd_piter_<point> bkd_piter_type;
typedef typename point::coord_t coord_type;
// BUG! typedef oln_type_of(point, grid) grid_type;
// BUG! typedef typename point::grid_t grid_type;
// FIXME: BUG! typedef oln_type_of(point, grid) grid_type;
// FIXME: BUG! typedef typename point::grid_t grid_type;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment