本文整理汇总了C++中DviSubscription::Remove方法的典型用法代码示例。如果您正苦于以下问题:C++ DviSubscription::Remove方法的具体用法?C++ DviSubscription::Remove怎么用?C++ DviSubscription::Remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DviSubscription
的用法示例。
在下文中一共展示了DviSubscription::Remove方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RemoveSubscription
void PropertyUpdatesFlattened::RemoveSubscription(const Brx& aSid, TBool aExpired)
{
Brn sid(aSid);
SubscriptionMap::iterator it = iSubscriptionMap.find(sid);
if (it != iSubscriptionMap.end()) {
// remove any pending updates for this subscription too
UpdatesMap::iterator it2 = iUpdatesMap.find(sid);
if (it2 != iUpdatesMap.end()) {
delete it2->second;
iUpdatesMap.erase(it2);
}
DviSubscription* subscription = it->second;
iSubscriptionMap.erase(it);
if (!aExpired) {
subscription->Remove();
}
}
}
示例2: Disable
void PropertyWriterFactory::Disable()
{
Stack::Mutex().Wait();
iEnabled = false;
Stack::Mutex().Signal();
iSubscriptionMapLock.Wait();
std::vector<DviSubscription*> subscriptions;
SubscriptionMap::iterator it = iSubscriptionMap.begin();
if (it != iSubscriptionMap.end()) {
DviSubscription* subscription = it->second;
if (subscription->TryAddRef()) {
subscriptions.push_back(subscription);
}
it++;
}
iSubscriptionMapLock.Signal();
for (TUint i=0; i<(TUint)subscriptions.size(); i++) {
DviSubscription* subscription = subscriptions[i];
subscription->Remove();
subscription->RemoveRef();
}
RemoveRef();
}