Public Member Functions | Protected Attributes

TinyXPath::node_set Class Reference

Node set class. A node set is an unordered collection of node. More...

#include <node_set.h>

List of all members.

Public Member Functions

Protected Attributes


Detailed Description

Node set class. A node set is an unordered collection of node.


Constructor & Destructor Documentation

TinyXPath::node_set::node_set (  )  [inline]

constructor : creates an empty set

References op_attrib, u_nb_node, and vpp_node_set.

TinyXPath::node_set::node_set ( const node_set ns2  ) 

copy constructor

Copy constructor.

TinyXPath::node_set::~node_set (  )  [inline]

destructor

References op_attrib, u_nb_node, and vpp_node_set.


Member Function Documentation

node_set & TinyXPath::node_set::operator= ( const node_set ns2  ) 

Assignation operator. Allows one to write expressions like ns_1 = ns_2;.

References op_attrib, u_nb_node, and vpp_node_set.

void TinyXPath::node_set::v_add_base_in_set ( const TiXmlBase XBp_member,
bool  o_attrib 
)

Adds a new node in the node set.

Parameters:
XBp_member Base to add (node or attribute)
o_attrib true if the base is an attribute, false if it's a node

References o_exist_in_set(), op_attrib, u_nb_node, and vpp_node_set.

Referenced by v_add_attrib_in_set(), v_add_attrib_in_set_if_name_or_star(), v_add_node_in_set(), and v_add_node_in_set_if_name_or_star().

Here is the call graph for this function:

Here is the caller graph for this function:

void TinyXPath::node_set::v_add_attrib_in_set ( const TiXmlAttribute XAp_attrib  )  [inline]

Adds an attribute in the node set.

References v_add_base_in_set().

Referenced by v_copy_selected_node_recursive().

Here is the call graph for this function:

Here is the caller graph for this function:

void TinyXPath::node_set::v_add_node_in_set ( const TiXmlNode XNp_node  )  [inline]

Adds a node in the node set.

References v_add_base_in_set().

Referenced by v_copy_node_children(), v_copy_selected_node_recursive(), and v_copy_selected_node_recursive_no_attrib().

Here is the call graph for this function:

Here is the caller graph for this function:

bool TinyXPath::node_set::o_exist_in_set ( const TiXmlBase XBp_member  ) 

Checks if a node exist in the node set.

Parameters:
XBp_member Check if a base exist in the node set

References u_nb_node, and vpp_node_set.

Referenced by v_add_base_in_set().

Here is the caller graph for this function:

void TinyXPath::node_set::v_add_all_foll_node ( const TiXmlNode XNp_node,
const TiXmlString S_name 
)

Populate the node set with all following nodes.
Exerpt :
the following axis contains all nodes in the same document as the context node that are after the context node in document order, excluding any descendants and excluding attribute nodes and namespace nodes

Parameters:
XNp_node base node
S_name lookup name (or "*")

References TiXmlNode::ELEMENT, v_add_node_in_set_if_name_or_star(), and v_copy_node_children().

Here is the call graph for this function:

void TinyXPath::node_set::v_add_all_prec_node ( const TiXmlNode XNp_node,
const TiXmlString S_name 
)

Populate the node set with all preceding nodes.
Exerpt :
the preceding axis contains all nodes in the same document as the context node that are before the context node in document order, excluding any ancestors and excluding attribute nodes and namespace nodes

Parameters:
XNp_node base node
S_name lookup name (or "*")

References TiXmlNode::ELEMENT, v_add_node_in_set_if_name_or_star(), and v_copy_node_children().

Here is the call graph for this function:

void TinyXPath::node_set::v_add_node_in_set_if_name_or_star ( const TiXmlNode XNp_node,
const TiXmlString S_name 
) [inline]

Add a new node, if the name is "*" or if the name is the same as the node.

References v_add_base_in_set().

Referenced by v_add_all_foll_node(), and v_add_all_prec_node().

Here is the call graph for this function:

Here is the caller graph for this function:

void TinyXPath::node_set::v_add_attrib_in_set_if_name_or_star ( const TiXmlAttribute XAp_attrib,
const TiXmlString S_name 
) [inline]

Add a new attrib, if the name is "*" or if the name is the same as the node.

References Name, and v_add_base_in_set().

Here is the call graph for this function:

unsigned TinyXPath::node_set::u_get_nb_node_in_set (  )  const [inline]

Get nb of nodes in the node set.

References u_nb_node.

Referenced by ReadXmlField(), and TinyXPath::xpath_processor::v_execute_step().

Here is the caller graph for this function:

const TiXmlBase* TinyXPath::node_set::XBp_get_base_in_set ( unsigned  u_which  )  [inline]

Get a node or an attribute.

References u_nb_node, and vpp_node_set.

