Mercurial > hg > octave-nkf
changeset 10757:1cc44f3ec814
templated extractors for maps and cells
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Mon, 28 Jun 2010 09:23:57 +0200 |
parents | d808eb829d48 |
children | f3892d8eea9f |
files | src/Cell.h src/oct-map.h |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Cell.h +++ b/src/Cell.h @@ -136,4 +136,8 @@ Cell map (ctype_mapper) const; }; +template<> +inline Cell octave_value_extract<Cell> (const octave_value& v) + { return v.cell_value (); } + #endif
--- a/src/oct-map.h +++ b/src/oct-map.h @@ -241,6 +241,10 @@ }; +template<> +inline octave_scalar_map octave_value_extract<octave_scalar_map> (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<octave_map> (const octave_value& v) + { return v.map_value (); } + // The original Octave_map object. Octave_map and octave_map are convertible to // each other.