μHAL (v2.7.9)
Part of the IPbus software repository
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:
[legend]

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

Detailed Description

Definition at line 9449 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 10200 of file pugixml.cpp.

References _data, and ast_string_constant.

◆ 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 10207 of file pugixml.cpp.

References _data, and ast_number_constant.

◆ 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 10214 of file pugixml.cpp.

References _data, and ast_variable.

◆ 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 10221 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 10226 of file pugixml.cpp.

References _data, and 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 10233 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

◆ 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

◆ 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

◆ 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

◆ 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 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().

◆ 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

◆ 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

◆ 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

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().

◆ eval_string()

xpath_string xpath_ast_node::eval_string ( const xpath_context c,
const xpath_stack stack 
)
inline

◆ eval_string_concat()

xpath_string xpath_ast_node::eval_string_concat ( const xpath_context c,
const xpath_stack stack 
)
inline

◆ is_posinv_expr()

bool xpath_ast_node::is_posinv_expr ( ) const
inline

◆ is_posinv_step()

bool xpath_ast_node::is_posinv_step ( ) const
inline

Definition at line 11042 of file pugixml.cpp.

References _next, _right, _type, ast_predicate, ast_step, and predicate_posinv.

Referenced by optimize_self().

◆ 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 10931 of file pugixml.cpp.

References _left, _next, _right, optimize(), and optimize_self().

Referenced by optimize().

◆ optimize_self()

void xpath_ast_node::optimize_self ( xpath_allocator alloc)
inline

◆ rettype()

xpath_value_type xpath_ast_node::rettype ( ) const
inline

◆ set_next()

void xpath_ast_node::set_next ( xpath_ast_node value)
inline

Definition at line 10239 of file pugixml.cpp.

References _next.

Referenced by xpath_parser::parse_primary_expression(), and xpath_parser::parse_step().

◆ set_right()

void xpath_ast_node::set_right ( xpath_ast_node value)
inline

Definition at line 10244 of file pugixml.cpp.

References _right.

Referenced by xpath_parser::parse_step().

◆ 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,
const xpath_node &  xn,
xpath_allocator alloc,
bool  once,
v 
)
inlineprivate

◆ 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,
xml_node_struct *  n,
xpath_allocator alloc,
bool  once,
 
)
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

◆ 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 9457 of file pugixml.cpp.

Referenced by eval_node_set(), and optimize_self().

◆ _data

union { ... } xpath_ast_node::_data

◆ _left

xpath_ast_node* xpath_ast_node::_left
private

◆ _next

xpath_ast_node* xpath_ast_node::_next
private

◆ _rettype

char xpath_ast_node::_rettype
private

◆ _right

xpath_ast_node* xpath_ast_node::_right
private

◆ _test

char xpath_ast_node::_test
private

◆ _type

char xpath_ast_node::_type
private

◆ nodetest

const char_t* xpath_ast_node::nodetest

Definition at line 9476 of file pugixml.cpp.

Referenced by eval_boolean().

◆ number

double xpath_ast_node::number

Definition at line 9472 of file pugixml.cpp.

Referenced by optimize_self().

◆ string

const char_t* xpath_ast_node::string

Definition at line 9470 of file pugixml.cpp.

Referenced by eval_boolean(), and optimize_self().

◆ table

const unsigned char* xpath_ast_node::table

Definition at line 9478 of file pugixml.cpp.

Referenced by optimize_self().

◆ variable

xpath_variable* xpath_ast_node::variable

Definition at line 9474 of file pugixml.cpp.

Referenced by eval_boolean().


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