Referenced by ReadXmlField().

Here is the caller graph for this function:

const TiXmlNode* TinyXPath::node_set::XNp_get_node_in_set ( unsigned  u_which  )  [inline]

Get a node.

References o_is_attrib(), u_nb_node, and vpp_node_set.

Referenced by ReadXmlField(), S_get_value(), and v_dump().

Here is the call graph for this function:

Here is the caller graph for this function:

const TiXmlAttribute* TinyXPath::node_set::XAp_get_attribute_in_set ( unsigned  u_which  )  [inline]

Get an attribute.

References o_is_attrib(), u_nb_node, and vpp_node_set.

Referenced by ReadXmlField(), S_get_value(), and v_dump().

Here is the call graph for this function:

Here is the caller graph for this function:

bool TinyXPath::node_set::o_is_attrib ( unsigned  u_which  )  [inline]

Check if a node is an attribute or another node. This is needed because TinyXML has a weird exception for attributes not being children of TiXmlNode

References op_attrib, and u_nb_node.

Referenced by ReadXmlField(), S_get_value(), XAp_get_attribute_in_set(), and XNp_get_node_in_set().

Here is the caller graph for this function:

TiXmlString TinyXPath::node_set::S_get_value ( unsigned  u_which  )  [inline]

Get a node value. The value is the name for an element, and the attribute value for an attribute.

References o_is_attrib(), TIXML_STRING, XAp_get_attribute_in_set(), and XNp_get_node_in_set().

Referenced by d_get_value(), and i_get_value().

Here is the call graph for this function:

Here is the caller graph for this function:

int TinyXPath::node_set::i_get_value ( unsigned  u_which  )  [inline]

Get the integer value of a node.

References S_get_value().

Here is the call graph for this function:

double TinyXPath::node_set::d_get_value ( unsigned  u_which  )  [inline]

Get the real value of a node.

References S_get_value().

Here is the call graph for this function:

void TinyXPath::node_set::v_copy_node_children ( const TiXmlNode XNp_root  ) 

Copy all element children of a node to the node_set.

Parameters:
XNp_root The father of the nodes to be copied

Referenced by v_add_all_foll_node(), and v_add_all_prec_node().

Here is the caller graph for this function:

void TinyXPath::node_set::v_copy_node_children ( const TiXmlNode XNp_root,
const char *  cp_lookup 
)

Copy all element children of a node to the node_set, if their name matches a given name.

Parameters:
XNp_root The father of the nodes to be copied
cp_lookup Lookup name (or NULL)

References v_add_node_in_set().

Here is the call graph for this function:

void TinyXPath::node_set::v_copy_selected_node_recursive ( const TiXmlNode XNp_root  ) 

Copy all nodes in the tree to the node_set.

Parameters:
XNp_root The node to be copied

Referenced by v_copy_selected_node_recursive().

Here is the caller graph for this function:

void TinyXPath::node_set::v_copy_selected_node_recursive ( const TiXmlNode XNp_root,
const char *  cp_lookup 
)

Copy all nodes in the tree to the node_set.

Parameters:
XNp_root The node to be copied
cp_lookup Lookup name (or NULL)

References TiXmlNode::ELEMENT, v_add_attrib_in_set(), v_add_node_in_set(), and v_copy_selected_node_recursive().

Here is the call graph for this function:

void TinyXPath::node_set::v_copy_selected_node_recursive_no_attrib ( const TiXmlNode XNp_root,
const char *  cp_lookup 
)

Copy all nodes in the tree to the node_set, excluding attributes.

Parameters:
XNp_root Node whole children are to be copied
cp_lookup Lookup name or NULL

References v_add_node_in_set().

Here is the call graph for this function:

TiXmlString TinyXPath::node_set::S_get_string_value (  )  const

Return the string value aka concatenation of all text items.

References op_attrib, TIXML_STRING, u_nb_node, and vpp_node_set.

void TinyXPath::node_set::v_dump (  ) 

Debug function to print the content of a node set to stdout.

References Name, op_attrib, u_nb_node, XAp_get_attribute_in_set(), and XNp_get_node_in_set().

Here is the call graph for this function:

void TinyXPath::node_set::v_document_sort (  ) 

Sort the node set according to the document order.
The document order must have been recorded already in the tiny xml user's value
There's still a problem with the attributes. They aren't covered by the GetUserData / SetUserData yet. If two attributes come from the same element, we have to compute on the fly their relative position

References TinyXPath::i_compare_ptr_and_flag(), op_attrib, u_nb_node, and vpp_node_set.

Here is the call graph for this function:


Member Data Documentation

unsigned TinyXPath::node_set::u_nb_node [protected]
const void** TinyXPath::node_set::vpp_node_set [protected]
bool* TinyXPath::node_set::op_attrib [protected]

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