Public Member Functions | |
xpath_ast_node (ast_type_t type, xpath_value_type rettype_, const char_t *value) | |
xpath_ast_node (ast_type_t type, xpath_value_type rettype_, double value) | |
xpath_ast_node (ast_type_t type, xpath_value_type rettype_, xpath_variable *value) | |
xpath_ast_node (ast_type_t type, xpath_value_type rettype_, xpath_ast_node *left=0, xpath_ast_node *right=0) | |
xpath_ast_node (ast_type_t type, xpath_ast_node *left, axis_t axis, nodetest_t test, const char_t *contents) | |
xpath_ast_node (ast_type_t type, xpath_ast_node *left, xpath_ast_node *right, predicate_t test) | |
void | set_next (xpath_ast_node *value) |
void | set_right (xpath_ast_node *value) |
bool | eval_boolean (const xpath_context &c, const xpath_stack &stack) |
double | eval_number (const xpath_context &c, const xpath_stack &stack) |
xpath_string | eval_string_concat (const xpath_context &c, const xpath_stack &stack) |
xpath_string | eval_string (const xpath_context &c, const xpath_stack &stack) |
xpath_node_set_raw | eval_node_set (const xpath_context &c, const xpath_stack &stack, nodeset_eval_t eval) |
void | optimize (xpath_allocator *alloc) |
void | optimize_self (xpath_allocator *alloc) |
bool | is_posinv_expr () const |
bool | is_posinv_step () const |
xpath_value_type | rettype () const |
Private Member Functions | |
xpath_ast_node (const xpath_ast_node &) | |
xpath_ast_node & | operator= (const xpath_ast_node &) |
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) |
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) |
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) |
template<class T > | |
xpath_node_set_raw | step_do (const xpath_context &c, const xpath_stack &stack, nodeset_eval_t eval, T v) |
Static Private Member Functions | |
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) |
static bool | eval_once (xpath_node_set::type_t type, nodeset_eval_t eval) |
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 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) |
Private Attributes | |
char | _type |
char | _rettype |
char | _axis |
char | _test |
xpath_ast_node * | _left |
xpath_ast_node * | _right |
xpath_ast_node * | _next |
union { | |
const char_t * string | |
double number | |
xpath_variable * variable | |
const char_t * nodetest | |
const unsigned char * table | |
} | _data |
Definition at line 9449 of file pugixml.cpp.
|
private |
|
inline |
Definition at line 10200 of file pugixml.cpp.
References _data, and ast_string_constant.
|
inline |
Definition at line 10207 of file pugixml.cpp.
References _data, and ast_number_constant.
|
inline |
Definition at line 10214 of file pugixml.cpp.
References _data, and ast_variable.
|
inline |
Definition at line 10221 of file pugixml.cpp.
|
inline |
Definition at line 10226 of file pugixml.cpp.
|
inline |
Definition at line 10233 of file pugixml.cpp.
References ast_filter, and ast_predicate.
|
inlineprivate |
Definition at line 9728 of file pugixml.cpp.
References _right, _test, _type, apply_predicate_boolean(), apply_predicate_number(), apply_predicate_number_const(), ast_filter, ast_predicate, predicate_constant, predicate_constant_one, rettype(), xpath_node_set_raw::size(), and pugi::xpath_type_number.
Referenced by eval_node_set().
|
inlinestaticprivate |
Definition at line 9648 of file pugixml.cpp.
References xpath_node_set_raw::begin(), uhal::tests::c, xpath_node_set_raw::end(), eval_boolean(), rettype(), xpath_node_set_raw::size(), xpath_node_set_raw::truncate(), and pugi::xpath_type_number.
Referenced by apply_predicate().
|
inlinestaticprivate |
Definition at line 9674 of file pugixml.cpp.
References xpath_node_set_raw::begin(), uhal::tests::c, xpath_node_set_raw::end(), eval_number(), rettype(), xpath_node_set_raw::size(), xpath_node_set_raw::truncate(), and pugi::xpath_type_number.
Referenced by apply_predicate().
|
inlinestaticprivate |
Definition at line 9700 of file pugixml.cpp.
References xpath_node_set_raw::begin(), uhal::tests::c, eval_number(), rettype(), xpath_node_set_raw::size(), xpath_node_set_raw::truncate(), and pugi::xpath_type_number.
Referenced by apply_predicate().
|
inlineprivate |
Definition at line 9742 of file pugixml.cpp.
References _next, _right, eval_once(), xpath_node_set_raw::size(), and xpath_node_set_raw::type().
Referenced by step_do().
|
inlinestaticprivate |
Definition at line 9484 of file pugixml.cpp.
References xpath_node_set_raw::begin(), uhal::tests::c, 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.
Referenced by eval_boolean().
|
inlinestaticprivate |
Definition at line 9577 of file pugixml.cpp.
References xpath_node_set_raw::begin(), uhal::tests::c, 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.
Referenced by eval_boolean().
|
inline |
Definition at line 10249 of file pugixml.cpp.
References _data, _left, _rettype, _right, _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, uhal::tests::c, xpath_string::c_str(), compare_eq(), compare_rel(), convert_number_to_boolean(), xpath_string::empty(), xpath_node_set_raw::empty(), eval_boolean(), eval_node_set(), eval_number(), eval_string(), find_substring(), is_xpath_attribute(), nodeset_eval_any, nodetest, PUGIXML_TEXT, xpath_stack::result, starts_with(), strequal(), string, tolower_ascii(), variable, 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(), eval_boolean(), eval_number(), and eval_string().
|
inline |
Definition at line 10804 of file pugixml.cpp.
References _axis, _data, _left, _rettype, _right, _test, _type, xpath_node_set_raw::append(), apply_predicate(), 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(), uhal::tests::c, xpath_node_set_raw::end(), eval_node_set(), eval_once(), 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(), step_do(), xpath_stack::temp, xpath_node_set_raw::type(), and pugi::xpath_type_node_set.
Referenced by compare_eq(), compare_rel(), eval_boolean(), eval_node_set(), eval_number(), eval_string(), and step_do().
|
inline |
Definition at line 10386 of file pugixml.cpp.
References _data, _left, _rettype, _right, _type, 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(), uhal::tests::c, xpath_string::c_str(), convert_string_to_number(), xpath_node_set_raw::end(), eval_boolean(), eval_node_set(), eval_number(), eval_string(), xpath_string::length(), nodeset_eval_all, xpath_stack::result, round_nearest_nzero(), xpath_node_set_raw::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_boolean(), eval_number(), and eval_string().
|
inlinestaticprivate |
Definition at line 9572 of file pugixml.cpp.
References nodeset_eval_all, and nodeset_eval_any.
Referenced by apply_predicates(), eval_node_set(), and step_do().
|
inline |
Definition at line 10564 of file pugixml.cpp.
References _data, _left, _next, _rettype, _right, _type, 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, uhal::tests::c, xpath_string::c_str(), convert_number_to_string(), xpath_string::data(), xpath_node_set_raw::empty(), eval_boolean(), eval_node_set(), eval_number(), eval_string(), eval_string_concat(), 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(), 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 10522 of file pugixml.cpp.
References _left, _next, _right, _type, xpath_allocator::allocate(), ast_func_concat, uhal::tests::c, eval_string(), xpath_string::from_heap_preallocated(), uhal::tests::j, xpath_stack::result, and xpath_stack::temp.
Referenced by eval_string().
|
inline |
Definition at line 11011 of file pugixml.cpp.
References _left, _next, _right, _type, 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 11042 of file pugixml.cpp.
References _next, _right, _type, ast_predicate, ast_step, and predicate_posinv.
Referenced by optimize_self().
|
private |
|
inline |
Definition at line 10931 of file pugixml.cpp.
References _left, _next, _right, optimize(), and optimize_self().
Referenced by optimize().
|
inline |
Definition at line 10946 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(), is_posinv_step(), nodetest_name, nodetest_type_node, number, predicate_constant, predicate_constant_one, predicate_default, predicate_posinv, string, table, translate_table_generate(), pugi::xpath_type_number, and pugi::xpath_type_string.
Referenced by optimize().
|
inline |
Definition at line 11057 of file pugixml.cpp.
References _rettype.
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(), xpath_parser::parse_path_or_unary_expression(), and xpath_parser::parse_step().
|
inline |
Definition at line 10239 of file pugixml.cpp.
References _next.
Referenced by xpath_parser::parse_primary_expression(), and xpath_parser::parse_step().
|
inline |
Definition at line 10244 of file pugixml.cpp.
References _right.
Referenced by xpath_parser::parse_step().
|
inlineprivate |
Definition at line 10152 of file pugixml.cpp.
References _left, _next, _right, _test, apply_predicates(), axis_ancestor, axis_ancestor_or_self, axis_attribute, axis_child, axis_preceding, axis_preceding_sibling, axis_self, xpath_node_set_raw::begin(), uhal::tests::c, xpath_node_set_raw::end(), eval_node_set(), eval_once(), 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(), step_fill(), xpath_stack::temp, and xpath_node_set_raw::type().
Referenced by eval_node_set().
|
inlineprivate |
Definition at line 10141 of file pugixml.cpp.
References axis_ancestor, axis_ancestor_or_self, axis_descendant_or_self, axis_following, axis_parent, axis_preceding, axis_self, and step_fill().
|
inlineprivate |
Definition at line 10060 of file pugixml.cpp.
References _test, axis_ancestor, axis_ancestor_or_self, axis_descendant_or_self, axis_following, axis_parent, axis_preceding, axis_self, nodetest_type_node, step_fill(), and step_push().
|
inlineprivate |
Definition at line 9867 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, uhal::tests::c, node_is_ancestor(), and step_push().
Referenced by step_do(), and step_fill().
|
inlineprivate |
Definition at line 9752 of file pugixml.cpp.
References _data, _test, is_xpath_attribute(), setupTemplate::name, nodetest_all, nodetest_all_in_namespace, nodetest_name, nodetest_type_node, PUGIXML_TEXT, xpath_node_set_raw::push_back(), starts_with(), and strequal().
Referenced by step_fill().
|
inlineprivate |
Definition at line 9792 of file pugixml.cpp.
References _data, _test, 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(), and strequal().
|
private |
Definition at line 9457 of file pugixml.cpp.
Referenced by eval_node_set(), and optimize_self().
union { ... } xpath_ast_node::_data |
Referenced by eval_boolean(), eval_node_set(), eval_number(), eval_string(), optimize_self(), step_push(), and xpath_ast_node().
|
private |
Definition at line 9463 of file pugixml.cpp.
Referenced by eval_boolean(), eval_node_set(), eval_number(), eval_string(), eval_string_concat(), is_posinv_expr(), optimize(), optimize_self(), and step_do().
|
private |
Definition at line 9465 of file pugixml.cpp.
Referenced by apply_predicates(), eval_string(), eval_string_concat(), is_posinv_expr(), is_posinv_step(), optimize(), optimize_self(), set_next(), and step_do().
|
private |
Definition at line 9454 of file pugixml.cpp.
Referenced by eval_boolean(), eval_node_set(), eval_number(), eval_string(), optimize_self(), and rettype().
|
private |
Definition at line 9464 of file pugixml.cpp.
Referenced by apply_predicate(), apply_predicates(), eval_boolean(), eval_node_set(), eval_number(), eval_string(), eval_string_concat(), is_posinv_expr(), is_posinv_step(), optimize(), optimize_self(), set_right(), and step_do().
|
private |
Definition at line 9460 of file pugixml.cpp.
Referenced by apply_predicate(), eval_node_set(), optimize_self(), step_do(), step_fill(), and step_push().
|
private |
Definition at line 9453 of file pugixml.cpp.
Referenced by apply_predicate(), eval_boolean(), eval_node_set(), eval_number(), eval_string(), eval_string_concat(), is_posinv_expr(), is_posinv_step(), and optimize_self().
const char_t* xpath_ast_node::nodetest |
Definition at line 9476 of file pugixml.cpp.
Referenced by eval_boolean().
double xpath_ast_node::number |
Definition at line 9472 of file pugixml.cpp.
Referenced by optimize_self().
const char_t* xpath_ast_node::string |
Definition at line 9470 of file pugixml.cpp.
Referenced by eval_boolean(), and optimize_self().
const unsigned char* xpath_ast_node::table |
Definition at line 9478 of file pugixml.cpp.
Referenced by optimize_self().
xpath_variable* xpath_ast_node::variable |
Definition at line 9474 of file pugixml.cpp.
Referenced by eval_boolean().