本文整理汇总了C++中Param_Test_ptr::make_coffee方法的典型用法代码示例。如果您正苦于以下问题:C++ Param_Test_ptr::make_coffee方法的具体用法?C++ Param_Test_ptr::make_coffee怎么用?C++ Param_Test_ptr::make_coffee使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Param_Test_ptr
的用法示例。
在下文中一共展示了Param_Test_ptr::make_coffee方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: catch
int
Test_Objref_Struct::init_parameters (Param_Test_ptr objref)
{
try
{
Generator *gen = GENERATOR::instance (); // value generator
// Set the long member.
this->in_.x = gen->gen_long ();
this->in_.y = objref->make_coffee ();
Coffee::Desc d;
d.name = gen->gen_string ();
this->in_.y->description (d);
this->inout_->x = 0;
this->inout_->y = Coffee::_nil ();
Coffee::Desc dd;
dd.name = CORBA::string_dup ("");
return 0;
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Test_Objref_Struct::init_parameters\n");
}
return -1;
}
示例2: catch
int
Test_Any::init_parameters (Param_Test_ptr objref)
{
try
{
// get access to a Coffee Object
this->cobj_ = objref->make_coffee ();
this->reset_parameters ();
return 0;
}
catch (const CORBA::SystemException& sysex)
{
sysex._tao_print_exception ("System Exception doing make_coffee");
}
return -1;
}
示例3: catch
int
Test_ObjRef_Sequence::init_parameters (Param_Test_ptr objref)
{
try
{
Coffee::Desc desc;
Generator *gen = GENERATOR::instance (); // value generator
// get some sequence length (not more than 10)
CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 5) + 5;
// set the length of the sequence
this->in_.length (len);
// now set each individual element
for (CORBA::ULong i = 0; i < this->in_.length (); i++)
{
// generate some arbitrary string to be filled into the ith location in
// the sequence
this->in_[i] = objref->make_coffee ();
// select a Coffee flavor at random
CORBA::ULong index = (CORBA::ULong) (gen->gen_long () % 6);
desc.name = Coffee_Flavor [index];
// set the attribute for the in object
Coffee_ptr tmp = this->in_[i];
tmp->description (desc);
}
return 0;
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Test_ObjRef_Sequence::init_parameters\n");
}
return -1;
}