[Enterprise Extensions only]

ORB::create_named_value

Overview Creates a CORBA::NamedValue object.
Original class CORBA::ORB
Exceptions CORBA::SystemException


Intended Usage

The CORBA::ORB::create_named_value method is intended to be used by client applications using the Dynamic Invocation Interface (DII), to create a CORBA::NamedValue object to be subsequently passed to the CORBA::Object::create_request method.

IDL Syntax

  CORBA::Status create_named_value (CORBA::NamedValue_ptr& nv)

Input parameters

nv
A pointer for a CORBA::NamedValue object, passed by reference, to be initialized by the CORBA::ORB::create_named_value method. The caller assumes ownership of the new NamedValue object, but if the caller passes the NamedValue to the CORBA::Object::create_request method, ownership of the NamedValue is then transferred to the Request object.

Return values

CORBA::Status
A zero return code indicates success.

Example

  /* The following program creates a CORBA::NamedValue object and
     generates a system exception if appropriate
   */
  #include "corba.h"
  #include   int main(int argc, char* argv[])
  {
    int rc = 0;
    CORBA::NamedValue_ptr NVptr = CORBA::NamedValue::_nil();
    /* assume orb initialized */
    extern CORBA::ORB_ptr orb;
 
    try
    {
      CORBA::Status st = orb->create_named_value(NVptr);
    }
    catch (CORBA::SystemException &se)
    {
      cout << "exception: " << se.id() << endl; rc="1;"
    }
    return rc;
  }