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


C++ NodeSet::end方法代码示例

本文整理汇总了C++中arabica::xpath::NodeSet::end方法的典型用法代码示例。如果您正苦于以下问题:C++ NodeSet::end方法的具体用法?C++ NodeSet::end怎么用?C++ NodeSet::end使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在arabica::xpath::NodeSet的用法示例。


在下文中一共展示了NodeSet::end方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: sort

  void sort(const DOM::Node<std::string>& node, Arabica::XPath::NodeSet<std::string>& nodes, ExecutionContext& context) const
  {
    if(!sort_)
    {
      if(!nodes.forward())
        nodes.to_document_order();
      return;
    }

    sort_->set_context(node, context);
    std::stable_sort(nodes.begin(), nodes.end(), SortP(*sort_));
  } // sort
开发者ID:alepharchives,项目名称:arabica,代码行数:12,代码来源:xslt_sort.hpp

示例2: nodeSetUnion

  Arabica::XPath::NodeSet<std::string> nodeSetUnion(const std::string& keyClarkName, 
							     const Arabica::XPath::NodeSet<std::string> nodes,
							     const Arabica::XPath::ExecutionContext<std::string>& executionContext) const
  {
    Arabica::XPath::NodeSet<std::string> results;
    for(Arabica::XPath::NodeSet<std::string>::const_iterator n = nodes.begin(), ne = nodes.end(); n != ne; ++n)
    {
      std::string id = Arabica::XPath::impl::nodeStringValue<std::string, Arabica::default_string_adaptor<std::string> >(*n);
      results.push_back(keys_.lookup(keyClarkName, id, executionContext));
    } // for ...
    results.to_document_order();
    return results;
  } // nodeSetUnion
开发者ID:alepharchives,项目名称:arabica,代码行数:13,代码来源:xslt_functions.hpp

示例3: execute

  virtual void execute(const DOM::Node<std::string>& node, ExecutionContext& context) const
  {
    Arabica::XPath::XPathValue<std::string> value = select_->evaluate(node, context.xpathContext());
    if(value.type() != Arabica::XPath::NODE_SET)
    {
      context.sink().characters(value.asString());
      return;
    } 

    Arabica::XPath::NodeSet<std::string> nodes = value.asNodeSet();
    for(Arabica::XPath::NodeSet<std::string>::const_iterator n = nodes.begin(), e = nodes.end(); n != e; ++n)
      copy(*n, context);
  } // execute
开发者ID:KITSVictorGubin,项目名称:jornal,代码行数:13,代码来源:xslt_copy.hpp


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