当前位置: 首页>>代码示例>>C++>>正文


C++ JsValueList::push_back方法代码示例

本文整理汇总了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);
}
开发者ID:LTears,项目名称:libadblockplus-vs2013,代码行数:8,代码来源:FilterEngine.cpp

示例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();
}
开发者ID:LTears,项目名称:libadblockplus-vs2013,代码行数:15,代码来源:FilterEngine.cpp

示例3: AddToList

void Subscription::AddToList()
{
  JsValuePtr func = jsEngine->Evaluate("API.addSubscriptionToList");
  JsValueList params;
  params.push_back(shared_from_this());
  func->Call(params);
}
开发者ID:LTears,项目名称:libadblockplus-vs2013,代码行数:7,代码来源:FilterEngine.cpp

示例4: IsListed

bool Subscription::IsListed()
{
  JsValuePtr func = jsEngine->Evaluate("API.isListedSubscription");
  JsValueList params;
  params.push_back(shared_from_this());
  return func->Call(params)->AsBool();
}
开发者ID:LTears,项目名称:libadblockplus-vs2013,代码行数:7,代码来源:FilterEngine.cpp

示例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))));
}
开发者ID:LTears,项目名称:libadblockplus-vs2013,代码行数:7,代码来源:FilterEngine.cpp

示例6: RemoveFromList

void Filter::RemoveFromList()
{
  JsValuePtr func = jsEngine->Evaluate("API.removeFilterFromList");
  JsValueList params;
  params.push_back(shared_from_this());
  func->Call(params);
}
开发者ID:LTears,项目名称:libadblockplus-vs2013,代码行数:7,代码来源:FilterEngine.cpp

示例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();
}
开发者ID:LTears,项目名称:libadblockplus-vs2013,代码行数:7,代码来源:FilterEngine.cpp

示例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);
}
开发者ID:LTears,项目名称:libadblockplus-vs2013,代码行数:7,代码来源:FilterEngine.cpp

示例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))));
}
开发者ID:LTears,项目名称:libadblockplus-vs2013,代码行数:7,代码来源:FilterEngine.cpp

示例10: UpdateFilters

void Subscription::UpdateFilters()
{
  JsValuePtr func = jsEngine->Evaluate("API.updateSubscription");
  JsValueList params;
  params.push_back(shared_from_this());
  func->Call(params);
}
开发者ID:LTears,项目名称:libadblockplus-vs2013,代码行数:7,代码来源:FilterEngine.cpp

示例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();
}
开发者ID:LTears,项目名称:libadblockplus-vs2013,代码行数:8,代码来源:FilterEngine.cpp

示例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();
}
开发者ID:LTears,项目名称:libadblockplus-vs2013,代码行数:8,代码来源:FilterEngine.cpp

示例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;
}
开发者ID:khatribharat,项目名称:libadblockplus,代码行数:8,代码来源:JsEngine.cpp

示例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));
}
开发者ID:megabyte1024,项目名称:libadblockplus,代码行数:10,代码来源:FilterEngine.cpp

示例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);
}
开发者ID:LTears,项目名称:libadblockplus-vs2013,代码行数:10,代码来源:FilterEngine.cpp


注:本文中的JsValueList::push_back方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。