本文整理汇总了C++中CppVariant::set方法的典型用法代码示例。如果您正苦于以下问题:C++ CppVariant::set方法的具体用法?C++ CppVariant::set怎么用?C++ CppVariant::set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CppVariant
的用法示例。
在下文中一共展示了CppVariant::set方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: invokeDefault
bool CppVariant::invokeDefault(const CppVariant* arguments, uint32_t argumentCount,
CppVariant& result) const
{
WEBKIT_ASSERT(isObject());
NPObject* npObject = value.objectValue;
NPVariant r;
bool status = WebBindings::invokeDefault(0, npObject, arguments, argumentCount, &r);
result.set(r);
return status;
}
示例2: setProperty
bool CppBoundClass::setProperty(NPIdentifier ident, const NPVariant* value)
{
PropertyList::iterator callback = m_properties.find(ident);
if (callback == m_properties.end())
return false;
CppVariant cppValue;
cppValue.set(*value);
return (*callback).second->setValue(cppValue);
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_WebKit,代码行数:10,代码来源:CppBoundClass.cpp
示例3: notificationReceived
void AccessibilityUIElement::notificationReceived(const char* notificationName)
{
size_t callbackCount = m_notificationCallbacks.size();
for (size_t i = 0; i < callbackCount; i++) {
CppVariant notificationNameArgument;
notificationNameArgument.set(notificationName);
CppVariant invokeResult;
m_notificationCallbacks[i].invokeDefault(¬ificationNameArgument, 1, invokeResult);
}
}
示例4: invoke
bool CppVariant::invoke(const string& method, const CppVariant* arguments,
uint32_t argumentCount, CppVariant& result) const
{
WEBKIT_ASSERT(isObject());
NPIdentifier methodName = WebBindings::getStringIdentifier(method.c_str());
NPObject* npObject = value.objectValue;
if (!WebBindings::hasMethod(0, npObject, methodName))
return false;
NPVariant r;
bool status = WebBindings::invoke(0, npObject, methodName, arguments, argumentCount, &r);
result.set(r);
return status;
}