Mercurial > hg > octave-nkf
comparison src/ov-fcn-inline.cc @ 6625:5d02dfacfc9e
[project @ 2007-05-16 08:49:47 by dbateman]
author | dbateman |
---|---|
date | Wed, 16 May 2007 08:49:48 +0000 |
parents | 4fb053f24fd6 |
children | c9c504d939c5 |
comparison
equal
deleted
inserted
replaced
6624:0d69a50fc5a9 | 6625:5d02dfacfc9e |
---|---|
85 fcn = fh->fcn_val (); | 85 fcn = fh->fcn_val (); |
86 } | 86 } |
87 | 87 |
88 if (fcn.is_undefined ()) | 88 if (fcn.is_undefined ()) |
89 error ("inline: unable to define function"); | 89 error ("inline: unable to define function"); |
90 } | |
91 | |
92 // This function is supplied to allow a Matlab style class structure | |
93 // to be returned.. | |
94 Octave_map | |
95 octave_fcn_inline::map_value (void) const | |
96 { | |
97 Octave_map m; | |
98 string_vector args = fcn_arg_names (); | |
99 m.assign ("version", octave_value (1.0)); | |
100 m.assign ("isEmpty", octave_value (0.0)); | |
101 m.assign ("expr", octave_value (fcn_text ())); | |
102 m.assign ("numArgs", octave_value (args.length ())); | |
103 m.assign ("args", octave_value (args)); | |
104 std::ostringstream buf; | |
105 for (int i = 0; i < args.length (); i++) | |
106 buf << args(i) << " = INLINE_INPUTS_{" << i + 1 << "}; "; | |
107 m.assign ("inputExpr", octave_value (buf.str ())); | |
108 | |
109 return m; | |
90 } | 110 } |
91 | 111 |
92 bool | 112 bool |
93 octave_fcn_inline::save_ascii (std::ostream& os, bool&) | 113 octave_fcn_inline::save_ascii (std::ostream& os, bool&) |
94 { | 114 { |