本文整理汇总了C++中Generator::gen_wstring方法的典型用法代码示例。如果您正苦于以下问题:C++ Generator::gen_wstring方法的具体用法?C++ Generator::gen_wstring怎么用?C++ Generator::gen_wstring使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Generator
的用法示例。
在下文中一共展示了Generator::gen_wstring方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
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:
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;
}