示例#1
0
文件: NodeInfo.cpp 项目: ihmc/nomads
SubscriptionList * LocalNodeInfo::getConsolidatedSubscriptionsCopy (void)
{
    SubscriptionList *pConsolidatedSubscriptionsCopy = new SubscriptionList();
    if (pConsolidatedSubscriptionsCopy != NULL) {
        for (StringHashtable<Subscription>::Iterator i = _consolidatedSubscriptions.getIterator(); !i.end(); i.nextElement()) {
            pConsolidatedSubscriptionsCopy->addSubscription (i.getKey(), (i.getValue())->clone()); // Clone subscription before adding it
        }
    }
    return pConsolidatedSubscriptionsCopy;
}
示例#2
0
文件: NodeInfo.cpp 项目: ihmc/nomads
SubscriptionList * RemoteNodeInfo::getRemoteSubscriptionsCopy (void)
{
    // Returns a copy of _pRemoteSubscriptions
    SubscriptionList *pRemoteSubscriptionsCopy = NULL;
    if (_pRemoteSubscriptions) {
        pRemoteSubscriptionsCopy = new SubscriptionList();
        for (StringHashtable<Subscription>::Iterator i = _pRemoteSubscriptions->getIterator(); !i.end(); i.nextElement()) {
            pRemoteSubscriptionsCopy->addSubscription (i.getKey(), (i.getValue())->clone()); // Clone subscription before adding it
        }
    }
    return pRemoteSubscriptionsCopy;
}