octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #41629] "set (h)" should not return read only


From: Rik
Subject: [Octave-bug-tracker] [bug #41629] "set (h)" should not return read only properties
Date: Mon, 17 Mar 2014 01:27:14 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0

Follow-up Comment #3, bug #41629 (project octave):

I applied the two patches together and they appear to work.  I'm uploading the
consolidated changeset so you can see the final result.

One thing I wondered about was the dispatch table in the is_readonly function.
 Is there any way to get C++ to do this for us?  Below is a small portion of
the dispatch table.


static bool
is_readonly (const graphics_object obj, const std::string& pname)
{
  bool retval = false;

  if (obj.isa ("root_figure"))
      retval = root_figure::properties::has_readonly_property (pname);
  else if (obj.isa ("figure"))
      retval = figure::properties::has_readonly_property (pname)


It seems like there ought to be a way to call something like the following


retval = obj.has_readonly_property (pname);


because the object already knows what it is and has an overloaded instance of
the has_readonly_property method depending on what kind of object it is.  The
syntax above doesn't work though.


(file #30923)
    _______________________________________________________

Additional Item Attachment:

File name: ro_props.cset                  Size:8 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41629>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]