<!-- HTML header for doxygen 1.8.13-->
<!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>
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<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>chigraph: ResultExample.cpp</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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</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="projectlogo"><img alt="Logo" src="chigraphDoxygenIcon.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">chigraph
   &#160;<span id="projectnumber">master</span>
   </div>
   <div id="projectbrief">Systems programming language written for beginners in LLVM</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>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('ResultExample_8cpp-example.html','');});
</script>
<div id="doc-content">
<!-- 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">ResultExample.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;chi/Result.hpp&gt;</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span><a class="code" href="namespacechi.html">chi</a>;</div><div class="line"></div><div class="line"><a name="_a0"></a><a class="code" href="structchi_1_1Result.html">Result</a> thisWillFail() {</div><div class="line">    <a class="code" href="structchi_1_1Result.html">Result</a> res;</div><div class="line">    </div><div class="line">    res.<a name="a1"></a><a class="code" href="structchi_1_1Result.html#a59ef40f4a327cbdea263d6e4b5af2ad8">addEntry</a>(<span class="stringliteral">&quot;E122&quot;</span>, <span class="stringliteral">&quot;Huh?&quot;</span>, {{}});</div><div class="line">    </div><div class="line">    <span class="keywordflow">return</span> res;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main() {</div><div class="line">    </div><div class="line">    <a class="code" href="structchi_1_1Result.html">Result</a> res;</div><div class="line">    </div><div class="line">    </div><div class="line">    assert(res.<a name="a2"></a><a class="code" href="structchi_1_1Result.html#a98065cddbdc75d3130b5d8c3d567f507">success</a>());</div><div class="line">    </div><div class="line">    res.<a class="code" href="structchi_1_1Result.html#a59ef40f4a327cbdea263d6e4b5af2ad8">addEntry</a>(<span class="stringliteral">&quot;W123&quot;</span>, <span class="stringliteral">&quot;Just a warning, don&#39;t fret.&quot;</span>, {{<span class="stringliteral">&quot;Probably here&quot;</span>, 21}});</div><div class="line">    </div><div class="line">    assert(res.<a class="code" href="structchi_1_1Result.html#a98065cddbdc75d3130b5d8c3d567f507">success</a>());</div><div class="line">    </div><div class="line">    res.<a class="code" href="structchi_1_1Result.html#a59ef40f4a327cbdea263d6e4b5af2ad8">addEntry</a>(<span class="stringliteral">&quot;E231&quot;</span>, <span class="stringliteral">&quot;Some error occured&quot;</span>, {{<span class="stringliteral">&quot;Line Number&quot;</span>, 34}});</div><div class="line">    </div><div class="line">    assert(!res.<a class="code" href="structchi_1_1Result.html#a98065cddbdc75d3130b5d8c3d567f507">success</a>());</div><div class="line">    </div><div class="line">    res += thisWillFail();</div><div class="line">}</div></div><!-- fragment --> </div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Sat Sep 16 2017 17:41:35 for chigraph by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
