diff src/genprops.awk @ 7836:4fb2db9c87dd

Turn cdata properties into array_property. Add min/max computation to array_property.
author Michael Goffioul <michael.goffioul@gmail.com>
date Thu, 21 Feb 2008 13:45:04 +0100
parents 68550ad9ee9c
children 3d60445d3638
line wrap: on
line diff
--- a/src/genprops.awk
+++ b/src/genprops.awk
@@ -211,6 +211,16 @@
           name[i], name[i]);
 }
 
+## array_property
+
+function emit_get_array (i)
+{
+  emit_get_accessor(i, "octave_value", "get");
+
+  printf ("  array_property get_%s_property (void) const { return %s; }\n",
+          name[i], name[i]);
+}
+
 ## common section
 
 function emit_common_declarations ()
@@ -244,9 +254,7 @@
   {
     if (emit_get[i])
     {
-      if (type[i] == "array_property" \
-	  || type[i] == "row_vector_property" \
-	  || type[i] == "any_property")
+      if (type[i] == "any_property")
         emit_get_accessor(i, "octave_value", "get");
       else if (type[i] == "handle_property")
         emit_get_accessor(i, "graphics_handle", "handle_value");
@@ -256,6 +264,9 @@
         emit_get_accessor(i, "double", "double_value");
       else if (type[i] == "data_property")
         emit_get_data(i);
+      else if (type[i] == "array_property" \
+	       || type[i] == "row_vector_property")
+        emit_get_array(i);
       else if (type[i] == "bool_property")
         emit_get_bool(i);
       else if (type[i] == "radio_property")