MICO2.3.13 corba 环境平台

源代码在线查看: request.cc

软件大小: 4745 K
上传用户: junjie_x
关键词: corba MICO 13 环境
下载地址: 免注册下载 普通下载 VIP

相关代码

				#include 				#include "request.h"								#ifdef HAVE_UNISTD_H				#include 				#endif								CORBA::Request_ptr 				create_request( CORBA::Object_ptr obj, const char* opname )				{				    CORBA::InterfaceDef_var ir = obj->_get_interface();				    if (CORBA::is_nil (ir)) {				      std::cout 				      exit (1);				    }				    				    // Load exceptions for operation				    CORBA::ExceptionDefSeq_var op_excpts;				    CORBA::ContainedSeq_var cs = ir->lookup_name( "dii", -1, CORBA::dk_Operation, false);				    if ( cs->length() != 1 ) {				      std::cout 				      exit(1);				    }				    CORBA::OperationDef_var op = CORBA::OperationDef::_narrow (cs[0u]);				    op_excpts = op->exceptions();								    // create request and fill it with exceptions				    CORBA::Request_ptr req = obj->_request (opname);				    for( CORBA::ULong i = 0; i < op_excpts->length(); i++ ) {				      req->exceptions()->add( op_excpts[i]->type() );				    }								    return req;				}							

相关资源