Пример #1
0
int
Test_WString_Sequence::init_parameters (Param_Test_ptr)
{
  Generator *gen = GENERATOR::instance (); // value generator

  CORBA::ULong len = 2;

  // set the length of the sequences
  this->in_->length (len);
  this->inout_->length (len);

  // now set each individual element
  for (CORBA::ULong i = 0; i < this->in_->length (); i++)
    {
      this->in_[i] = gen->gen_wstring ();
      this->inout_[i] = gen->gen_wstring ();
    }

  return 0;
}
Пример #2
0
int
Test_Bounded_WString::init_parameters (Param_Test_ptr)
{
    Generator *gen = GENERATOR::instance (); // value generator

    // release any previously occupied values
    CORBA::wstring_free (this->in_);
    CORBA::wstring_free (this->inout_);
    CORBA::wstring_free (this->out_);
    CORBA::wstring_free (this->ret_);
    this->in_ = 0;
    this->inout_ = 0;
    this->out_ = 0;
    this->ret_ = 0;

    this->in_ = gen->gen_wstring (32);
    this->inout_ = CORBA::wstring_dup (this->in_);
    return 0;
}