⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 selectall.cc

📁 2007年机器人足球世界杯3D仿真组亚军
💻 CC
字号:
#include "predicate.ih"unsigned Predicate::selectAll(vector<rPredicate> &_res, Path const &_select){  vector<rPredicate> search_space;  Path p = _select;  if (p.path.empty())    return 0;  if (p.path.front() == "/") {    // Search in all predicates with value path[0] which are in    // the top level of the tree.    p.path.pop_front();    if (p.path.empty()) {      _res.insert(_res.end(),children.begin(),children.end());      return children.size();    } else      findAll(search_space,p.path.front());  } else {    // Search in all predicates with value path[0].    findAllDeep(search_space,p.path.front());  }  p.path.pop_front();  unsigned cnt = 0;  for (vector<rPredicate>::iterator i = search_space.begin();       i != search_space.end(); ++i) {    if (p.path.empty()) {      _res.push_back(*i);      ++cnt;    } else      cnt += (*i)->selectAll(_res,p);  }  return cnt;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -