本文整理汇总了C++中corba::ORB_var::create_operation_list方法的典型用法代码示例。如果您正苦于以下问题:C++ ORB_var::create_operation_list方法的具体用法?C++ ORB_var::create_operation_list怎么用?C++ ORB_var::create_operation_list使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类corba::ORB_var
的用法示例。
在下文中一共展示了ORB_var::create_operation_list方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ACE_TMAIN
//.........这里部分代码省略.........
parameters[2].mode = CORBA::PARAM_INOUT ;
// ...and no exceptions...
//
ACE_DEBUG((LM_DEBUG, ". create 0 excepts\n"));
CORBA::ExceptionDefSeq exceptions( 1 ) ;
exceptions.length( 0 ) ;
// ...and no context ids
//
ACE_DEBUG((LM_DEBUG, ". create 0 cids\n"));
CORBA::ContextIdSeq contextIds( 1 ) ;
contextIds.length( 0 ) ;
// Create the operation, called "f".
//
ACE_DEBUG((LM_DEBUG, ". create_operation\n"));
CORBA::OperationDef_var operation =
intface->create_operation( "IDL:interface865/f:1.0",
"f",
"1.0",
voidPrimitive.in(),
CORBA::OP_NORMAL,
parameters,
exceptions,
contextIds) ;
// Create operation list.
//
CORBA::NVList_var opList ;
ACE_DEBUG((LM_DEBUG, "About to call create_operation_list\n"));
orb->create_operation_list(operation.in (),
opList.out()) ;
ACE_DEBUG((LM_DEBUG, "Call to create_operation_list succeeded\n"));
CORBA::ULong count = opList->count() ;
if( count != numParams )
{
ACE_DEBUG((LM_DEBUG, "Test failed - wrong number of elements n list\n")) ;
failed = 1 ;
}
CORBA::NamedValue_ptr nv = opList->item( 0 ) ;
if(ACE_OS::strcmp( nv->name(), "p1") != 0 )
{
ACE_DEBUG((LM_DEBUG, "Test failed: param 1 wrong name\n"));
failed = 1 ;
}
CORBA::Boolean const eq_char =
nv->value()->type()->equal (CORBA::_tc_char);
if( !eq_char )
{
ACE_DEBUG((LM_DEBUG, "Test failed: param 1 wrong type\n"));
failed = 1 ;
}
if( nv->flags() != CORBA::ARG_IN )
{
ACE_DEBUG((LM_DEBUG, "Test failed: param 1 wrong mode\n"));
failed = 1 ;
}