CARLA
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
xpath_ast_node Class Reference
+ Collaboration diagram for xpath_ast_node:

Public Member Functions

bool eval_boolean (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)
 
double eval_number (const xpath_context &c, const xpath_stack &stack)
 
xpath_string eval_string (const xpath_context &c, const xpath_stack &stack)
 
xpath_string eval_string_concat (const xpath_context &c, const xpath_stack &stack)
 
bool is_posinv_expr () const
 
bool is_posinv_step () const
 
void optimize (xpath_allocator *alloc)
 
void optimize_self (xpath_allocator *alloc)
 
xpath_value_type rettype () const
 
void set_next (xpath_ast_node *value)
 
void set_right (xpath_ast_node *value)
 
 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)
 

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_nodeoperator= (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
 

Detailed Description

Definition at line 9380 of file pugixml.cpp.

Constructor & Destructor Documentation

◆ xpath_ast_node() [1/7]

xpath_ast_node::xpath_ast_node ( const xpath_ast_node )
private

◆ xpath_ast_node() [2/7]

xpath_ast_node::xpath_ast_node ( ast_type_t  type,
xpath_value_type  rettype_,
const char_t *  value 
)
inline

Definition at line 10130 of file pugixml.cpp.

References ast_string_constant, and pugi::xml_node::value().

+ Here is the call graph for this function:

◆ xpath_ast_node() [3/7]

xpath_ast_node::xpath_ast_node ( ast_type_t  type,
xpath_value_type  rettype_,
double  value 
)
inline

Definition at line 10137 of file pugixml.cpp.

References ast_number_constant, and pugi::xml_node::value().

+ Here is the call graph for this function:

◆ xpath_ast_node() [4/7]

xpath_ast_node::xpath_ast_node ( ast_type_t  type,
xpath_value_type  rettype_,
xpath_variable value 
)
inline

Definition at line 10144 of file pugixml.cpp.

References ast_variable, and pugi::xml_node::value().

+ Here is the call graph for this function:

◆ xpath_ast_node() [5/7]

xpath_ast_node::xpath_ast_node ( ast_type_t  type,
xpath_value_type  rettype_,
xpath_ast_node left = 0,
xpath_ast_node right = 0 
)
inline

Definition at line 10151 of file pugixml.cpp.

◆ xpath_ast_node() [6/7]

xpath_ast_node::xpath_ast_node ( ast_type_t  type,
xpath_ast_node left,
axis_t  axis,
nodetest_t  test,
const char_t *  contents 
)
inline

Definition at line 10156 of file pugixml.cpp.

References ast_step.

◆ xpath_ast_node() [7/7]

xpath_ast_node::xpath_ast_node ( ast_type_t  type,
xpath_ast_node left,
xpath_ast_node right,
predicate_t  test 
)
inline

Definition at line 10163 of file pugixml.cpp.

References ast_filter, and ast_predicate.

Member Function Documentation

◆ apply_predicate()

void xpath_ast_node::apply_predicate ( xpath_node_set_raw ns,
size_t  first,
const xpath_stack stack,
bool  once 
)
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.

+ Here is the call graph for this function:

◆ apply_predicate_boolean()

static void xpath_ast_node::apply_predicate_boolean ( xpath_node_set_raw ns,
size_t  first,
xpath_ast_node expr,
const xpath_stack stack,
bool  once 
)
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.

+ Here is the call graph for this function:

◆ apply_predicate_number()

static void xpath_ast_node::apply_predicate_number ( xpath_node_set_raw ns,
size_t  first,
xpath_ast_node expr,
const xpath_stack stack,
bool  once 
)
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.

+ Here is the call graph for this function:

◆ apply_predicate_number_const()

static void xpath_ast_node::apply_predicate_number_const ( xpath_node_set_raw ns,
size_t  first,
xpath_ast_node expr,
const xpath_stack stack 
)
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.

+ Here is the call graph for this function:

◆ apply_predicates()

void xpath_ast_node::apply_predicates ( xpath_node_set_raw ns,
size_t  first,
const xpath_stack stack,
nodeset_eval_t  eval 
)
inlineprivate

Definition at line 9673 of file pugixml.cpp.

References _next, xpath_node_set_raw::size(), and xpath_node_set_raw::type().

+ Here is the call graph for this function:

◆ compare_eq()

template<class Comp >
static bool xpath_ast_node::compare_eq ( xpath_ast_node lhs,
xpath_ast_node rhs,
const xpath_context c,
const xpath_stack stack,
const Comp &  comp 
)
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.

+ Here is the call graph for this function:

◆ compare_rel()

template<class Comp >
static bool xpath_ast_node::compare_rel ( xpath_ast_node lhs,
xpath_ast_node rhs,
const xpath_context c,
const xpath_stack stack,
const Comp &  comp 
)
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.

+ Here is the call graph for this function:

◆ eval_boolean()

bool xpath_ast_node::eval_boolean ( const xpath_context c,
const xpath_stack stack 
)
inline

◆ eval_node_set()

xpath_node_set_raw xpath_ast_node::eval_node_set ( const xpath_context c,
const xpath_stack stack,
nodeset_eval_t  eval 
)
inline

◆ eval_number()

double xpath_ast_node::eval_number ( const xpath_context c,
const xpath_stack stack 
)
inline

◆ eval_once()

static bool xpath_ast_node::eval_once ( xpath_node_set::type_t  type,
nodeset_eval_t  eval 
)
inlinestaticprivate

◆ eval_string()

xpath_string xpath_ast_node::eval_string ( const xpath_context c,
const xpath_stack stack 
)
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eval_string_concat()

xpath_string xpath_ast_node::eval_string_concat ( const xpath_context c,
const xpath_stack stack 
)
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.

+ Here is the call graph for this function:

◆ is_posinv_expr()

bool xpath_ast_node::is_posinv_expr ( ) const
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_posinv_step()

bool xpath_ast_node::is_posinv_step ( ) const
inline

Definition at line 10966 of file pugixml.cpp.

References _next, ast_predicate, ast_step, and predicate_posinv.

◆ operator=()

xpath_ast_node& xpath_ast_node::operator= ( const xpath_ast_node )
private

◆ optimize()

void xpath_ast_node::optimize ( xpath_allocator alloc)
inline

Definition at line 10861 of file pugixml.cpp.

References optimize().

Referenced by optimize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ optimize_self()

void xpath_ast_node::optimize_self ( xpath_allocator alloc)
inline

◆ rettype()

xpath_value_type xpath_ast_node::rettype ( ) const
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().

+ Here is the caller graph for this function:

◆ set_next()

void xpath_ast_node::set_next ( xpath_ast_node value)
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_right()

void xpath_ast_node::set_right ( xpath_ast_node value)
inline

Definition at line 10174 of file pugixml.cpp.

References pugi::xml_node::value().

Referenced by xpath_parser::parse_step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ step_do()

template<class T >
xpath_node_set_raw xpath_ast_node::step_do ( const xpath_context c,
const xpath_stack stack,
nodeset_eval_t  eval,
v 
)
inlineprivate

◆ step_fill() [1/3]

template<class T >
void xpath_ast_node::step_fill ( xpath_node_set_raw ns,
xml_node_struct n,
xpath_allocator alloc,
bool  once,
 
)
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().

+ Here is the call graph for this function:

◆ step_fill() [2/3]

template<class T >
void xpath_ast_node::step_fill ( xpath_node_set_raw ns,
xml_attribute_struct *  a,
xml_node_struct p,
xpath_allocator alloc,
bool  once,
v 
)
inlineprivate

◆ step_fill() [3/3]

template<class T >
void xpath_ast_node::step_fill ( xpath_node_set_raw ns,
const xpath_node &  xn,
xpath_allocator alloc,
bool  once,
v 
)
inlineprivate

◆ step_push() [1/2]

bool xpath_ast_node::step_push ( xpath_node_set_raw ns,
xml_attribute_struct *  a,
xml_node_struct parent,
xpath_allocator alloc 
)
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().

+ Here is the call graph for this function:

◆ step_push() [2/2]

bool xpath_ast_node::step_push ( xpath_node_set_raw ns,
xml_node_struct n,
xpath_allocator alloc 
)
inlineprivate

Member Data Documentation

◆ _axis

char xpath_ast_node::_axis
private

Definition at line 9388 of file pugixml.cpp.

Referenced by optimize_self().

◆ _data

union { ... } xpath_ast_node::_data

Referenced by eval_boolean(), and optimize_self().

◆ _left

xpath_ast_node* xpath_ast_node::_left
private

Definition at line 9394 of file pugixml.cpp.

Referenced by optimize_self().

◆ _next

xpath_ast_node* xpath_ast_node::_next
private

◆ _rettype

char xpath_ast_node::_rettype
private

Definition at line 9385 of file pugixml.cpp.

Referenced by optimize_self().

◆ _right

xpath_ast_node* xpath_ast_node::_right
private

Definition at line 9395 of file pugixml.cpp.

Referenced by optimize_self().

◆ _test

char xpath_ast_node::_test
private

Definition at line 9391 of file pugixml.cpp.

Referenced by optimize_self(), and step_do().

◆ _type

char xpath_ast_node::_type
private

Definition at line 9384 of file pugixml.cpp.

Referenced by eval_boolean(), and optimize_self().

◆ nodetest

const char_t* xpath_ast_node::nodetest

Definition at line 9407 of file pugixml.cpp.

Referenced by eval_boolean().

◆ number

double xpath_ast_node::number

Definition at line 9403 of file pugixml.cpp.

Referenced by optimize_self().

◆ string

const char_t* xpath_ast_node::string

Definition at line 9401 of file pugixml.cpp.

Referenced by eval_boolean(), and optimize_self().

◆ table

const unsigned char* xpath_ast_node::table

Definition at line 9409 of file pugixml.cpp.

◆ variable

xpath_variable* xpath_ast_node::variable

Definition at line 9405 of file pugixml.cpp.

Referenced by eval_boolean().


The documentation for this class was generated from the following file: