本文整理汇总了C++中SVGPendingElements::contains方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGPendingElements::contains方法的具体用法?C++ SVGPendingElements::contains怎么用?C++ SVGPendingElements::contains使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVGPendingElements
的用法示例。
在下文中一共展示了SVGPendingElements::contains方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isElementPendingResources
bool SVGDocumentExtensions::isElementPendingResources(Element* element) const
{
// This algorithm takes time proportional to the number of pending resources and need not.
// If performance becomes an issue we can keep a counted set of elements and answer the question efficiently.
ASSERT(element);
for (const auto& entry : m_pendingResources) {
SVGPendingElements* elements = entry.value.get();
ASSERT(elements);
if (elements->contains(element))
return true;
}
return false;
}
示例2: isElementPendingResources
bool SVGDocumentExtensions::isElementPendingResources(SVGStyledElement* element) const
{
// This algorithm takes time proportional to the number of pending resources and need not.
// If performance becomes an issue we can keep a counted set of elements and answer the question efficiently.
ASSERT(element);
HashMap<AtomicString, SVGPendingElements*>::const_iterator end = m_pendingResources.end();
for (HashMap<AtomicString, SVGPendingElements*>::const_iterator it = m_pendingResources.begin(); it != end; ++it) {
SVGPendingElements* elements = it->value;
ASSERT(elements);
if (elements->contains(element))
return true;
}
return false;
}