Mercurial > hg > octave-lyh
diff src/ov.cc @ 10742:604e13a89c7f
initial code for structs rewrite
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 22 Jun 2010 15:22:36 +0200 |
parents | a8ce6bdecce5 |
children | bee1b1a2e29a |
line wrap: on
line diff
--- a/src/ov.cc +++ b/src/ov.cc @@ -1116,9 +1116,21 @@ maybe_mutate (); } +octave_value::octave_value (const octave_map& m) + : rep (new octave_struct (m)) +{ + maybe_mutate (); +} + +octave_value::octave_value (const octave_scalar_map& m) + : rep (new octave_scalar_struct (m)) +{ +} + octave_value::octave_value (const Octave_map& m) : rep (new octave_struct (m)) { + maybe_mutate (); } octave_value::octave_value (const Octave_map& m, const std::string& id) @@ -1431,12 +1443,24 @@ #endif } -Octave_map +octave_map octave_value::map_value (void) const { return rep->map_value (); } +octave_scalar_map +octave_value::scalar_map_value (void) const +{ + return rep->scalar_map_value (); +} + +Octave_map +octave_value::old_map_value (void) const +{ + return rep->old_map_value (); +} + octave_function * octave_value::function_value (bool silent) const {