MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenImageIO / evaluate_node_set

Method evaluate_node_set

src/include/pugixml.cpp:10123–10151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10121 }
10122
10123 PUGI__FN xpath_node_set xpath_query::evaluate_node_set(const xpath_node& n) const
10124 {
10125 if (!_impl) return xpath_node_set();
10126
10127 impl::xpath_ast_node* root = static_cast<impl::xpath_query_impl*>(_impl)->root;
10128
10129 if (root->rettype() != xpath_type_node_set)
10130 {
10131 #ifdef PUGIXML_NO_EXCEPTIONS
10132 return xpath_node_set();
10133 #else
10134 xpath_parse_result res;
10135 res.error = "Expression does not evaluate to node set";
10136
10137 throw xpath_exception(res);
10138 #endif
10139 }
10140
10141 impl::xpath_context c(n, 1, 1);
10142 impl::xpath_stack_data sd;
10143
10144 #ifdef PUGIXML_NO_EXCEPTIONS
10145 if (setjmp(sd.error_handler)) return xpath_node_set();
10146 #endif
10147
10148 impl::xpath_node_set_raw r = root->eval_node_set(c, sd.stack);
10149
10150 return xpath_node_set(r.begin(), r.end(), r.type());
10151 }
10152
10153 PUGI__FN const xpath_parse_result& xpath_query::result() const
10154 {

Callers 2

select_single_nodeMethod · 0.80
select_nodesMethod · 0.80

Calls 6

xpath_node_setClass · 0.85
rettypeMethod · 0.80
eval_node_setMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected