本文整理汇总了C++中TestIntfPrx::twoElementCycle方法的典型用法代码示例。如果您正苦于以下问题:C++ TestIntfPrx::twoElementCycle方法的具体用法?C++ TestIntfPrx::twoElementCycle怎么用?C++ TestIntfPrx::twoElementCycle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestIntfPrx
的用法示例。
在下文中一共展示了TestIntfPrx::twoElementCycle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tprintf
//.........这里部分代码省略.........
test(0);
}
catch(const Ice::MarshalException&)
{
}
catch(...)
{
test(0);
}
}
tprintf("ok\n");
tprintf("one-element cycle... ");
{
try
{
BPtr b = test->oneElementCycle();
test(b);
test(b->ice_id() == "::Test::B");
test(b->sb == "B1.sb");
test(b->pb == b);
}
catch(...)
{
test(0);
}
}
tprintf("ok\n");
tprintf("two-element cycle... ");
{
try
{
BPtr b1 = test->twoElementCycle();
test(b1);
test(b1->ice_id() == "::Test::B");
test(b1->sb == "B1.sb");
BPtr b2 = b1->pb;
test(b2);
test(b2->ice_id() == "::Test::B");
test(b2->sb == "B2.sb");
test(b2->pb == b1);
}
catch(...)
{
test(0);
}
}
tprintf("ok\n");
tprintf("known derived pointer slicing as base... ");
{
try
{
BPtr b1;
b1 = test->D1AsB();
test(b1);
test(b1->ice_id() == "::Test::D1");
test(b1->sb == "D1.sb");
test(b1->pb);
test(b1->pb != b1);
D1Ptr d1 = D1Ptr::dynamicCast(b1);
test(d1);
test(d1->sd1 == "D1.sd1");
test(d1->pd1);