本文整理汇总了C++中PassOwnPtr::handleItem方法的典型用法代码示例。如果您正苦于以下问题:C++ PassOwnPtr::handleItem方法的具体用法?C++ PassOwnPtr::handleItem怎么用?C++ PassOwnPtr::handleItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PassOwnPtr
的用法示例。
在下文中一共展示了PassOwnPtr::handleItem方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: forEachInternal
void Headers::forEachInternal(PassOwnPtr<HeadersForEachCallback> callback, ScriptValue* thisArg)
{
TrackExceptionState exceptionState;
for (size_t i = 0; i < m_headerList->size(); ++i) {
if (thisArg)
callback->handleItem(*thisArg, m_headerList->list()[i]->second, m_headerList->list()[i]->first, this);
else
callback->handleItem(m_headerList->list()[i]->second, m_headerList->list()[i]->first, this);
if (exceptionState.hadException())
break;
}
}
示例2: forEachInternal
void HeaderMap::forEachInternal(PassOwnPtr<HeaderMapForEachCallback> callback, ScriptValue* thisArg)
{
TrackExceptionState exceptionState;
for (HashMap<String, String>::const_iterator it = m_headers.begin(); it != m_headers.end(); ++it) {
if (thisArg)
callback->handleItem(*thisArg, it->value, it->key, this);
else
callback->handleItem(it->value, it->key, this);
if (exceptionState.hadException())
break;
}
}
示例3: forEachInternal
void FontFaceSet::forEachInternal(PassOwnPtr<FontFaceSetForEachCallback> callback, const ScriptValue* thisArg) const
{
if (!inActiveDocumentContext())
return;
const ListHashSet<RefPtr<FontFace> >& cssConnectedFaces = cssConnectedFontFaceList();
Vector<RefPtr<FontFace> > fontFaces;
fontFaces.reserveInitialCapacity(cssConnectedFaces.size() + m_nonCSSConnectedFaces.size());
for (ListHashSet<RefPtr<FontFace> >::const_iterator it = cssConnectedFaces.begin(); it != cssConnectedFaces.end(); ++it)
fontFaces.append(*it);
for (ListHashSet<RefPtr<FontFace> >::const_iterator it = m_nonCSSConnectedFaces.begin(); it != m_nonCSSConnectedFaces.end(); ++it)
fontFaces.append(*it);
for (size_t i = 0; i < fontFaces.size(); ++i) {
FontFace* face = fontFaces[i].get();
if (thisArg)
callback->handleItem(*thisArg, face, face, const_cast<FontFaceSet*>(this));
else
callback->handleItem(face, face, const_cast<FontFaceSet*>(this));
}
}