https://svn.lrde.epita.fr/svn/oln/trunk
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Remove virtual type `is_value_wise_mutable'.
* oln/core/typedefs.hh (is_value_wise_mutable): Remove virtual
type declaration.
* oln/core/abstract/image/value_wise_accessibility/hierarchy.hh:
(case_<image_hierarchy_wrt_value_wise_accessibility, E, 1>): No
longer use the virtual type `is_value_wise_mutable' in the
static switch condition; query `mutable_value_proxy' instead.
* olena/oln/morpher/with_lut.hh
(vtypes< morpher::with_lut<Image, Lut> >::is_value_wise_mutable_type):
Remove typedef.
core/abstract/image/value_wise_accessibility/hierarchy.hh | 8 +-------
core/typedefs.hh | 2 --
morpher/with_lut.hh | 11 +++--------
3 files changed, 4 insertions(+), 17 deletions(-)
Index: olena/oln/core/typedefs.hh
--- olena/oln/core/typedefs.hh (revision 701)
+++ olena/oln/core/typedefs.hh (working copy)
@@ -129,8 +129,6 @@
mlc_decl_typedef(topo_type);
mlc_decl_typedef(bbox_type);
- mlc_decl_typedef(is_value_wise_mutable_type);
-
/*-------.
| Grid. |
Index: olena/oln/core/abstract/image/value_wise_accessibility/hierarchy.hh
--- olena/oln/core/abstract/image/value_wise_accessibility/hierarchy.hh (revision 701)
+++ olena/oln/core/abstract/image/value_wise_accessibility/hierarchy.hh (working copy)
@@ -130,17 +130,11 @@
| Value-wise accessibility switch. |
`----------------------------------*/
- /* FIXME: Handle mutability. This is not easy, as, for instance an
- image with LUT has no lvalue type, but can be perfectly const or
- mutable. How can we deal with this? By adding a specific
- vtype? */
-
/// With mutable value-wise random accessibility.
template <typename E>
struct case_< image_hierarchy_wrt_value_wise_accessibility, E, 1 > :
where_< mlc_and( mlc_is_ok(oln_type_of(E, fwd_viter)),
- mlc_eq( oln_type_of(E, is_value_wise_mutable),
- mlc::true_) ) >
+ mlc_is_ok(oln_type_of(E, mutable_value_proxy)) ) >
{
typedef abstract::mutable_image_being_value_wise_random_accessible<E> ret;
};
Index: olena/oln/morpher/with_lut.hh
--- olena/oln/morpher/with_lut.hh (revision 701)
+++ olena/oln/morpher/with_lut.hh (working copy)
@@ -71,17 +71,12 @@
/* lvalue_type: undefined
(see oln/morpher/internal/image_value_morpher.hh). */
- /* FIXME: This virtual type (``is_value_wise_mutable'') is
- useless, since the presence of mutable_value_proxy_type
- suffices to state that the image is value-wise mutable. */
-
+ typedef value::lut_value_proxy<Lut> value_proxy_type;
/* Mutability.
As the virtual type `lvalue' is undefined in with_lut<>, it is
not point-wise mutable. However, it is value-wise mutable,
- i.e., the values of the look-up table can be modified. */
- typedef mlc::true_ is_value_wise_mutable_type;
-
- typedef value::lut_value_proxy<Lut> value_proxy_type;
+ i.e., the values of the look-up table can be modified through
+ a mutable value proxy. */
typedef value::mutable_lut_value_proxy<Lut> mutable_value_proxy_type;
// fwd_viter_type: see below.