C++ bindings for CORBA: Narrowing CORBA object references

The mapping for an interface I defines a static member function named _narrow that takes as input an object reference of any type (for example, an Object_ptr) and returns an object reference of type I_ptr. If the referenced object (the actual implementation object corresponding to the proxy addressed by the input object reference) does not support the I interface, the result is NULL. Otherwise, the I_ptr addresses an object that also supports the I interface. In the case where the proxy addressed by the input argument does not support interface I and the actual implementation object does, the I_ptr returned by I::_narrow addresses a different proxy object than the input argument.

The _narrow static member function does an implicit _duplicate of the input argument. Therefore, the caller is responsible for releasing both the object reference input to _narrow and the return result.


Related reference
CORBA C++ bindings for interfaces



Searchable topic ID:   rcor_copnor
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/ref/rcor_copnor.html

Library | Support | Terms of Use | Feedback