Type: info
Title: UNO_SET_THROW
Posted by: [EMAIL PROTECTED]
Affected: -
Effective from: CWS basmgr03
*Summary*
--------
+ css::uno::UnoReference_SetThrow
+ css::uno::UNO_SET_THROW
+ Reference< interface >::Reference< interface >(
Reference< interface > const& iface, UnoReference_SetThrow )
+ Reference< interface >::Reference< interface >(
interface* iface, UnoReference_SetThrow )
+ Reference< interface >::set(
Reference< interface > const& iface, UnoReference_SetThrow )
+ Reference< interface >::set(
interface* iface, UnoReference_SetThrow )
*Description*
-------------
Complementing the existing UNO_QUERY_THROW functionality, an
UNO_SET_THROW has been introduced, which allows setting a Reference<
XFoo > to a new XFoo value, and throws if the new value is NULL.
(If the OOo's search in mailing lists
(http://www.openoffice.org/servlets/SearchList?list=interface-discuss&searchText=%22UNO_SET_THROW%22&defaultField=subject&Search=Search)
would work, I could place the link to the respective discussion in
[EMAIL PROTECTED] here, where this change was agreed
upon. Alas, it doesn't.)
This allows code like, for instance,
Reference< XFooSupplier > xFooSupp( xBar, UNO_QUERY_THROW );
Reference< XFoo > xFoo( xFooSupp->getFoo(), UNO_SET_THROW );
where supplying a XFoo being NULL would be a contract violation of the
foo supplier.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]