Overview | Determines whether an object supports a given IDL interface. |
Original class | CORBA::Object |
Exceptions | CORBA::SystemException |
Intended Usage
This method is used by applications to determine whether an object reference refers to an object that supports a given IDL interface (and hence whether the reference can be successfully narrowed). When invoked on a proxy object, this call sometimes results in a remote invocation (if it cannot be determined locally).
Syntax
virtual CORBA::Boolean _is_a (const char* logical_type_id) = 0;
Input parameters
Return values
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 test_obj; /* initialize test_obj somehow */ ... /* To find out if test_obj can be narrowed to testObject, use CORBA::Object::_is_a and the Repository ID for the testObject interface (defined in the emitted bindings as testObject::testObject_RID) */ if (test_obj->_is_a(testObject::testObject_RID)) testObject_ptr new_test_obj = testObject::_narrow(test_obj); ...