本文整理汇总了C++中JsValueList::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ JsValueList::push_back方法的具体用法?C++ JsValueList::push_back怎么用?C++ JsValueList::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JsValueList
的用法示例。
在下文中一共展示了JsValueList::push_back方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetPref
void FilterEngine::SetPref(const std::string& pref, JsValuePtr value)
{
JsValuePtr func = jsEngine->Evaluate("API.setPref");
JsValueList params;
params.push_back(jsEngine->NewValue(pref));
params.push_back(value);
func->Call(params);
}
示例2: CheckFilterMatch
AdblockPlus::FilterPtr FilterEngine::CheckFilterMatch(const std::string& url,
ContentType contentType,
const std::string& documentUrl) const
{
JsValuePtr func = jsEngine->Evaluate("API.checkFilterMatch");
JsValueList params;
params.push_back(jsEngine->NewValue(url));
params.push_back(jsEngine->NewValue(ContentTypeToString(contentType)));
params.push_back(jsEngine->NewValue(documentUrl));
JsValuePtr result = func->Call(params);
if (!result->IsNull())
return FilterPtr(new Filter(std::move(*result)));
else
return FilterPtr();
}
示例3: AddToList
void Subscription::AddToList()
{
JsValuePtr func = jsEngine->Evaluate("API.addSubscriptionToList");
JsValueList params;
params.push_back(shared_from_this());
func->Call(params);
}
示例4: IsListed
bool Subscription::IsListed()
{
JsValuePtr func = jsEngine->Evaluate("API.isListedSubscription");
JsValueList params;
params.push_back(shared_from_this());
return func->Call(params)->AsBool();
}
示例5: GetSubscription
SubscriptionPtr FilterEngine::GetSubscription(const std::string& url)
{
JsValuePtr func = jsEngine->Evaluate("API.getSubscriptionFromUrl");
JsValueList params;
params.push_back(jsEngine->NewValue(url));
return SubscriptionPtr(new Subscription(std::move(*func->Call(params))));
}
示例6: RemoveFromList
void Filter::RemoveFromList()
{
JsValuePtr func = jsEngine->Evaluate("API.removeFilterFromList");
JsValueList params;
params.push_back(shared_from_this());
func->Call(params);
}
示例7: GetHostFromURL
std::string FilterEngine::GetHostFromURL(const std::string& url)
{
JsValuePtr func = jsEngine->Evaluate("API.getHostFromUrl");
JsValueList params;
params.push_back(jsEngine->NewValue(url));
return func->Call(params)->AsString();
}
示例8: GetPref
JsValuePtr FilterEngine::GetPref(const std::string& pref) const
{
JsValuePtr func = jsEngine->Evaluate("API.getPref");
JsValueList params;
params.push_back(jsEngine->NewValue(pref));
return func->Call(params);
}
示例9: GetFilter
FilterPtr FilterEngine::GetFilter(const std::string& text)
{
JsValuePtr func = jsEngine->Evaluate("API.getFilterFromText");
JsValueList params;
params.push_back(jsEngine->NewValue(text));
return FilterPtr(new Filter(std::move(*func->Call(params))));
}
示例10: UpdateFilters
void Subscription::UpdateFilters()
{
JsValuePtr func = jsEngine->Evaluate("API.updateSubscription");
JsValueList params;
params.push_back(shared_from_this());
func->Call(params);
}
示例11: CompareVersions
int FilterEngine::CompareVersions(const std::string& v1, const std::string& v2)
{
JsValueList params;
params.push_back(jsEngine->NewValue(v1));
params.push_back(jsEngine->NewValue(v2));
JsValuePtr func = jsEngine->Evaluate("API.compareVersions");
return func->Call(params)->AsInt();
}
示例12: IsUpdating
bool Subscription::IsUpdating()
{
JsValuePtr func = jsEngine->Evaluate("API.isSubscriptionUpdating");
JsValueList params;
params.push_back(shared_from_this());
JsValuePtr result = func->Call(params);
return result->AsBool();
}
示例13: context
AdblockPlus::JsValueList AdblockPlus::JsEngine::ConvertArguments(const v8::Arguments& arguments)
{
const JsContext context(shared_from_this());
JsValueList list;
for (int i = 0; i < arguments.Length(); i++)
list.push_back(JsValuePtr(new JsValue(shared_from_this(), arguments[i])));
return list;
}
示例14: GetNextNotificationToShow
NotificationPtr FilterEngine::GetNextNotificationToShow(const std::string& url)
{
JsValuePtr func = jsEngine->Evaluate("API.getNextNotificationToShow");
JsValueList params;
if (!url.empty())
{
params.push_back(jsEngine->NewValue(url));
}
return Notification::JsValueToNotification(func->Call(params));
}
示例15: ShowNextNotification
void FilterEngine::ShowNextNotification(const std::string& url)
{
JsValuePtr func = jsEngine->Evaluate("API.showNextNotification");
JsValueList params;
if (!url.empty())
{
params.push_back(jsEngine->NewValue(url));
}
func->Call(params);
}