Overview | Returns the default CORBA::Context object. |
Original class | CORBA::ORB |
Exceptions | CORBA::SystemException |
Intended Usage
This method is used by client applications to obtain a default CORBA::Context object, which can be passed to IDL operations that require a Context parameter. The default CORBA::Context object contains a name/value pair for each environment variable set in the calling process's environment.
Syntax
CORBA::Status get_default_context (CORBA::Context_ptr& ctx);
Input parameters
Return values
Example
/* The following program creates a CORBA::Context object and generates system exception if appropriate */ #include "corba.h" #include int main(int argc, char* argv[]) { int rc = 0; CORBA::Context_ptr Ctxtptr = CORBA::Context::_nil(); /* assume orb initialized */ extern CORBA::ORB_ptr orb; try { CORBA::Status st = orb->get_default_context( Ctxtptr); } catch (CORBA::SystemException &se) { cout << "exception: " << se.id() << endl; rc="1;" } return rc; }