Private Member Functions | |
void | apply_predicate (xpath_node_set_raw &ns, size_t first, const xpath_stack &stack, bool once) |
void | apply_predicates (xpath_node_set_raw &ns, size_t first, const xpath_stack &stack, nodeset_eval_t eval) |
xpath_ast_node & | operator= (const xpath_ast_node &) |
template<class T > | |
xpath_node_set_raw | step_do (const xpath_context &c, const xpath_stack &stack, nodeset_eval_t eval, T v) |
template<class T > | |
void | step_fill (xpath_node_set_raw &ns, xml_node_struct *n, xpath_allocator *alloc, bool once, T) |
template<class T > | |
void | step_fill (xpath_node_set_raw &ns, xml_attribute_struct *a, xml_node_struct *p, xpath_allocator *alloc, bool once, T v) |
template<class T > | |
void | step_fill (xpath_node_set_raw &ns, const xpath_node &xn, xpath_allocator *alloc, bool once, T v) |
bool | step_push (xpath_node_set_raw &ns, xml_attribute_struct *a, xml_node_struct *parent, xpath_allocator *alloc) |
bool | step_push (xpath_node_set_raw &ns, xml_node_struct *n, xpath_allocator *alloc) |
xpath_ast_node (const xpath_ast_node &) | |
Static Private Member Functions | |
static void | apply_predicate_boolean (xpath_node_set_raw &ns, size_t first, xpath_ast_node *expr, const xpath_stack &stack, bool once) |
static void | apply_predicate_number (xpath_node_set_raw &ns, size_t first, xpath_ast_node *expr, const xpath_stack &stack, bool once) |
static void | apply_predicate_number_const (xpath_node_set_raw &ns, size_t first, xpath_ast_node *expr, const xpath_stack &stack) |
template<class Comp > | |
static bool | compare_eq (xpath_ast_node *lhs, xpath_ast_node *rhs, const xpath_context &c, const xpath_stack &stack, const Comp &comp) |
template<class Comp > | |
static bool | compare_rel (xpath_ast_node *lhs, xpath_ast_node *rhs, const xpath_context &c, const xpath_stack &stack, const Comp &comp) |
static bool | eval_once (xpath_node_set::type_t type, nodeset_eval_t eval) |
Private Attributes | |
char | _axis |
union { | |
const char_t * nodetest | |
double number | |
const char_t * string | |
const unsigned char * table | |
xpath_variable * variable | |
} | _data |
xpath_ast_node * | _left |
xpath_ast_node * | _next |
char | _rettype |
xpath_ast_node * | _right |
char | _test |
char | _type |
Definition at line 9380 of file pugixml.cpp.
|
private |
|
inline |
Definition at line 10130 of file pugixml.cpp.
References ast_string_constant, and pugi::xml_node::value().
|
inline |
Definition at line 10137 of file pugixml.cpp.
References ast_number_constant, and pugi::xml_node::value().
|
inline |
Definition at line 10144 of file pugixml.cpp.
References ast_variable, and pugi::xml_node::value().
|
inline |
Definition at line 10151 of file pugixml.cpp.
|
inline |
Definition at line 10156 of file pugixml.cpp.
References ast_step.
|
inline |
Definition at line 10163 of file pugixml.cpp.
References ast_filter, and ast_predicate.
|
inlineprivate |
Definition at line 9659 of file pugixml.cpp.
References ast_filter, ast_predicate, predicate_constant, predicate_constant_one, rettype(), xpath_node_set_raw::size(), and pugi::xpath_type_number.
|
inlinestaticprivate |
Definition at line 9579 of file pugixml.cpp.
References xpath_node_set_raw::begin(), xpath_node_set_raw::end(), eval_boolean(), rettype(), xpath_node_set_raw::size(), xpath_node_set_raw::truncate(), and pugi::xpath_type_number.
|
inlinestaticprivate |
Definition at line 9605 of file pugixml.cpp.
References xpath_node_set_raw::begin(), xpath_node_set_raw::end(), eval_number(), rettype(), xpath_node_set_raw::size(), xpath_node_set_raw::truncate(), and pugi::xpath_type_number.
|
inlinestaticprivate |
Definition at line 9631 of file pugixml.cpp.
References xpath_node_set_raw::begin(), eval_number(), rettype(), xpath_node_set_raw::size(), xpath_node_set_raw::truncate(), and pugi::xpath_type_number.
|
inlineprivate |
Definition at line 9673 of file pugixml.cpp.
References _next, xpath_node_set_raw::size(), and xpath_node_set_raw::type().
|
inlinestaticprivate |
Definition at line 9415 of file pugixml.cpp.
References xpath_node_set_raw::begin(), xpath_string::c_str(), convert_string_to_number(), xpath_node_set_raw::end(), eval_boolean(), eval_node_set(), eval_number(), eval_string(), nodeset_eval_all, xpath_stack::result, rettype(), string_value(), swap(), pugi::xpath_type_boolean, pugi::xpath_type_node_set, pugi::xpath_type_number, and pugi::xpath_type_string.
|
inlinestaticprivate |
Definition at line 9508 of file pugixml.cpp.
References xpath_node_set_raw::begin(), xpath_string::c_str(), convert_string_to_number(), xpath_node_set_raw::end(), eval_node_set(), eval_number(), nodeset_eval_all, xpath_stack::result, rettype(), string_value(), and pugi::xpath_type_node_set.
|
inline |
Definition at line 10179 of file pugixml.cpp.
References _data, _type, ast_func_boolean, ast_func_contains, ast_func_false, ast_func_lang, ast_func_not, ast_func_starts_with, ast_func_true, ast_op_and, ast_op_equal, ast_op_greater, ast_op_greater_or_equal, ast_op_less, ast_op_less_or_equal, ast_op_not_equal, ast_op_or, ast_opt_compare_attribute, ast_string_constant, ast_variable, xpath_string::c_str(), convert_number_to_boolean(), eval_boolean(), eval_string(), find_substring(), is_xpath_attribute(), xpath_context::n, nodeset_eval_any, nodetest, PUGIXML_TEXT, xpath_stack::result, starts_with(), strequal(), string, tolower_ascii(), pugi::xml_node::value(), variable, pugi::xml_node::xml_node(), pugi::xpath_type_boolean, pugi::xpath_type_node_set, pugi::xpath_type_number, and pugi::xpath_type_string.
Referenced by apply_predicate_boolean(), compare_eq(), and eval_boolean().
|
inline |
Definition at line 10734 of file pugixml.cpp.
References xpath_node_set_raw::append(), ast_filter, ast_func_id, ast_op_union, ast_step, ast_step_root, ast_variable, axis_ancestor, axis_ancestor_or_self, axis_attribute, axis_child, axis_descendant, axis_descendant_or_self, axis_following, axis_following_sibling, axis_namespace, axis_parent, axis_preceding, axis_preceding_sibling, axis_self, xpath_node_set_raw::begin(), xpath_node_set_raw::end(), eval_node_set(), xpath_context::n, nodeset_eval_all, nodeset_eval_first, predicate_constant_one, predicate_posinv, xpath_node_set_raw::push_back(), xpath_node_set_raw::remove_duplicates(), xpath_stack::result, xpath_node_set_raw::set_type(), xpath_node_set_raw::sort_do(), xpath_stack::temp, pugi::xml_node::type(), pugi::xpath_node_set::type_sorted, pugi::xpath_node_set::type_unsorted, and pugi::xpath_type_node_set.
Referenced by compare_eq(), compare_rel(), eval_node_set(), eval_number(), eval_string(), and step_do().
|
inline |
Definition at line 10316 of file pugixml.cpp.
References ast_func_ceiling, ast_func_count, ast_func_floor, ast_func_last, ast_func_number_0, ast_func_number_1, ast_func_position, ast_func_round, ast_func_string_length_0, ast_func_string_length_1, ast_func_sum, ast_number_constant, ast_op_add, ast_op_divide, ast_op_mod, ast_op_multiply, ast_op_negate, ast_op_subtract, ast_variable, xpath_node_set_raw::begin(), xpath_string::c_str(), convert_string_to_number(), xpath_node_set_raw::end(), eval_node_set(), eval_number(), eval_string(), xpath_string::length(), xpath_context::n, nodeset_eval_all, xpath_context::position, xpath_stack::result, round_nearest_nzero(), xpath_node_set_raw::size(), xpath_context::size, string_value(), pugi::xpath_type_boolean, pugi::xpath_type_node_set, pugi::xpath_type_number, and pugi::xpath_type_string.
Referenced by apply_predicate_number(), apply_predicate_number_const(), compare_eq(), compare_rel(), eval_number(), and eval_string().
|
inlinestaticprivate |
Definition at line 9503 of file pugixml.cpp.
References nodeset_eval_all, nodeset_eval_any, and pugi::xpath_node_set::type_sorted.
|
inline |
Definition at line 10494 of file pugixml.cpp.
References _next, ast_func_concat, ast_func_local_name_0, ast_func_local_name_1, ast_func_name_0, ast_func_name_1, ast_func_namespace_uri_0, ast_func_namespace_uri_1, ast_func_normalize_space_0, ast_func_normalize_space_1, ast_func_string_0, ast_func_string_1, ast_func_substring_2, ast_func_substring_3, ast_func_substring_after, ast_func_substring_before, ast_func_translate, ast_opt_translate_table, ast_string_constant, ast_variable, pugi::xml_node::begin(), xpath_string::c_str(), convert_number_to_string(), xpath_string::data(), xpath_node_set_raw::empty(), pugi::xml_node::end(), eval_node_set(), eval_number(), eval_string(), find_substring(), xpath_node_set_raw::first(), xpath_string::from_const(), xpath_string::from_heap(), xpath_string::from_heap_preallocated(), is_nan(), xpath_string::length(), local_name(), xpath_context::n, namespace_uri(), nodeset_eval_first, normalize_space(), PUGIXML_TEXT, qualified_name(), xpath_stack::result, round_nearest(), string_value(), xpath_stack::temp, translate(), translate_table(), xpath_string::uses_heap(), pugi::xpath_type_boolean, pugi::xpath_type_node_set, pugi::xpath_type_number, and pugi::xpath_type_string.
Referenced by compare_eq(), eval_boolean(), eval_number(), eval_string(), and eval_string_concat().
|
inline |
Definition at line 10452 of file pugixml.cpp.
References _next, xpath_allocator::allocate(), ast_func_concat, eval_string(), xpath_string::from_heap_preallocated(), xpath_stack::result, and xpath_stack::temp.
|
inline |
Definition at line 10935 of file pugixml.cpp.
References _next, ast_filter, ast_func_last, ast_func_position, ast_number_constant, ast_predicate, ast_step, ast_step_root, ast_string_constant, ast_variable, and is_posinv_expr().
Referenced by is_posinv_expr(), and optimize_self().
|
inline |
Definition at line 10966 of file pugixml.cpp.
References _next, ast_predicate, ast_step, and predicate_posinv.
|
private |
|
inline |
Definition at line 10861 of file pugixml.cpp.
References optimize().
Referenced by optimize().
|
inline |
Definition at line 10875 of file pugixml.cpp.
References _axis, _data, _left, _next, _rettype, _right, _test, _type, ast_filter, ast_func_last, ast_func_position, ast_func_translate, ast_number_constant, ast_op_equal, ast_opt_compare_attribute, ast_opt_translate_table, ast_predicate, ast_step, ast_string_constant, ast_variable, axis_attribute, axis_child, axis_descendant, axis_descendant_or_self, axis_self, is_posinv_expr(), nodetest_name, nodetest_type_node, number, predicate_constant, predicate_constant_one, predicate_default, predicate_posinv, string, translate_table_generate(), pugi::xpath_type_number, and pugi::xpath_type_string.
|
inline |
Definition at line 10981 of file pugixml.cpp.
Referenced by apply_predicate(), apply_predicate_boolean(), apply_predicate_number(), apply_predicate_number_const(), compare_eq(), compare_rel(), evaluate_node_set_prepare(), xpath_parser::parse_expression_rec(), xpath_parser::parse_filter_expression(), and xpath_parser::parse_path_or_unary_expression().
|
inline |
Definition at line 10169 of file pugixml.cpp.
References pugi::xml_node::value().
Referenced by xpath_parser::parse_primary_expression(), and xpath_parser::parse_step().
|
inline |
Definition at line 10174 of file pugixml.cpp.
References pugi::xml_node::value().
Referenced by xpath_parser::parse_step().
|
inlineprivate |
Definition at line 10083 of file pugixml.cpp.
References _next, _test, axis_ancestor, axis_ancestor_or_self, axis_attribute, axis_child, axis_preceding, axis_preceding_sibling, axis_self, xpath_node_set_raw::begin(), xpath_node_set_raw::end(), eval_node_set(), xpath_context::n, nodeset_eval_all, nodetest_name, predicate_constant_one, xpath_node_set_raw::remove_duplicates(), xpath_stack::result, xpath_node_set_raw::set_type(), xpath_node_set_raw::size(), xpath_node_set_raw::type(), pugi::xpath_node_set::type_sorted, pugi::xpath_node_set::type_sorted_reverse, and pugi::xpath_node_set::type_unsorted.
|
inlineprivate |
Definition at line 9798 of file pugixml.cpp.
References axis_ancestor, axis_ancestor_or_self, axis_attribute, axis_child, axis_descendant, axis_descendant_or_self, axis_following, axis_following_sibling, axis_parent, axis_preceding, axis_preceding_sibling, axis_self, and node_is_ancestor().
|
inlineprivate |
Definition at line 9991 of file pugixml.cpp.
References axis_ancestor, axis_ancestor_or_self, axis_descendant_or_self, axis_following, axis_parent, axis_preceding, axis_self, and nodetest_type_node.
|
inlineprivate |
Definition at line 10072 of file pugixml.cpp.
References axis_ancestor, axis_ancestor_or_self, axis_descendant_or_self, axis_following, axis_parent, axis_preceding, and axis_self.
|
inlineprivate |
Definition at line 9683 of file pugixml.cpp.
References is_xpath_attribute(), pugi::xml_node::name(), nodetest_all, nodetest_all_in_namespace, nodetest_name, nodetest_type_node, PUGIXML_TEXT, xpath_node_set_raw::push_back(), starts_with(), strequal(), and pugi::xml_node::xml_node().
|
inlineprivate |
Definition at line 9723 of file pugixml.cpp.
References pugi::node_cdata, pugi::node_comment, pugi::node_element, pugi::node_pcdata, pugi::node_pi, nodetest_all, nodetest_all_in_namespace, nodetest_name, nodetest_pi, nodetest_type_comment, nodetest_type_node, nodetest_type_pi, nodetest_type_text, PUGI__NODETYPE, xpath_node_set_raw::push_back(), starts_with(), strequal(), pugi::xml_node::type(), and pugi::xml_node::xml_node().
|
private |
Definition at line 9388 of file pugixml.cpp.
Referenced by optimize_self().
union { ... } xpath_ast_node::_data |
Referenced by eval_boolean(), and optimize_self().
|
private |
Definition at line 9394 of file pugixml.cpp.
Referenced by optimize_self().
|
private |
Definition at line 9396 of file pugixml.cpp.
Referenced by apply_predicates(), eval_string(), eval_string_concat(), is_posinv_expr(), is_posinv_step(), optimize_self(), and step_do().
|
private |
Definition at line 9385 of file pugixml.cpp.
Referenced by optimize_self().
|
private |
Definition at line 9395 of file pugixml.cpp.
Referenced by optimize_self().
|
private |
Definition at line 9391 of file pugixml.cpp.
Referenced by optimize_self(), and step_do().
|
private |
Definition at line 9384 of file pugixml.cpp.
Referenced by eval_boolean(), and optimize_self().
const char_t* xpath_ast_node::nodetest |
Definition at line 9407 of file pugixml.cpp.
Referenced by eval_boolean().
double xpath_ast_node::number |
Definition at line 9403 of file pugixml.cpp.
Referenced by optimize_self().
const char_t* xpath_ast_node::string |
Definition at line 9401 of file pugixml.cpp.
Referenced by eval_boolean(), and optimize_self().
const unsigned char* xpath_ast_node::table |
Definition at line 9409 of file pugixml.cpp.
xpath_variable* xpath_ast_node::variable |
Definition at line 9405 of file pugixml.cpp.
Referenced by eval_boolean().