Hi Eike,
> That struct would have to be created, though with empty members, even in
> the all-good-no-veto case. Depending on the scenario this may cause
> significant unnecessary overhead with mass objects.
Yes.
> Shouldn't we better
> have a simple boolean return instead and explicitly act on a veto?
>
> if (!listener->approve())
> {
> Veto_OrAnyBetterName aReason = listener->getVetoReason();
> ...
> }
This implies that the same instance cannot listen at different
broadcasters, which increases complexitiy for the implementation.
Also, given that usually listeners should not be called with a locked
mutex (though I'm not sure this really applies to approval calls), the
construct is prone to threading issues.
My gut feeling also tells me this is an unecessary (potentially
expensive) UNO call. But admittedly, this is completely speculative (the
overhead of returning the Veto struct all the time, even if not needed,
might be even higher, don't know).
Ciao
Frank
--
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems http://www.sun.com/staroffice -
- OpenOffice.org Database http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]