Mercurial > hg > octave-lyh
comparison src/ov.cc @ 2825:60ae49e1284f
[project @ 1997-03-25 23:17:36 by jwe]
author | jwe |
---|---|
date | Tue, 25 Mar 1997 23:32:15 +0000 |
parents | 9aeba8e006a4 |
children | 10a8198b1733 |
comparison
equal
deleted
inserted
replaced
2824:e56a90687a1e | 2825:60ae49e1284f |
---|---|
30 | 30 |
31 #include "Array-flags.h" | 31 #include "Array-flags.h" |
32 | 32 |
33 #include "ov.h" | 33 #include "ov.h" |
34 #include "ov-base.h" | 34 #include "ov-base.h" |
35 #include "ov-bool.h" | |
36 #include "ov-bool-mat.h" | |
35 #include "ov-scalar.h" | 37 #include "ov-scalar.h" |
36 #include "ov-re-mat.h" | 38 #include "ov-re-mat.h" |
37 #include "ov-complex.h" | 39 #include "ov-complex.h" |
38 #include "ov-cx-mat.h" | 40 #include "ov-cx-mat.h" |
39 #include "ov-ch-mat.h" | 41 #include "ov-ch-mat.h" |
219 | 221 |
220 return retval; | 222 return retval; |
221 } | 223 } |
222 | 224 |
223 octave_value::octave_value (void) | 225 octave_value::octave_value (void) |
224 : rep (new octave_base_value ()) { rep->count = 1; } | 226 : rep (new octave_base_value ()) |
227 { | |
228 rep->count = 1; | |
229 } | |
225 | 230 |
226 octave_value::octave_value (double d) | 231 octave_value::octave_value (double d) |
227 : rep (new octave_scalar (d)) { rep->count = 1; } | 232 : rep (new octave_scalar (d)) |
233 { | |
234 rep->count = 1; | |
235 } | |
228 | 236 |
229 octave_value::octave_value (const Matrix& m) | 237 octave_value::octave_value (const Matrix& m) |
230 : rep (new octave_matrix (m)) | 238 : rep (new octave_matrix (m)) |
231 { | 239 { |
232 rep->count = 1; | 240 rep->count = 1; |
282 maybe_mutate (); | 290 maybe_mutate (); |
283 } | 291 } |
284 | 292 |
285 octave_value::octave_value (const ComplexColumnVector& v, int pcv) | 293 octave_value::octave_value (const ComplexColumnVector& v, int pcv) |
286 : rep (new octave_complex_matrix (v, pcv)) | 294 : rep (new octave_complex_matrix (v, pcv)) |
295 { | |
296 rep->count = 1; | |
297 maybe_mutate (); | |
298 } | |
299 | |
300 octave_value::octave_value (bool b) | |
301 : rep (new octave_bool (b)) | |
302 { | |
303 rep->count = 1; | |
304 } | |
305 | |
306 octave_value::octave_value (const boolMatrix& bm) | |
307 : rep (new octave_bool_matrix (bm)) | |
287 { | 308 { |
288 rep->count = 1; | 309 rep->count = 1; |
289 maybe_mutate (); | 310 maybe_mutate (); |
290 } | 311 } |
291 | 312 |
335 rep->count = 1; | 356 rep->count = 1; |
336 maybe_mutate (); | 357 maybe_mutate (); |
337 } | 358 } |
338 | 359 |
339 octave_value::octave_value (const Octave_map& m) | 360 octave_value::octave_value (const Octave_map& m) |
340 : rep (new octave_struct (m)) { rep->count = 1; } | 361 : rep (new octave_struct (m)) |
362 { | |
363 rep->count = 1; | |
364 } | |
341 | 365 |
342 octave_value::octave_value (octave_value::magic_colon) | 366 octave_value::octave_value (octave_value::magic_colon) |
343 : rep (new octave_magic_colon ()) { rep->count = 1; } | 367 : rep (new octave_magic_colon ()) |
368 { | |
369 rep->count = 1; | |
370 } | |
344 | 371 |
345 octave_value::octave_value (octave_value::all_va_args) | 372 octave_value::octave_value (octave_value::all_va_args) |
346 : rep (new octave_all_va_args ()) { rep->count = 1; } | 373 : rep (new octave_all_va_args ()) |
374 { | |
375 rep->count = 1; | |
376 } | |
347 | 377 |
348 octave_value::octave_value (octave_value *new_rep) | 378 octave_value::octave_value (octave_value *new_rep) |
349 : rep (new_rep) { rep->count = 1; } | 379 : rep (new_rep) |
380 { | |
381 rep->count = 1; | |
382 } | |
350 | 383 |
351 octave_value::~octave_value (void) | 384 octave_value::~octave_value (void) |
352 { | 385 { |
353 #if defined (MDEBUG) | 386 #if defined (MDEBUG) |
354 cerr << "~octave_value: rep: " << rep | 387 cerr << "~octave_value: rep: " << rep |
759 octave_scalar::register_type (); | 792 octave_scalar::register_type (); |
760 octave_complex::register_type (); | 793 octave_complex::register_type (); |
761 octave_matrix::register_type (); | 794 octave_matrix::register_type (); |
762 octave_complex_matrix::register_type (); | 795 octave_complex_matrix::register_type (); |
763 octave_range::register_type (); | 796 octave_range::register_type (); |
797 octave_bool::register_type (); | |
798 octave_bool_matrix::register_type (); | |
764 octave_char_matrix::register_type (); | 799 octave_char_matrix::register_type (); |
765 octave_char_matrix_str::register_type (); | 800 octave_char_matrix_str::register_type (); |
766 octave_struct::register_type (); | 801 octave_struct::register_type (); |
767 octave_all_va_args::register_type (); | 802 octave_all_va_args::register_type (); |
768 octave_magic_colon::register_type (); | 803 octave_magic_colon::register_type (); |