本文整理汇总了C++中ice::CommunicatorPtr::proxyToProperty方法的典型用法代码示例。如果您正苦于以下问题:C++ CommunicatorPtr::proxyToProperty方法的具体用法?C++ CommunicatorPtr::proxyToProperty怎么用?C++ CommunicatorPtr::proxyToProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ice::CommunicatorPtr
的用法示例。
在下文中一共展示了CommunicatorPtr::proxyToProperty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
test(b1->ice_getEndpointSelection() == Ice::Random);
prop->setProperty(property, "Random");
b1 = communicator->propertyToProxy(propertyPrefix);
test(b1->ice_getEndpointSelection() == Ice::Random);
prop->setProperty(property, "Ordered");
b1 = communicator->propertyToProxy(propertyPrefix);
test(b1->ice_getEndpointSelection() == Ice::Ordered);
prop->setProperty(property, "");
property = propertyPrefix + ".CollocationOptimized";
test(b1->ice_isCollocationOptimized());
prop->setProperty(property, "0");
b1 = communicator->propertyToProxy(propertyPrefix);
test(!b1->ice_isCollocationOptimized());
prop->setProperty(property, "");
property = propertyPrefix + ".Context.c1";
test(b1->ice_getContext()["c1"].empty());
prop->setProperty(property, "TEST");
b1 = communicator->propertyToProxy(propertyPrefix);
test(b1->ice_getContext()["c1"] == "TEST");
property = propertyPrefix + ".Context.c2";
test(b1->ice_getContext()["c2"].empty());
prop->setProperty(property, "TEST");
b1 = communicator->propertyToProxy(propertyPrefix);
test(b1->ice_getContext()["c2"] == "TEST");
prop->setProperty(propertyPrefix + ".Context.c1", "");
prop->setProperty(propertyPrefix + ".Context.c2", "");
cout << "ok" << endl;
cout << "testing proxyToProperty... " << flush;
b1 = communicator->stringToProxy("test");
b1 = b1->ice_collocationOptimized(true);
b1 = b1->ice_connectionCached(true);
b1 = b1->ice_preferSecure(false);
b1 = b1->ice_endpointSelection(Ice::Ordered);
b1 = b1->ice_locatorCacheTimeout(100);
b1 = b1->ice_invocationTimeout(1234);
Ice::EncodingVersion v = { 1, 0 };
b1 = b1->ice_encodingVersion(v);
Ice::ObjectPrx router = communicator->stringToProxy("router");
router = router->ice_collocationOptimized(false);
router = router->ice_connectionCached(true);
router = router->ice_preferSecure(true);
router = router->ice_endpointSelection(Ice::Random);
router = router->ice_locatorCacheTimeout(200);
router = router->ice_invocationTimeout(1500);
Ice::ObjectPrx locator = communicator->stringToProxy("locator");
locator = locator->ice_collocationOptimized(true);
locator = locator->ice_connectionCached(false);
locator = locator->ice_preferSecure(true);
locator = locator->ice_endpointSelection(Ice::Random);
locator = locator->ice_locatorCacheTimeout(300);
locator = locator->ice_invocationTimeout(1500);
locator = locator->ice_router(Ice::RouterPrx::uncheckedCast(router));
b1 = b1->ice_locator(Ice::LocatorPrx::uncheckedCast(locator));
Ice::PropertyDict proxyProps = communicator->proxyToProperty(b1, "Test");
test(proxyProps.size() == 21);