summaryrefslogtreecommitdiffstats
path: root/apidoc/group___diff_node.html
blob: 33df5e062cb516f6a6e70795e60cde4d2e171509 (plain) (blame)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 
<!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.9.1"/> <title>libabigail: Internal Representation of the comparison engine</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> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </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 style="padding-left: 0.5em;"> <div id="projectname">libabigail </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.9.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> </div><!-- top --> <!-- 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 class="header"> <div class="headertitle"> <div class="title">Internal Representation of the comparison engine</div> </div> </div><!--header--> <div class="contents"> <p>How changes are represented in libabigail's comparison engine. </p> <dl class="section user"><dt>diff nodes</dt><dd></dd></dl> <p>The internal representation of the comparison engine is basically a graph of instances of <a class="el" href="classabigail_1_1comparison_1_1diff.html">diff</a> node. We refer to these just as <em>diff nodes</em>. A diff node represents a change between two ABI artifacts represented by instances of types of the <a class="el" href="namespaceabigail_1_1ir.html" title="The namespace of the internal representation of ABI artifacts like types and decls. ">abigail::ir</a> namespace. These two artifacts that are being compared are called the <em>subjects of the diff</em>.</p> <p>The types of that IR are in the <a class="el" href="namespaceabigail_1_1comparison.html" title="utilities to compare abi artifacts ">abigail::comparison</a> namespace.</p> <dl class="section user"><dt>comparing diff nodes</dt><dd></dd></dl> <p>Comparing two instances of <a class="el" href="classabigail_1_1comparison_1_1diff.html">diff</a> nodes amounts to comparing the subject of the diff. In other words, two <a class="el" href="classabigail_1_1comparison_1_1diff.html">diff</a> nodes are equal if and only if their subjects are equal. Thus, two <a class="el" href="classabigail_1_1comparison_1_1diff.html">diff</a> nodes can have different memory addresses and yet be equal.</p> <dl class="section user"><dt>diff reporting and context</dt><dd></dd></dl> <p>A diff node can be serialized to an output stream to express, in a human-readable textual form, the different changes that exist between its two subjects. This is done by invoking the <a class="el" href="classabigail_1_1comparison_1_1diff.html#a40ebcee4619bb4a2ae49192cce768c3f" title="Pure interface to report the diff in a serialized form that is legible for the user. ">diff::report()</a> method. That reporting is controlled by several parameters that are conceptually part of the context of the diff. That context is materialized by an instance of the <a class="el" href="classabigail_1_1comparison_1_1diff__context.html">diff_context</a> type.</p> <p>Please note that the role of the instance(s) of <a class="el" href="classabigail_1_1comparison_1_1diff__context.html">diff_context</a> is boreader than just controlling the reporting of <a class="el" href="classabigail_1_1comparison_1_1diff.html">diff</a> nodes. Basically, a <a class="el" href="classabigail_1_1comparison_1_1diff.html">diff</a> node itself is created following behaviours that are controlled by a particular instance of <a class="el" href="classabigail_1_1comparison_1_1diff__context.html" title="The context of the diff. This type holds various bits of information that is going to be used through...">diff_context</a>. A diff node is created in a particular diff context, so to speak. </p> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.9.1 </small></address> </body> </html>