ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
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:
Collaboration graph
[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)
 
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)
 
bool is_posinv ()
 
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, xpath_ast_node *expr, const xpath_stack &stack)
 
void apply_predicates (xpath_node_set_raw &ns, size_t first, const xpath_stack &stack)
 
void step_push (xpath_node_set_raw &ns, const xml_attribute &a, const xml_node &parent, xpath_allocator *alloc)
 
void step_push (xpath_node_set_raw &ns, const xml_node &n, xpath_allocator *alloc)
 
template<class T >
void step_fill (xpath_node_set_raw &ns, const xml_node &n, xpath_allocator *alloc, T)
 
template<class T >
void step_fill (xpath_node_set_raw &ns, const xml_attribute &a, const xml_node &p, xpath_allocator *alloc, T v)
 
template<class T >
xpath_node_set_raw step_do (const xpath_context &c, const xpath_stack &stack, 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)
 
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)
 

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
 
_data
 

Detailed Description

Definition at line 8275 of file pugixml.cpp.

Constructor & Destructor Documentation

◆ xpath_ast_node() [1/6]

xpath_ast_node::xpath_ast_node ( const xpath_ast_node )
private

◆ xpath_ast_node() [2/6]

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

Definition at line 8909 of file pugixml.cpp.

References _data, ast_string_constant, and get_metrics::type.

◆ xpath_ast_node() [3/6]

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

Definition at line 8922 of file pugixml.cpp.

References _data, ast_number_constant, and get_metrics::type.

◆ xpath_ast_node() [4/6]

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

Definition at line 8935 of file pugixml.cpp.

References _data, ast_variable, and get_metrics::type.

◆ xpath_ast_node() [5/6]

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

◆ xpath_ast_node() [6/6]

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

References _data.

Member Function Documentation

◆ apply_predicate()

void xpath_ast_node::apply_predicate ( xpath_node_set_raw ns,
size_t  first,
xpath_ast_node expr,
const xpath_stack stack 
)
inlineprivate

Definition at line 8468 of file pugixml.cpp.

References xpath_node_set_raw::begin(), c, xpath_node_set_raw::end(), eval_boolean(), eval_number(), rettype(), xpath_node_set_raw::size(), xpath_node_set_raw::truncate(), and pugi::xpath_type_number.

Referenced by apply_predicates(), and eval_node_set().

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

◆ apply_predicates()

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

Definition at line 8494 of file pugixml.cpp.

References _next, _right, apply_predicate(), and xpath_node_set_raw::size().

Referenced by step_do().

Here is the call graph for this function:
Here is the caller 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

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

References xpath_node_set_raw::begin(), c, xpath_string::c_str(), convert_string_to_number(), xpath_node_set_raw::end(), eval_node_set(), eval_number(), xpath_stack::result, rettype(), string_value(), and pugi::xpath_type_node_set.

Referenced by eval_boolean().

Here is the call graph for this function:
Here is the caller 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 
)
inline

◆ eval_number()

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

◆ 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

Definition at line 9242 of file pugixml.cpp.

References _left, _next, _right, _type, xpath_allocator::allocate(), ast_func_concat, c, eval_string(), length(), xpath_stack::result, and xpath_stack::temp.

Referenced by eval_string().

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

◆ is_posinv()

bool xpath_ast_node::is_posinv ( )
inline

Definition at line 9650 of file pugixml.cpp.

References _left, _next, _right, _type, ast_filter, ast_filter_posinv, ast_func_position, ast_number_constant, ast_predicate, ast_step, ast_step_root, ast_string_constant, ast_variable, and is_posinv().

Referenced by is_posinv(), and xpath_parser::parse_filter_expression().

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

◆ operator=()

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

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

References _next.

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

Here is the caller graph for this function:

◆ set_right()

void xpath_ast_node::set_right ( xpath_ast_node value)
inline

Definition at line 8973 of file pugixml.cpp.

References _right.

Referenced by xpath_parser::parse_step().

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,
v 
)
inlineprivate

◆ step_fill() [1/2]

template<class T >
void xpath_ast_node::step_fill ( xpath_node_set_raw ns,
const xml_attribute &  a,
const xml_node &  p,
xpath_allocator alloc,
v 
)
inlineprivate

Definition at line 8769 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(), step_push(), and v.

Here is the call graph for this function:

◆ step_fill() [2/2]

template<class T >
void xpath_ast_node::step_fill ( xpath_node_set_raw ns,
const xml_node &  n,
xpath_allocator alloc,
 
)
inlineprivate

Definition at line 8590 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, c, node_is_ancestor(), and step_push().

Referenced by step_do(), and step_fill().

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

◆ step_push() [1/2]

void xpath_ast_node::step_push ( xpath_node_set_raw ns,
const xml_attribute &  a,
const xml_node &  parent,
xpath_allocator alloc 
)
inlineprivate

Definition at line 8505 of file pugixml.cpp.

References _data, _test, 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().

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

◆ step_push() [2/2]

void xpath_ast_node::step_push ( xpath_node_set_raw ns,
const xml_node &  n,
xpath_allocator alloc 
)
inlineprivate

Member Data Documentation

◆ _axis

char xpath_ast_node::_axis
private

Definition at line 8283 of file pugixml.cpp.

Referenced by eval_node_set().

◆ 

union { ... } xpath_ast_node::_data

◆ _left

xpath_ast_node* xpath_ast_node::_left
private

◆ _next

xpath_ast_node* xpath_ast_node::_next
private

Definition at line 8289 of file pugixml.cpp.

Referenced by apply_predicates(), eval_string(), eval_string_concat(), is_posinv(), and set_next().

◆ _rettype

char xpath_ast_node::_rettype
private

Definition at line 8280 of file pugixml.cpp.

Referenced by eval_boolean(), eval_node_set(), eval_number(), eval_string(), and rettype().

◆ _right

xpath_ast_node* xpath_ast_node::_right
private

◆ _test

char xpath_ast_node::_test
private

Definition at line 8284 of file pugixml.cpp.

Referenced by step_fill(), and step_push().

◆ _type

char xpath_ast_node::_type
private

◆ nodetest

const char_t* xpath_ast_node::nodetest

Definition at line 8299 of file pugixml.cpp.

◆ number

double xpath_ast_node::number

Definition at line 8295 of file pugixml.cpp.

◆ string

const char_t* xpath_ast_node::string

Definition at line 8293 of file pugixml.cpp.

◆ variable

xpath_variable* xpath_ast_node::variable

Definition at line 8297 of file pugixml.cpp.


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