comparison src/genprops.awk @ 11074:8a3b7e8fcbbc

graphics.cc, graphics.h.in, genprops.awk: use octave_map and octave_scalar_map instead of Octave_map
author John W. Eaton <jwe@octave.org>
date Fri, 01 Oct 2010 05:16:04 -0400
parents 92a85ed5b86e
children 5fa7667f90e5
comparison
equal deleted inserted replaced
11073:a22f3a673f33 11074:8a3b7e8fcbbc
464 ## get "all" method 464 ## get "all" method
465 465
466 if (base) 466 if (base)
467 { 467 {
468 printf ("octave_value\nbase_properties::get (bool all) const\n{\n"); 468 printf ("octave_value\nbase_properties::get (bool all) const\n{\n");
469 printf (" Octave_map m = get_dynamic (all).map_value ();\n\n"); 469 printf (" octave_map m = get_dynamic (all).map_value ();\n\n");
470 } 470 }
471 else 471 else
472 { 472 {
473 printf ("octave_value\n%s::properties::get (bool all) const\n{\n", class_name); 473 printf ("octave_value\n%s::properties::get (bool all) const\n{\n", class_name);
474 printf (" Octave_map m = base_properties::get (all).map_value ();\n\n"); 474 printf (" octave_map m = base_properties::get (all).map_value ();\n\n");
475 } 475 }
476 476
477 for (i = 1; i <= idx; i++) 477 for (i = 1; i <= idx; i++)
478 { 478 {
479 if (hidden[i]) 479 if (hidden[i])
480 printf (" if (all)\n m.assign (\"%s\", get_%s ()%s);\n", name[i], name[i], 480 printf (" if (all)\n m.assign (\"%s\", octave_value (get_%s ()%s));\n", name[i], name[i],
481 (type[i] == "handle_property" || type[i] == "graphics_handle" ? ".as_octave_value ()" : "")); 481 (type[i] == "handle_property" || type[i] == "graphics_handle" ? ".as_octave_value ()" : ""));
482 else 482 else
483 printf (" m.assign (\"%s\", get_%s ()%s);\n", name[i], name[i], 483 printf (" m.assign (\"%s\", octave_value (get_%s ()%s));\n", name[i], name[i],
484 (type[i] == "handle_property" || type[i] == "graphics_handle" ? ".as_octave_value ()" : "")); 484 (type[i] == "handle_property" || type[i] == "graphics_handle" ? ".as_octave_value ()" : ""));
485 } 485 }
486 486
487 printf ("\n return m;\n}\n\n"); 487 printf ("\n return m;\n}\n\n");
488 488