本文整理汇总了C++中corba::Object_ptr::_request方法的典型用法代码示例。如果您正苦于以下问题:C++ Object_ptr::_request方法的具体用法?C++ Object_ptr::_request怎么用?C++ Object_ptr::_request使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类corba::Object_ptr
的用法示例。
在下文中一共展示了Object_ptr::_request方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rCORBA_Stub_invoke
VALUE rCORBA_Stub_invoke(int _argc, VALUE *_argv, VALUE self)
{
// since rb_exc_raise () does not return and does *not* honour
// C++ exception rules we invoke from an inner function and
// only raise the user exception when returned so all stack
// unwinding has been correctly handled.
VALUE ret=Qnil;
bool _raise = false;
CORBA::Object_ptr obj;
VALUE opname = Qnil;
VALUE arg_list = Qnil;
VALUE result_type = Qnil;
VALUE exc_list = Qnil;
VALUE v1=Qnil;
// extract and check arguments
rb_scan_args(_argc, _argv, "20", &opname, &v1);
Check_Type (v1, T_HASH);
arg_list = rb_hash_aref (v1, ID_arg_list);
result_type = rb_hash_aref (v1, ID_result_type);
exc_list = rb_hash_aref (v1, ID_exc_list);
Check_Type(opname, T_STRING);
if (arg_list != Qnil)
Check_Type (arg_list, T_ARRAY);
if (result_type != Qnil)
r2tao_check_type(result_type, r2tao_cTypecode);
if (exc_list != Qnil)
Check_Type (exc_list, T_ARRAY);
obj = r2tao_Object_r2t (self);
R2TAO_TRY
{
CORBA::Request_var _req = obj->_request (RSTRING(opname)->ptr);
if (arg_list != Qnil)
_r2tao_set_request_arguments(_req.in (), arg_list);
if (exc_list != Qnil)
_r2tao_set_request_exceptions(_req.in (), exc_list);
if (result_type != Qnil)
_r2tao_set_request_return_type(_req.in (), result_type);
ret = _r2tao_invoke_request(_req.in (), _raise);
}
R2TAO_CATCH;
if (_raise) rb_exc_raise (ret);
return ret;
}
示例2:
VALUE
rCORBA_Object_request(VALUE self, VALUE op_name)
{
CORBA::Object_ptr obj;
CORBA::Request_var req;
obj = r2tao_Object_r2t (self);
Check_Type(op_name, T_STRING);
R2TAO_TRY
{
req = obj->_request (RSTRING(op_name)->ptr);
}
R2TAO_CATCH;
return r2tao_Request_t2r (req.in ());
}