本文整理汇总了C++中icestorm::TopicManagerPrx::ice_getCommunicator方法的典型用法代码示例。如果您正苦于以下问题:C++ TopicManagerPrx::ice_getCommunicator方法的具体用法?C++ TopicManagerPrx::ice_getCommunicator怎么用?C++ TopicManagerPrx::ice_getCommunicator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类icestorm::TopicManagerPrx
的用法示例。
在下文中一共展示了TopicManagerPrx::ice_getCommunicator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: catch
ObserverTopic::ObserverTopic(const IceStorm::TopicManagerPrx& topicManager, const string& name, Ice::Long dbSerial) :
_logger(topicManager->ice_getCommunicator()->getLogger()), _serial(0), _dbSerial(dbSerial)
{
for(int i = 0; i < static_cast<int>(sizeof(encodings) / sizeof(Ice::EncodingVersion)); ++i)
{
ostringstream os;
os << name << "-" << Ice::encodingVersionToString(encodings[i]);
IceStorm::TopicPrx t;
try
{
t = topicManager->create(os.str());
}
catch(const IceStorm::TopicExists&)
{
t = topicManager->retrieve(os.str());
}
//
// NOTE: collocation optimization needs to be turned on for the
// topic because the subscribe() method is given a fixed proxy
// which can't be marshalled.
//
_topics[encodings[i]] = t->ice_collocationOptimized(true);
_basePublishers.push_back(
t->getPublisher()->ice_collocationOptimized(false)->ice_encodingVersion(encodings[i]));
}
}