Commit 274aeb4b authored by Thierry Geraud's avatar Thierry Geraud
Browse files

2006-10-17 Thierry GERAUD <theo@tegucigalpa.lrde.epita.fr>

	Adjust lvalue so that it handles a '&' when needed.
	
	* oln/core/automatic/image/image1d.hh (impl_at): Adjust.
	* oln/core/automatic/image/image2d.hh: Likewise.
	* oln/core/automatic/image/image3d.hh: Likewise.
	* oln/core/automatic/image/image_being_mutable.hh: Likewise.
	* oln/core/abstract/image/mutability/hierarchy.hh: Likewise.
	* oln/core/abstract/image/dimension/1d.hh: Likewise.
	* oln/core/abstract/image/dimension/2d.hh: Likewise.
	* oln/core/abstract/image/dimension/3d.hh: Likewise.
	* oln/core/1d/image1d.hh: Likewise.
	* oln/core/2d/image2d.hh: Likewise.
	* oln/core/3d/image3d.hh: Likewise.
	* oln/core/gen/mapimage.hh: Likewise.
	* oln/core/abstract/image/type/integre.hh: Fix case number wrt
	those defined in hierarchy.hh.



git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@650 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent 6eaababf
2006-10-17 Thierry GERAUD <theo@tegucigalpa.lrde.epita.fr>
Adjust lvalue so that it handles a '&' when needed.
* oln/core/automatic/image/image1d.hh (impl_at): Adjust.
* oln/core/automatic/image/image2d.hh: Likewise.
* oln/core/automatic/image/image3d.hh: Likewise.
* oln/core/automatic/image/image_being_mutable.hh: Likewise.
* oln/core/abstract/image/mutability/hierarchy.hh: Likewise.
* oln/core/abstract/image/dimension/1d.hh: Likewise.
* oln/core/abstract/image/dimension/2d.hh: Likewise.
* oln/core/abstract/image/dimension/3d.hh: Likewise.
* oln/core/1d/image1d.hh: Likewise.
* oln/core/2d/image2d.hh: Likewise.
* oln/core/3d/image3d.hh: Likewise.
* oln/core/gen/mapimage.hh: Likewise.
* oln/core/abstract/image/type/integre.hh: Fix case number wrt
those defined in hierarchy.hh.
2006-10-16 Roland Levillain <roland@lrde.epita.fr>
Adjust tests.
......
......@@ -59,7 +59,7 @@ namespace oln
typedef point1d point_type;
typedef T value_type;
typedef T lvalue_type;
typedef T& lvalue_type;
typedef mlc::true_ is_mutable_type;
typedef image1d<T> real_type;
......
......@@ -59,7 +59,7 @@ namespace oln
typedef point2d point_type;
typedef T value_type;
typedef T lvalue_type;
typedef T& lvalue_type;
typedef mlc::true_ is_mutable_type;
typedef image2d<T> real_type;
......
......@@ -59,7 +59,7 @@ namespace oln
typedef point3d point_type;
typedef T value_type;
typedef T lvalue_type;
typedef T& lvalue_type;
typedef mlc::true_ is_mutable_type;
typedef image3d<T> real_type;
......
......@@ -49,7 +49,7 @@ namespace oln
oln_rvalue(E) at(const oln_coord(E)& index) const;
// FIXME: Hack (should be elsewhere)!
oln_lvalue(E)& at(const oln_coord(E)& index);
oln_lvalue(E) at(const oln_coord(E)& index);
bool has_at(const oln_coord(E)& index) const;
protected:
......@@ -73,7 +73,7 @@ namespace oln
}
template <typename E>
oln_lvalue(E)&
oln_lvalue(E)
image1d<E>::at(const oln_coord(E)& index)
{
return this->exact().impl_at(index);
......
......@@ -49,7 +49,7 @@ namespace oln
oln_rvalue(E) at(const oln_coord(E)& row, const oln_coord(E)& col) const;
// FIXME: Hack (should be elsewhere)!
oln_lvalue(E)& at(const oln_coord(E)& row, const oln_coord(E)& col);
oln_lvalue(E) at(const oln_coord(E)& row, const oln_coord(E)& col);
bool has_at(const oln_coord(E)& row, const oln_coord(E)& col) const;
protected:
......@@ -73,7 +73,7 @@ namespace oln
}
template <typename E>
oln_lvalue(E)&
oln_lvalue(E)
image2d<E>::at(const oln_coord(E)& row, const oln_coord(E)& col)
{
return this->exact().impl_at(row, col);
......
......@@ -51,9 +51,9 @@ namespace oln
const oln_coord(E)& col) const;
// FIXME: Hack (should be elsewhere)!
oln_lvalue(E)& at(const oln_coord(E)& slice,
const oln_coord(E)& row,
const oln_coord(E)& col);
oln_lvalue(E) at(const oln_coord(E)& slice,
const oln_coord(E)& row,
const oln_coord(E)& col);
bool has_at(const oln_coord(E)& slice,
const oln_coord(E)& row,
const oln_coord(E)& col) const;
......@@ -81,7 +81,7 @@ namespace oln
}
template <typename E>
oln_lvalue(E)&
oln_lvalue(E)
image3d<E>::at(const oln_coord(E)& slice,
const oln_coord(E)& row,
const oln_coord(E)& col)
......
......@@ -68,7 +68,7 @@ namespace oln
using image<E>::operator();
lvalue_t& operator()(const psite_t& p);
lvalue_t operator()(const psite_t& p);
protected:
......@@ -84,7 +84,7 @@ namespace oln
# ifndef OLN_INCLUDE_ONLY
template <typename E>
typename image_being_mutable<E>::lvalue_t&
typename image_being_mutable<E>::lvalue_t
image_being_mutable<E>::operator()(const typename image_being_mutable<E>::psite_t& p)
{
return this->exact().impl_op_readwrite(p);
......
......@@ -96,7 +96,7 @@ namespace oln {
/// Binary case.
template <typename E>
struct case_< image_hierarchy_wrt_type, E, 3 > :
struct case_< image_hierarchy_wrt_type, E, 5 > :
where_< mlc::or_list_< mlc::eq_<oln_type_of(E, value), ntg::bin>,
ntg::eq_<ntg::int_u, 1, oln_type_of(E, value)>,
ntg::eq_<ntg::int_s, 1, oln_type_of(E, value)> > >
......@@ -107,7 +107,7 @@ namespace oln {
/// Grey-level case.
template <typename E>
struct case_< image_hierarchy_wrt_type, E, 4 > :
struct case_< image_hierarchy_wrt_type, E, 6 > :
where_< mlc_is_a( oln_type_of(E, value), ntg::real_value ) >
{
// Definition of the super class corresponding to this case
......@@ -118,7 +118,7 @@ namespace oln {
/// Label case.
template <typename E>
struct case_< image_hierarchy_wrt_type, E, 5 > :
struct case_< image_hierarchy_wrt_type, E, 7 > :
where_< mlc_is_a( oln_type_of(E, value), ntg::enum_value ) >
{
// Definition of the super class corresponding to this case
......@@ -129,7 +129,7 @@ namespace oln {
/// Color case.
template <typename E>
struct case_< image_hierarchy_wrt_type, E, 6 > :
struct case_< image_hierarchy_wrt_type, E, 8 > :
where_< mlc_is_a( oln_type_of(E, value), ntg::color_value ) >
{
// Definition of the super class corresponding to this case
......
......@@ -58,7 +58,7 @@ namespace oln
oln_rvalue(E) impl_at(const oln_coord(E)& index) const;
// FIXME: Hack.
oln_lvalue(E)& impl_at(const oln_coord(E)& index);
oln_lvalue(E) impl_at(const oln_coord(E)& index);
bool impl_has_at(const oln_coord(E)& index) const;
};
......@@ -76,7 +76,7 @@ namespace oln
oln_rvalue(E) impl_at(const oln_coord(E)& index) const;
// FIXME: Hack.
oln_lvalue(E)& impl_at(const oln_coord(E)& index);
oln_lvalue(E) impl_at(const oln_coord(E)& index);
bool impl_has_at(const oln_coord(E)& index) const;
};
......@@ -98,7 +98,7 @@ namespace oln
}
template <typename E, typename tag>
oln_lvalue(E)&
oln_lvalue(E)
set_impl<abstract::image1d, tag, E>
::impl_at(const oln_coord(E)& index)
{
......@@ -127,7 +127,7 @@ namespace oln
}
template <typename E>
oln_lvalue(E)&
oln_lvalue(E)
set_impl<abstract::image1d, morpher::tag::identity, E>
::impl_at(const oln_coord(E)& index)
{
......
......@@ -58,7 +58,7 @@ namespace oln
oln_rvalue(E) impl_at(const oln_coord(E)& row, const oln_coord(E)& col) const;
// FIXME: Hack.
oln_lvalue(E)& impl_at(const oln_coord(E)& row, const oln_coord(E)& col);
oln_lvalue(E) impl_at(const oln_coord(E)& row, const oln_coord(E)& col);
bool impl_has_at(const oln_coord(E)& row, const oln_coord(E)& col) const;
};
......@@ -76,7 +76,7 @@ namespace oln
oln_rvalue(E) impl_at(const oln_coord(E)& row, const oln_coord(E)& col) const;
// FIXME: Hack.
oln_lvalue(E)& impl_at(const oln_coord(E)& row, const oln_coord(E)& col);
oln_lvalue(E) impl_at(const oln_coord(E)& row, const oln_coord(E)& col);
bool impl_has_at(const oln_coord(E)& row, const oln_coord(E)& col) const;
};
......@@ -98,7 +98,7 @@ namespace oln
}
template <typename E, typename tag>
oln_lvalue(E)&
oln_lvalue(E)
set_impl<abstract::image2d, tag, E>
::impl_at(const oln_coord(E)& row, const oln_coord(E)& col)
{
......@@ -127,7 +127,7 @@ namespace oln
}
template <typename E>
oln_lvalue(E)&
oln_lvalue(E)
set_impl<abstract::image2d, morpher::tag::identity, E>
::impl_at(const oln_coord(E)& row, const oln_coord(E)& col)
{
......
......@@ -60,9 +60,9 @@ namespace oln
const oln_coord(E)& col) const;
// FIXME: Hack.
oln_lvalue(E)& impl_at(const oln_coord(E)& slice,
const oln_coord(E)& row,
const oln_coord(E)& col);
oln_lvalue(E) impl_at(const oln_coord(E)& slice,
const oln_coord(E)& row,
const oln_coord(E)& col);
bool impl_has_at(const oln_coord(E)& slice,
const oln_coord(E)& row,
const oln_coord(E)& col) const;
......@@ -84,9 +84,9 @@ namespace oln
const oln_coord(E)& col) const;
// FIXME: Hack.
oln_lvalue(E)& impl_at(const oln_coord(E)& slice,
const oln_coord(E)& row,
const oln_coord(E)& col);
oln_lvalue(E) impl_at(const oln_coord(E)& slice,
const oln_coord(E)& row,
const oln_coord(E)& col);
bool impl_has_at(const oln_coord(E)& slice,
const oln_coord(E)& row,
const oln_coord(E)& col) const;
......@@ -112,7 +112,7 @@ namespace oln
}
template <typename E, typename tag>
oln_lvalue(E)&
oln_lvalue(E)
set_impl<abstract::image3d, tag, E>
::impl_at(const oln_coord(E)& slice,
const oln_coord(E)& row,
......@@ -147,7 +147,7 @@ namespace oln
}
template <typename E>
oln_lvalue(E)&
oln_lvalue(E)
set_impl<abstract::image3d, morpher::tag::identity, E>
::impl_at(const oln_coord(E)& slice,
const oln_coord(E)& row,
......
......@@ -52,13 +52,13 @@ namespace oln
{
public:
/// Accessor delegation.
oln_lvalue(E)& impl_op_readwrite(const oln_psite(E)& p);
oln_lvalue(E) impl_op_readwrite(const oln_psite(E)& p);
};
# ifndef OLN_INCLUDE_ONLY
template <typename E>
oln_lvalue(E)&
oln_lvalue(E)
set_impl<abstract::image_being_mutable, morpher::tag::identity, E>
::impl_op_readwrite(const oln_psite(E)& p)
{
......
......@@ -58,7 +58,7 @@ namespace oln
typedef value_t value_type;
typedef mlc::true_ is_mutable_type;
typedef value_t lvalue_type;
typedef value_t& lvalue_type;
typedef void real_type; // FIXME
};
......
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