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