On Fri, Jul 4, 2008 at 8:18 PM, Maciek Gajewski
<
maciej.gajewski0@...> wrote:
> I have and idea which is hybrid of both of these solutions:
>
> Let all "set" methods notify backend using the same method, with signature
> like this:
>
> virtual void base_graphics_backend::property_changed( const graphics_handle&
> owner, const std::string& name );
I also considered that possibility, but I found it way less efficient than
having specific methods
virtual void base_graphics_backend::figure_property_changed(...)
Indeed, from the octave point of view, when such notification method
is called, it knows the object and property (because it's called from
the set_xxx handler), so it can call a specific method directly.
OTOH, using generic signature as you propose would just force
the backend to re-do a lot of string comparisons to know which
property was changed.
Note that using specific notifiers does not prevent the backend
from delaying its reaction.
Michael.