<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.13"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>Orcus: orcus::xml_structure_tree::walker Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">Orcus </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.13 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); </script> <div id="main-nav"></div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><b>orcus</b></li><li class="navelem"><a class="el" href="classorcus_1_1xml__structure__tree.html">xml_structure_tree</a></li><li class="navelem"><a class="el" href="classorcus_1_1xml__structure__tree_1_1walker.html">walker</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#friends">Friends</a> | <a href="classorcus_1_1xml__structure__tree_1_1walker-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">orcus::xml_structure_tree::walker Class Reference</div> </div> </div><!--header--> <div class="contents"> <p><code>#include <<a class="el" href="xml__structure__tree_8hpp_source.html">xml_structure_tree.hpp</a>></code></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:ae8e3091d43d88d6cd93b4aa6601cf606"><td class="memItemLeft" align="right" valign="top"><a id="ae8e3091d43d88d6cd93b4aa6601cf606"></a>  </td><td class="memItemRight" valign="bottom"><b>walker</b> (const <a class="el" href="classorcus_1_1xml__structure__tree_1_1walker.html">walker</a> &r)</td></tr> <tr class="separator:ae8e3091d43d88d6cd93b4aa6601cf606"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2c8f98ad852e7a08c1f8bab51ce66644"><td class="memItemLeft" align="right" valign="top"><a id="a2c8f98ad852e7a08c1f8bab51ce66644"></a> <a class="el" href="classorcus_1_1xml__structure__tree_1_1walker.html">walker</a> & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classorcus_1_1xml__structure__tree_1_1walker.html">walker</a> &r)</td></tr> <tr class="separator:a2c8f98ad852e7a08c1f8bab51ce66644"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a3738e4ce02e38ae15da9ccb01ee9bf3d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structorcus_1_1xml__structure__tree_1_1element.html">element</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classorcus_1_1xml__structure__tree_1_1walker.html#a3738e4ce02e38ae15da9ccb01ee9bf3d">root</a> ()</td></tr> <tr class="separator:a3738e4ce02e38ae15da9ccb01ee9bf3d"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7f6fad2f8b892fdda9934c70e515764d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structorcus_1_1xml__structure__tree_1_1element.html">element</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classorcus_1_1xml__structure__tree_1_1walker.html#a7f6fad2f8b892fdda9934c70e515764d">descend</a> (const <a class="el" href="structorcus_1_1xml__structure__tree_1_1entity__name.html">entity_name</a> &name)</td></tr> <tr class="separator:a7f6fad2f8b892fdda9934c70e515764d"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a1dec2511b41aec5d7231068af5a41b1a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structorcus_1_1xml__structure__tree_1_1element.html">element</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classorcus_1_1xml__structure__tree_1_1walker.html#a1dec2511b41aec5d7231068af5a41b1a">ascend</a> ()</td></tr> <tr class="separator:a1dec2511b41aec5d7231068af5a41b1a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aafdd9357a53ef3cec191f16533c2f5da"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classorcus_1_1xml__structure__tree_1_1walker.html#aafdd9357a53ef3cec191f16533c2f5da">get_children</a> (entity_names_type &names)</td></tr> <tr class="separator:aafdd9357a53ef3cec191f16533c2f5da"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9468d3e0d2c5ac2623bbfd8eeb8df336"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classorcus_1_1xml__structure__tree_1_1walker.html#a9468d3e0d2c5ac2623bbfd8eeb8df336">get_attributes</a> (entity_names_type &names)</td></tr> <tr class="separator:a9468d3e0d2c5ac2623bbfd8eeb8df336"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aef1b488ad3826c108f8820a734d0a22d"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classorcus_1_1xml__structure__tree_1_1walker.html#aef1b488ad3826c108f8820a734d0a22d">get_xmlns_index</a> (xmlns_id_t ns) const</td></tr> <tr class="separator:aef1b488ad3826c108f8820a734d0a22d"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab01dbc448b5b27f998787dbb822d92b4"><td class="memItemLeft" align="right" valign="top"><a id="ab01dbc448b5b27f998787dbb822d92b4"></a> std::string </td><td class="memItemRight" valign="bottom"><b>get_xmlns_short_name</b> (xmlns_id_t ns) const</td></tr> <tr class="separator:ab01dbc448b5b27f998787dbb822d92b4"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab23fe2016614e8339bf17c085b9f9d36"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classorcus_1_1xml__structure__tree_1_1walker.html#ab23fe2016614e8339bf17c085b9f9d36">get_path</a> () const</td></tr> <tr class="separator:ab23fe2016614e8339bf17c085b9f9d36"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac23ea90195a6710c6eead2c1a0b8024e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structorcus_1_1xml__structure__tree_1_1element.html">element</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classorcus_1_1xml__structure__tree_1_1walker.html#ac23ea90195a6710c6eead2c1a0b8024e">select_by_path</a> (const std::string &path)</td></tr> <tr class="separator:ac23ea90195a6710c6eead2c1a0b8024e"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a> Friends</h2></td></tr> <tr class="memitem:ad4ef71f239dee948636a82d074658e1c"><td class="memItemLeft" align="right" valign="top"><a id="ad4ef71f239dee948636a82d074658e1c"></a> class </td><td class="memItemRight" valign="bottom"><b>xml_structure_tree</b></td></tr> <tr class="separator:ad4ef71f239dee948636a82d074658e1c"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>This class allows client to traverse the tree. </p> </div><h2 class="groupheader">Member Function Documentation</h2> <a id="a1dec2511b41aec5d7231068af5a41b1a"></a> <h2 class="memtitle"><span class="permalink"><a href="#a1dec2511b41aec5d7231068af5a41b1a">◆ </a></span>ascend()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structorcus_1_1xml__structure__tree_1_1element.html">element</a> orcus::xml_structure_tree::walker::ascend </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Move up to the parent element. </p> </div> </div> <a id="a7f6fad2f8b892fdda9934c70e515764d"></a> <h2 class="memtitle"><span class="permalink"><a href="#a7f6fad2f8b892fdda9934c70e515764d">◆ </a></span>descend()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structorcus_1_1xml__structure__tree_1_1element.html">element</a> orcus::xml_structure_tree::walker::descend </td> <td>(</td> <td class="paramtype">const <a class="el" href="structorcus_1_1xml__structure__tree_1_1entity__name.html">entity_name</a> & </td> <td class="paramname"><em>name</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Descend into specified child element.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">ns</td><td>namespace of child element </td></tr> <tr><td class="paramname">name</td><td>name of child element</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>child element </dd></dl> </div> </div> <a id="a9468d3e0d2c5ac2623bbfd8eeb8df336"></a> <h2 class="memtitle"><span class="permalink"><a href="#a9468d3e0d2c5ac2623bbfd8eeb8df336">◆ </a></span>get_attributes()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void orcus::xml_structure_tree::walker::get_attributes </td> <td>(</td> <td class="paramtype">entity_names_type & </td> <td class="paramname"><em>names</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Get a list of names of all attributes that belong to current element. The list of names is in order of appearance.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">names</td><td>list of attribute names in order of appearance. </td></tr> </table> </dd> </dl> </div> </div> <a id="aafdd9357a53ef3cec191f16533c2f5da"></a> <h2 class="memtitle"><span class="permalink"><a href="#aafdd9357a53ef3cec191f16533c2f5da">◆ </a></span>get_children()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void orcus::xml_structure_tree::walker::get_children </td> <td>(</td> <td class="paramtype">entity_names_type & </td> <td class="paramname"><em>names</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Get a list of names of all child elements at current element position. The list of names is in order of appearance.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">names</td><td>list of child element names in order of appearance. </td></tr> </table> </dd> </dl> </div> </div> <a id="ab23fe2016614e8339bf17c085b9f9d36"></a> <h2 class="memtitle"><span class="permalink"><a href="#ab23fe2016614e8339bf17c085b9f9d36">◆ </a></span>get_path()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string orcus::xml_structure_tree::walker::get_path </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Get a XPath like ID for the element inside of the XML tree. </p> </div> </div> <a id="aef1b488ad3826c108f8820a734d0a22d"></a> <h2 class="memtitle"><span class="permalink"><a href="#aef1b488ad3826c108f8820a734d0a22d">◆ </a></span>get_xmlns_index()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t orcus::xml_structure_tree::walker::get_xmlns_index </td> <td>(</td> <td class="paramtype">xmlns_id_t </td> <td class="paramname"><em>ns</em></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Get a numerical, 0-based index of given XML namespace.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">ns</td><td>XML namespace ID.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>numeric, 0-based index of XML namespace if found, or <code>xml_structure_tree::walker::index_not_found</code> if the namespace is not found in this structure. </dd></dl> </div> </div> <a id="a3738e4ce02e38ae15da9ccb01ee9bf3d"></a> <h2 class="memtitle"><span class="permalink"><a href="#a3738e4ce02e38ae15da9ccb01ee9bf3d">◆ </a></span>root()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structorcus_1_1xml__structure__tree_1_1element.html">element</a> orcus::xml_structure_tree::walker::root </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Set current position to the root element, and return the root element.</p> <dl class="section return"><dt>Returns</dt><dd>root element. </dd></dl> </div> </div> <a id="ac23ea90195a6710c6eead2c1a0b8024e"></a> <h2 class="memtitle"><span class="permalink"><a href="#ac23ea90195a6710c6eead2c1a0b8024e">◆ </a></span>select_by_path()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structorcus_1_1xml__structure__tree_1_1element.html">element</a> orcus::xml_structure_tree::walker::select_by_path </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"><em>path</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Select an element by a path expression. The path expression may be generated by <code><a class="el" href="classorcus_1_1xml__structure__tree_1_1walker.html#ab23fe2016614e8339bf17c085b9f9d36">xml_structure_tree::walker::get_path</a></code>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">path</td><td>a simple XPath like expression </td></tr> </table> </dd> </dl> </div> </div> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Sat Feb 9 2019 16:54:03 for Orcus by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.13 </small></address> </body> </html>