[Enterprise Extensions only]

Object::_is_equivalent

Overview Determines whether two object references refer to the same object.
Original class CORBA::Object


Intended Usage

This method is intended to be used by applications to determine whether two object references refer to the same object, as far as the ORB can easily determine. In the case of proxies, this method attempts to determine whether two proxies refer to the same remote object. When invoked on proxy objects, this method operates locally and does not involve the remote object to which the proxy refers. For this reason, it is possible for this method to return zero, indicating that the two references do not appear to be equivalent, when in fact they are equivalent (but it cannot be determined without communicating with the remote server).

IDL Syntax

  virtual CORBA::Boolean _is_equivalent (const 
     CORBA::Object_ptr other_object) = 0;

Input parameters

other_object
An object reference to be compared to the target object reference.

Return values

CORBA::Boolean
A zero return value indicates that the target object reference does not refer to the same object as the given object reference, as far as the ORB can easily determine. (It is still possible that the two object references are equivalent, however.) A non-zero return value indicates that the target object reference and the given object reference do refer to the same object.

Example

  /*The following example is written in C++*/
  #include "corba.h"
  CORBA::Object_ptr p1;
  CORBA::Object_ptr p2;
  /*construct p1 and p2 */
  ...
  /* check to see if they are different objects */
  CORBA::Boolean retval = p1-> _is_equivalent(p2);