Object::_narrow

Overview Performs essentially the same function as CORBA::Object::_duplicate().
Original class CORBA::Object
Exceptions CORBA::SystemException


Intended Usage

This method is provided for consistency with the _narrow methods provided by the C++ bindings for subclasses of CORBA::Object, which narrow a generic CORBA::Object to a more specific type. When narrowing from a CORBA::Object to a CORBA::Object, however, the method degenerates to a simple duplication. Hence, this method is equivalent to CORBA::Object::_duplicate.

Syntax

  static CORBA::Object_ptr _narrow (CORBA::Object_ptr obj);

Input parameters

obj
The CORBA::Object to be narrowed.The caller retains ownership of this object reference.

Return values

CORBA::Object_ptr
The narrowed (and duplicated) object reference. The caller assumes ownership of this object reference and should subsequently CORBA::release it.

Example

  /* Assume the following idl interface: */
  interface testObject
  {
    string testMethod (in long input_value, out float out_value);
  };
  /* Here is the cpp code: */
  CORBA::Object_ptr optr;
  /* instantiate optr somehow */
  ...
  testObject_ptr test_obj = testObject::_narrow(optr);
  ...

Related reference
CORBA module



Searchable topic ID:   rcor_modob8
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_modob8.html

Library | Support | Terms of Use | Feedback