[Enterprise Extensions only]

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.