コード例 #1
0
void
reportResult(CORBA::Request_ptr request)
{
  Miro::Client client;
  Miro::AnyPrinter printer(printName,
                           printType,
                           printLength,
                           printEnums,
                           printTc,
                           printId);

  CORBA::NVList_ptr arguments = request->arguments();
  for (CORBA::ULong i = 0; i < arguments->count(); ++i) {
    cout << "argument name: " << arguments->item(i)->name() << endl;
    CORBA::Any_ptr any = arguments->item(i)->value();

    printer.print(cout, *any);
    cout << endl;
  }

  cout << "return value: " << endl;
  CORBA::Any any = request->return_value();
  printer.print(cout, any);
  cout << endl;
}
コード例 #2
0
ファイル: ContextImpl.C プロジェクト: AlvaroVega/TIDorbC
void TIDorb::core::ContextImpl::set_values(CORBA::NVList_ptr values)
{
  TIDThr::Synchronized sync(*this);	
  
  if (!(values))
    throw  CORBA::BAD_PARAM(0,CORBA::COMPLETED_NO); // "Null NVList reference"

  delete m_values;
  
  CORBA::ULong list_size = values->count();
  
  m_orb->create_list(list_size, m_values);

  for(CORBA::ULong i = 0; i < list_size; i++) 
    set_one_value(values->item(i)->name(), *(values->item(i)->value()));
}