24,854
社区成员
发帖
与我相关
我的任务
分享
navigatingEvent* navigating;
//其结构如下:
struct navigatingEvent
{
typedef navigatingEvent_var _var_type;
typedef navigatingEvent_out _out_type;
::CORBA::Double ifheading;
::CORBA::Double ifvertiangle;
::CORBA::Double ifhoriangle;
::CORBA::Double ibheading;
::CORBA::Double ibvertiangle;
::CORBA::Double ibhoriangle;
::CORBA::Double relativespeed;
::CORBA::Double absolutespeed;
::CORBA::Double northspeed;
::CORBA::Double eastspeed;
::CORBA::Double longitude;
::CORBA::Double latitude;
::CORBA::Double anglespeedx;
::CORBA::Double anglespeedy;
::CORBA::Double anglespeedz;
::CORBA::Double hacceleration;
::CORBA::Double vertipitchangle;
::CORBA::Double horipitchangle;
::CORBA::Double ifupdowndist;
::CORBA::Double ifupdownspeed;
::CORBA::Double ibupdowndist;
::CORBA::Double ibupdownspeed;
::CORBA::Double depth;
::CORBA::Double distance;
::CORBA::ULong status;
};
//同时有一个定义
const CORBA::Any &event
if(event >>= navigating)//报错
/*
navigatingEventConsumer.cpp:33: error: no match for 'operator>>=' in 'event >>= navigating'
d:/ACE_wrappers/TAO/tao/AnyTypeCode/Any.h:137: note: candidates are: CORBA::Boolean CORBA::Any::operator>>=(ACE_InputCDR::to_boolean) const
*/