本文整理汇总了C++中ListHashSet::isEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ ListHashSet::isEmpty方法的具体用法?C++ ListHashSet::isEmpty怎么用?C++ ListHashSet::isEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ListHashSet
的用法示例。
在下文中一共展示了ListHashSet::isEmpty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: types
JSValue JSClipboard::types(ExecState* exec) const
{
Clipboard* clipboard = impl();
ListHashSet<String> types = clipboard->types();
if (types.isEmpty())
return jsNull();
MarkedArgumentBuffer list;
ListHashSet<String>::const_iterator end = types.end();
for (ListHashSet<String>::const_iterator it = types.begin(); it != end; ++it)
list.append(jsStringWithCache(exec, *it));
return constructArray(exec, 0, globalObject(), list);
}
示例2:
v8::Handle<v8::Value> V8Clipboard::typesAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Clipboard.types()");
Clipboard* clipboard = V8Clipboard::toNative(info.Holder());
ListHashSet<String> types = clipboard->types();
if (types.isEmpty())
return v8::Null(info.GetIsolate());
v8::Local<v8::Array> result = v8::Array::New(types.size());
ListHashSet<String>::const_iterator end = types.end();
int index = 0;
for (ListHashSet<String>::const_iterator it = types.begin(); it != end; ++it, ++index)
result->Set(v8Integer(index, info.GetIsolate()), v8String(*it, info.GetIsolate()));
return result;
}
示例3:
void V8Clipboard::typesAttrGetterCustom(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
Clipboard* clipboard = V8Clipboard::toNative(info.Holder());
ListHashSet<String> types = clipboard->types();
if (types.isEmpty()) {
v8SetReturnValueNull(info);
return;
}
v8::Local<v8::Array> result = v8::Array::New(types.size());
ListHashSet<String>::const_iterator end = types.end();
int index = 0;
for (ListHashSet<String>::const_iterator it = types.begin(); it != end; ++it, ++index)
result->Set(v8::Integer::New(index, info.GetIsolate()), v8String(*it, info.GetIsolate()));
v8SetReturnValue(info, result);
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_WebKit,代码行数:18,代码来源:V8ClipboardCustom.cpp