Mercurial > hg > octave-lojdl
changeset 9620:b00af0da85dd
graphics.h.in: provide std::string and char* versions of graphics_object:get functions
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 05 Sep 2009 21:00:44 -0400 |
parents | b0b82ab654f6 |
children | 3ee9029931b3 |
files | src/ChangeLog src/genprops.awk src/graphics.h.in |
diffstat | 3 files changed, 18 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2009-09-05 John W. Eaton <jwe@octave.org> + + * genprops.awk: Fix formatting of generated output. + * graphics.h.in (graphics_object::get (const std::string&) const, + graphics_object::get (const char *) const): New functions. + 2009-09-05 John W. Eaton <jwe@octave.org> * txt-eng-ft.cc (ft_manager::do_get_font): Remove spurious
--- a/src/genprops.awk +++ b/src/genprops.awk @@ -246,8 +246,8 @@ printf (" void set (const caseless_str& pname, const octave_value& val);\n\n"); printf (" octave_value get (bool all = false) const;\n\n"); printf (" octave_value get (const caseless_str& pname) const;\n\n"); - printf (" octave_value get (const std::string& pname) const\n {\n return get (caseless_str (pname)); }\n\n"); - printf (" octave_value get (const char *pname) const\n {\n return get (caseless_str (pname)); }\n\n"); + printf (" octave_value get (const std::string& pname) const\n {\n return get (caseless_str (pname));\n }\n\n"); + printf (" octave_value get (const char *pname) const\n {\n return get (caseless_str (pname));\n }\n\n"); printf (" property get_property (const caseless_str& pname);\n\n"); printf (" std::string graphics_object_name (void) const { return go_name; }\n\n"); printf (" static property_list::pval_map_type factory_defaults (void);\n\n");
--- a/src/graphics.h.in +++ b/src/graphics.h.in @@ -2079,6 +2079,16 @@ ? get_factory_defaults () : rep->get (name)); } + octave_value get (const std::string& name) const + { + return get (caseless_str (name)); + } + + octave_value get (const char *name) const + { + return get (caseless_str (name)); + } + octave_value get_default (const caseless_str& name) const { return rep->get_default (name);