Previous Table of Contents Next


4.3.4 Equivalence Checking Operation


   4.3.4.1 is_a

   boolean is_a( in RepositoryId logical_type_id );

   An operation is defined to facilitate maintaining type-safety for object references over the scope of an ORB.

   The logical_type_id is a string denoting a shared type identifier (RepositoryId). The operation returns true if the object is really an instance of that type, including if that type is an ancestor of the “most derived? type of that object.

   Determining whether an object's type is compatible with the logical_type_id may require contacting a remote ORB or interface repository. Such an attempt may fail at either the local or the remote end. If is_a cannot make a reliable determination of type compatibility due to failure, it raises an exception in the calling application code. This enables the application to distinguish among the TRUE, FALSE, and indeterminate cases.

   This operation exposes to application programmers functionality that must already exist in ORBs that support “type safe narrow? and allows programmers working in environments that do not have compile time type checking to explicitly maintain type safety.

   This operation always returns TRUE for the logical_type_id IDL:omg.org/CORBA/Object:1.0