diff src/oct-lvalue.h @ 5846:db0598f94c0f

[project @ 2006-06-07 18:16:16 by jwe]
author jwe
date Wed, 07 Jun 2006 18:16:16 +0000
parents ace8d8d26933
children 93c65f2a5668
line wrap: on
line diff
--- a/src/oct-lvalue.h
+++ b/src/oct-lvalue.h
@@ -45,11 +45,11 @@
 
   octave_lvalue (octave_value *v = &dummy_val,
 		 symbol_record::change_function f = 0)
-    : val (v), type (), idx (), chg_fcn (f), index_set (false) { }
+    : val (v), type (), idx (), chg_fcn (f), nel (1), index_set (false) { }
 
   octave_lvalue (const octave_lvalue& vr)
     : val (vr.val), type (vr.type), idx (vr.idx), chg_fcn (vr.chg_fcn),
-      index_set (vr.index_set) { }
+      nel (vr.nel), index_set (vr.index_set) { }
 
   octave_lvalue& operator = (const octave_lvalue& vr)
     {
@@ -59,6 +59,7 @@
 	  type = vr.type;
 	  idx = vr.idx;
 	  chg_fcn = vr.chg_fcn;
+	  nel = vr.nel;
 	  index_set = vr.index_set;
 	}
 
@@ -77,6 +78,10 @@
 
   void assign (octave_value::assign_op, const octave_value&);
 
+  void numel (octave_idx_type n) { nel = n; }
+
+  octave_idx_type numel (void) const { return nel; }
+
   void set_index (const std::string& t, const std::list<octave_value_list>& i);
 
   void clear_index (void) { type = std::string (); idx.clear (); }
@@ -97,6 +102,8 @@
 
   symbol_record::change_function chg_fcn;
 
+  octave_idx_type nel;
+
   bool index_set;
 };