CORBA::is_nil

Overview Indicates whether the input object pointer represents a nil object.
Original class CORBA


Intended Usage

This method is intended to be used by client and server applications to determine whether an object pointer is nil. This test should be used to verify the validity of the object prior to invoking any methods on it. This method has different signatures for different types of objects.

Syntax

  static Boolean is_nil(Any_ptr p);
  static Boolean is_nil(BOA_ptr p);
  static Boolean is_nil(ContextList_ptr p);
  static Boolean is_nil(Context_ptr p);
  static Boolean is_nil(Current_ptr p);
  static Boolean is_nil(Environment_ptr p);
  static Boolean is_nil(ExceptionList_ptr p);
  static Boolean is_nil(Exception_ptr p);
  static Boolean is_nil(NamedValue_ptr p);
  static Boolean is_nil(NV_ptr p);
  static Boolean is_nil(ORB_ptr p);
  static Boolean is_nil(Object_ptr p);
  static Boolean is_nil(Principal_ptr p);
  static Boolean is_nil(Request_ptr p);
  static Boolean is_nil(ServerRequest_ptr p);
  static Boolean is_nil(TypeCode_ptr p);

Input parameters

p
The object pointer to be tested. This pointer can be NULL.

Return values

CORBA::Boolean
Returns "0" or "1". If "0" is returned, the input object pointer is valid. If"1" is returned, the input object pointer refers to a nil object.

Example

  /* The following is a C++ example */
  #include "corba.h"
  ...
  /* Retrieve the pointer in BOA object */
  CORBA::BOA_ptr pBOA;
  pBOA = CORBA::_boa();
  /* Test if the pointer refers to a nil object */
  CORBA::Boolean bool;
  bool = CORBA::is_nil(pBOA);
  if (bool == TRUE)
    {
    /* pBOA refers to a nil object, return or generate exception */
    ...
    }
  else
    {
    /* proceed, using pBOA */
    ...

Related reference
CORBA module



Searchable topic ID:   rcor_modco2
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_modco2.html

Library | Support | Terms of Use | Feedback