| 12682 | } |
| 12683 | |
| 12684 | PUGI__FN bool xpath_query::evaluate_boolean(const xpath_node& n) const |
| 12685 | { |
| 12686 | if (!_impl) return false; |
| 12687 | |
| 12688 | impl::xpath_context c(n, 1, 1); |
| 12689 | impl::xpath_stack_data sd; |
| 12690 | |
| 12691 | bool r = static_cast<impl::xpath_query_impl*>(_impl)->root->eval_boolean(c, sd.stack); |
| 12692 | |
| 12693 | if (sd.oom) |
| 12694 | { |
| 12695 | #ifdef PUGIXML_NO_EXCEPTIONS |
| 12696 | return false; |
| 12697 | #else |
| 12698 | throw std::bad_alloc(); |
| 12699 | #endif |
| 12700 | } |
| 12701 | |
| 12702 | return r; |
| 12703 | } |
| 12704 | |
| 12705 | PUGI__FN double xpath_query::evaluate_number(const xpath_node& n) const |
| 12706 | { |
nothing calls this directly
no test coverage detected