本文整理汇总了C++中corba::ORB_ptr::poll_next_response方法的典型用法代码示例。如果您正苦于以下问题:C++ ORB_ptr::poll_next_response方法的具体用法?C++ ORB_ptr::poll_next_response怎么用?C++ ORB_ptr::poll_next_response使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类corba::ORB_ptr
的用法示例。
在下文中一共展示了ORB_ptr::poll_next_response方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: get_asynch_replies
void Connection::get_asynch_replies()
{
CORBA::ORB_ptr orb = ApiUtil::instance()->get_orb();
//
// First get all replies from ORB buffers
//
try
{
while (orb->poll_next_response() == true)
{
CORBA::Request_ptr req;
orb->get_next_response(req);
//
// Retrieve this request in the cb request map and mark it as "arrived" in both maps
//
TgRequest &tg_req = ApiUtil::instance()->get_pasyn_table()->get_request(req);
tg_req.arrived = true;
ApiUtil::instance()->get_pasyn_table()->mark_as_arrived(req);
//
// Is it a request for our device, process it ?
//
if (tg_req.dev == this)
{
switch (tg_req.req_type)
{
case TgRequest::CMD_INOUT :
Cb_Cmd_Request(req,tg_req.cb_ptr);
break;
case TgRequest::READ_ATTR :
Cb_ReadAttr_Request(req,tg_req.cb_ptr);
break;
case TgRequest::WRITE_ATTR :
case TgRequest::WRITE_ATTR_SINGLE :
Cb_WriteAttr_Request(req,tg_req.cb_ptr);
break;
}
remove_asyn_cb_request(this,req);
}
}
}
catch (CORBA::BAD_INV_ORDER &e)
{
if (e.minor() != omni::BAD_INV_ORDER_RequestNotSentYet)
throw;
}
//
// Now check all replies already there
//
TgRequest *tg_ptr;
while ((tg_ptr = ApiUtil::instance()->get_pasyn_table()->get_request(this)) != NULL)
{
switch (tg_ptr->req_type)
{
case TgRequest::CMD_INOUT :
Cb_Cmd_Request(tg_ptr->request,tg_ptr->cb_ptr);
break;
case TgRequest::READ_ATTR :
Cb_ReadAttr_Request(tg_ptr->request,tg_ptr->cb_ptr);
break;
case TgRequest::WRITE_ATTR :
case TgRequest::WRITE_ATTR_SINGLE :
Cb_WriteAttr_Request(tg_ptr->request,tg_ptr->cb_ptr);
break;
}
remove_asyn_cb_request(this,tg_ptr->request);
}
}