Commit e6d2b7e4 authored by Ugo Jardonnet's avatar Ugo Jardonnet
Browse files

Fix name lookup for attribute of super classes.

	* olena/oln/core/concept/image.hh,
	* olena/oln/core/gen/dpoints_piter.hh,
	* olena/oln/core/internal/point_base.hh,
	* olena/oln/core/internal/dpoint_base.hh: Fix name lookup
	for attribute of super classes.


git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@857 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent c4188fdf
2007-03-07 Ugo Jardonnet <ugo.jardonnet@lrde.epita.fr>
Fix name lookup for attribute of super classes.
* olena/oln/core/concept/image.hh,
* olena/oln/core/gen/dpoints_piter.hh,
* olena/oln/core/internal/point_base.hh,
* olena/oln/core/internal/dpoint_base.hh: Fix name lookup
for attribute of super classes.
2007-02-02 Roland Levillain <roland@lrde.epita.fr>
Configure new Makefiles of static/samples.
......
......@@ -412,21 +412,21 @@ namespace oln
typename Fast_Image<Exact>::rvalue
Fast_Image<Exact>::operator[](typename Fast_Image<Exact>::index i) const
{
return exact(this)->impl_index_read(p);
return exact(this)->impl_index_read(i);
}
template <typename Exact>
typename Fast_Image<Exact>::lvalue
Fast_Image<Exact>::operator[](typename Fast_Image<Exact>::index i)
{
return exact(this)->impl_index_read_write(p);
return exact(this)->impl_index_read_write(i);
}
template <typename Exact>
std::size_t
Fast_Image<Exact>::npoints() const
{
return exact(this)->impl_npoints(p);
return exact(this)->impl_npoints();
}
template <typename Exact>
......@@ -454,7 +454,6 @@ namespace oln
typename Value_Wise_Mutable_Image<Exact>::lvaluep
Value_Wise_Mutable_Image<Exact>::value(const typename Value_Wise_Accessible_Image<Exact>::vsite& v)
{
return exact(this)->impl_value_read_write(p);
}
template <typename Exact>
......@@ -503,7 +502,7 @@ namespace oln
bool
Point_Wise_Accessible_Image_2D<Exact>::impl_has_at(coord row, coord col) const
{
Point_Wise_Accessible_Image_2D<Exact>::point p(row, col);
typename Point_Wise_Accessible_Image_2D<Exact>::point p(row, col);
return this->has(p);
}
......@@ -511,7 +510,7 @@ namespace oln
typename Point_Wise_Accessible_Image_2D<Exact>::rvalue
Point_Wise_Accessible_Image_2D<Exact>::impl_at(coord row, coord col) const
{
Point_Wise_Accessible_Image_2D<Exact>::point p(row, col);
typename Point_Wise_Accessible_Image_2D<Exact>::point p(row, col);
return this->at(p);
}
......@@ -533,7 +532,7 @@ namespace oln
typename Point_Wise_Mutable_Image_2D<Exact>::lvalue
Point_Wise_Mutable_Image_2D<Exact>::impl_at(coord row, coord col)
{
Point_Wise_Mutable_Image_2D<Exact>::point p(row, col);
typename Point_Wise_Mutable_Image_2D<Exact>::point p(row, col);
return this->at(p);
}
......
......@@ -228,7 +228,7 @@ namespace oln
void
dpoints_fwd_piter_<P>::impl_start()
{
i_ = 0;
this->i_ = 0;
this->update_p_();
}
......@@ -236,7 +236,7 @@ namespace oln
void
dpoints_fwd_piter_<P>::impl_next()
{
if (++i_ == n_)
if (++this->i_ == this->n_)
return;
this->update_p_();
}
......@@ -256,7 +256,7 @@ namespace oln
void
dpoints_bkd_piter_<P>::impl_start()
{
i_ = n_ - 1;
this->i_ = this->n_ - 1;
this->update_p_();
}
......@@ -264,12 +264,12 @@ namespace oln
void
dpoints_bkd_piter_<P>::impl_next()
{
if (i_ == 0)
if (this->i_ == 0)
{
i_ = n_;
this->i_ = this->n_;
return;
}
--i_;
--this->i_;
this->update_p_();
}
......
......@@ -45,19 +45,19 @@ namespace oln
template <typename Exact>
struct super_trait_< internal::dpoint_base_<Exact> >
{
typedef Dpoint<Exact> ret;
typedef Dpoint<Exact> ret;
};
template <typename Exact>
struct vtypes< internal::dpoint_base_<Exact> >
{
typedef stc::abstract grid;
typedef stc::abstract grid;
typedef stc_deferred(grid) grid__;
typedef stc::final<stc_type(grid__, dim)> dim;
typedef stc_deferred(grid) grid__;
typedef stc::final<stc_type(grid__, dim)> dim;
typedef stc::abstract coord;
typedef stc::abstract point;
typedef stc::abstract coord;
typedef stc::abstract point;
};
......@@ -67,36 +67,38 @@ namespace oln
template <typename Exact>
class dpoint_base_ : public Dpoint<Exact>
{
typedef Dpoint<Exact> super;
typedef Dpoint<Exact> super;
public:
public:
stc_using(grid);
stc_using(coord);
stc_using(dim);
stc_using(point);
stc_using(grid);
stc_using(coord);
stc_using(dim);
stc_using(point);
coord operator[](unsigned i) const;
coord& operator[](unsigned i);
using super::n;
bool impl_op_equal_(const Exact& rhs) const;
coord operator[](unsigned i) const;
coord& operator[](unsigned i);
bool impl_op_less_(const Exact& rhs) const;
bool impl_op_equal_(const Exact& rhs) const;
Exact& impl_op_plus_equal_(const Exact& rhs);
bool impl_op_less_(const Exact& rhs) const;
Exact& impl_op_minus_equal_(const Exact& rhs);
Exact& impl_op_plus_equal_(const Exact& rhs);
Exact impl_op_unary_minus_() const;
Exact& impl_op_minus_equal_(const Exact& rhs);
typedef xtd::vec<n, coord> vec_t;
const vec_t& vec() const;
vec_t& vec();
Exact impl_op_unary_minus_() const;
protected:
dpoint_base_();
typedef xtd::vec<n, coord> vec_t;
const vec_t& vec() const;
vec_t& vec();
vec_t v_;
protected:
dpoint_base_();
vec_t v_;
};
......
......@@ -75,6 +75,8 @@ namespace oln
stc_using(dim);
stc_using(dpoint);
using super::n;
coord operator[](unsigned i) const;
coord& operator[](unsigned i);
......
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