# HG changeset patch # User Jaroslav Hajek # Date 1277709837 -7200 # Node ID 1cc44f3ec8141ad5d0a662a537cdd83ab7647888 # Parent d808eb829d4896fe5a93630af7565949dee8de35 templated extractors for maps and cells diff --git a/src/Cell.h b/src/Cell.h --- a/src/Cell.h +++ b/src/Cell.h @@ -136,4 +136,8 @@ Cell map (ctype_mapper) const; }; +template<> +inline Cell octave_value_extract (const octave_value& v) + { return v.cell_value (); } + #endif diff --git a/src/oct-map.h b/src/oct-map.h --- a/src/oct-map.h +++ b/src/oct-map.h @@ -241,6 +241,10 @@ }; +template<> +inline octave_scalar_map octave_value_extract (const octave_value& v) + { return v.scalar_map_value (); } + class OCTINTERP_API octave_map { @@ -443,6 +447,10 @@ const octave_map *map_list, octave_map& retval); }; +template<> +inline octave_map octave_value_extract (const octave_value& v) + { return v.map_value (); } + // The original Octave_map object. Octave_map and octave_map are convertible to // each other.