本文整理汇总了C++中TestInterface::getItem方法的典型用法代码示例。如果您正苦于以下问题:C++ TestInterface::getItem方法的具体用法?C++ TestInterface::getItem怎么用?C++ TestInterface::getItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestInterface
的用法示例。
在下文中一共展示了TestInterface::getItem方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: namedPropertyGetter
static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
if (info.Holder()->HasRealNamedProperty(name))
return;
if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
return;
TestInterface* impl = V8TestInterface::toNative(info.Holder());
AtomicString propertyName = toCoreAtomicString(name);
bool result0Enabled = false;
RefPtr<Node> result0;
bool result1Enabled = false;
RefPtr<NodeList> result1;
impl->getItem(propertyName, result0Enabled, result0, result1Enabled, result1);
if (!result0Enabled && !result1Enabled)
return;
if (result0Enabled) {
v8SetReturnValueFast(info, WTF::getPtr(result0.release()), impl);
return;
}
if (result1Enabled) {
v8SetReturnValueFast(info, WTF::getPtr(result1.release()), impl);
return;
}
v8SetReturnValueNull(info);
}
示例2: namedPropertyGetter
static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
return;
if (info.Holder()->HasRealNamedCallbackProperty(name))
return;
if (info.Holder()->HasRealNamedProperty(name))
return;
TestInterface* collection = V8TestInterface::toNative(info.Holder());
AtomicString propertyName = toCoreAtomicString(name);
bool element0Enabled = false;
RefPtr<Node> element0;
bool element1Enabled = false;
RefPtr<NodeList> element1;
collection->getItem(propertyName, element0Enabled, element0, element1Enabled, element1);
if (element0Enabled) {
v8SetReturnValueFast(info, element0.release(), collection);
return;
}
if (element1Enabled) {
v8SetReturnValueFast(info, element1.release(), collection);
return;
}
return;
}
示例3: namedItemMethod
static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
if (UNLIKELY(info.Length() < 1)) {
throwTypeError(ExceptionMessages::failedToExecute("namedItem", "TestInterface", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
return;
}
TestInterface* impl = V8TestInterface::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, info[0]);
bool result0Enabled = false;
RefPtr<Node> result0;
bool result1Enabled = false;
RefPtr<NodeList> result1;
impl->getItem(name, result0Enabled, result0, result1Enabled, result1);
if (result0Enabled) {
v8SetReturnValue(info, result0.release());
return;
}
if (result1Enabled) {
v8SetReturnValue(info, result1.release());
return;
}
v8SetReturnValueNull(info);
}