Mercurial > hg > octave-nkf
comparison src/ov.h @ 2974:ebbc34ff7f66
[project @ 1997-05-15 19:36:16 by jwe]
author | jwe |
---|---|
date | Thu, 15 May 1997 19:42:59 +0000 |
parents | c0c280cda856 |
children | a3556d2adec9 |
comparison
equal
deleted
inserted
replaced
2973:ef3379196bcf | 2974:ebbc34ff7f66 |
---|---|
37 #include "idx-vector.h" | 37 #include "idx-vector.h" |
38 #include "mx-base.h" | 38 #include "mx-base.h" |
39 #include "oct-alloc.h" | 39 #include "oct-alloc.h" |
40 #include "str-vec.h" | 40 #include "str-vec.h" |
41 | 41 |
42 #include "oct-sym.h" | |
43 | |
44 class Octave_map; | 42 class Octave_map; |
45 class octave_stream; | 43 class octave_stream; |
44 class octave_function; | |
46 class octave_value_list; | 45 class octave_value_list; |
47 class octave_variable_reference; | 46 class octave_variable_reference; |
48 | 47 |
49 // Constants. | 48 // Constants. |
50 | 49 |
72 (octave_value&, const octave_value_list&, const octave_value&); | 71 (octave_value&, const octave_value_list&, const octave_value&); |
73 | 72 |
74 typedef octave_value * (*type_conv_fcn) (const octave_value&); | 73 typedef octave_value * (*type_conv_fcn) (const octave_value&); |
75 | 74 |
76 class | 75 class |
77 octave_value : public octave_symbol | 76 octave_value |
78 { | 77 { |
79 public: | 78 public: |
80 | 79 |
81 enum binary_op | 80 enum binary_op |
82 { | 81 { |
148 octave_value (const charMatrix& chm, bool is_string = false); | 147 octave_value (const charMatrix& chm, bool is_string = false); |
149 octave_value (double base, double limit, double inc); | 148 octave_value (double base, double limit, double inc); |
150 octave_value (const Range& r); | 149 octave_value (const Range& r); |
151 octave_value (const Octave_map& m); | 150 octave_value (const Octave_map& m); |
152 octave_value (octave_stream *s, int n); | 151 octave_value (octave_stream *s, int n); |
152 octave_value (octave_function *f); | |
153 octave_value (const octave_value_list& m); | 153 octave_value (const octave_value_list& m); |
154 octave_value (octave_value::magic_colon); | 154 octave_value (octave_value::magic_colon); |
155 octave_value (octave_value::all_va_args); | 155 octave_value (octave_value::all_va_args); |
156 | 156 |
157 octave_value (octave_value *new_rep); | 157 octave_value (octave_value *new_rep); |
211 void maybe_mutate (void); | 211 void maybe_mutate (void); |
212 | 212 |
213 virtual octave_value *try_narrowing_conversion (void) | 213 virtual octave_value *try_narrowing_conversion (void) |
214 { return rep->try_narrowing_conversion (); } | 214 { return rep->try_narrowing_conversion (); } |
215 | 215 |
216 virtual octave_value do_index_op (const octave_value_list& idx) const | 216 virtual octave_value do_index_op (const octave_value_list& idx) |
217 { return rep->do_index_op (idx); } | 217 { return rep->do_index_op (idx); } |
218 | |
219 virtual octave_value_list | |
220 do_index_op (int nargout, const octave_value_list& idx); | |
218 | 221 |
219 void assign (assign_op, const octave_value& rhs); | 222 void assign (assign_op, const octave_value& rhs); |
220 | 223 |
221 void assign (assign_op, const octave_value_list& idx, | 224 void assign (assign_op, const octave_value_list& idx, |
222 const octave_value& rhs); | 225 const octave_value& rhs); |
341 // Are the dimensions of this constant zero by zero? | 344 // Are the dimensions of this constant zero by zero? |
342 | 345 |
343 virtual bool is_zero_by_zero (void) const | 346 virtual bool is_zero_by_zero (void) const |
344 { return rep->is_zero_by_zero (); } | 347 { return rep->is_zero_by_zero (); } |
345 | 348 |
346 bool is_constant (void) const | 349 virtual bool is_constant (void) const |
347 { return true; } | 350 { return rep->is_constant (); } |
351 | |
352 virtual bool is_function (void) const | |
353 { return rep->is_function (); } | |
348 | 354 |
349 // Values. | 355 // Values. |
350 | 356 |
351 octave_value eval (void) { return *this; } | 357 octave_value eval (void) { return *this; } |
352 | |
353 octave_value_list eval (int, const octave_value_list& idx); | |
354 | 358 |
355 virtual double double_value (bool frc_str_conv = false) const | 359 virtual double double_value (bool frc_str_conv = false) const |
356 { return rep->double_value (frc_str_conv); } | 360 { return rep->double_value (frc_str_conv); } |
357 | 361 |
358 virtual double scalar_value (bool frc_str_conv = false) const | 362 virtual double scalar_value (bool frc_str_conv = false) const |
382 virtual Octave_map map_value (void) const; | 386 virtual Octave_map map_value (void) const; |
383 | 387 |
384 virtual octave_stream *stream_value (void) const; | 388 virtual octave_stream *stream_value (void) const; |
385 | 389 |
386 virtual int stream_number (void) const; | 390 virtual int stream_number (void) const; |
391 | |
392 virtual octave_function *function_value (bool silent = false); | |
387 | 393 |
388 virtual octave_value_list list_value (void) const; | 394 virtual octave_value_list list_value (void) const; |
389 | 395 |
390 virtual bool bool_value (void) const | 396 virtual bool bool_value (void) const |
391 { return rep->bool_value (); } | 397 { return rep->bool_value (); } |