150 lines
14 KiB
HTML
150 lines
14 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.9.1"/>
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||
|
<title>sapphirec: src/Location.h Source File</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>
|
||
|
<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" />
|
||
|
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
||
|
<link href="doxygen-awesome-sidebar-only.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">sapphirec
|
||
|
</div>
|
||
|
<div id="projectbrief">The Sapphire documentation</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<!-- end header part -->
|
||
|
<!-- Generated by Doxygen 1.9.1 -->
|
||
|
<script type="text/javascript">
|
||
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
||
|
/* @license-end */
|
||
|
</script>
|
||
|
<script type="text/javascript" src="menudata.js"></script>
|
||
|
<script type="text/javascript" src="menu.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||
|
$(function() {
|
||
|
initMenu('',true,false,'search.php','Search');
|
||
|
$(document).ready(function() { init_search(); });
|
||
|
});
|
||
|
/* @license-end */</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">
|
||
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||
|
$(document).ready(function(){initNavTree('_location_8h_source.html',''); initResizable(); });
|
||
|
/* @license-end */
|
||
|
</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">Location.h</div> </div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
<a href="_location_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#pragma once</span></div>
|
||
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#include "<a class="code" href="sapphirepch_8h.html">sapphirepch.h</a>"</span></div>
|
||
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>  </div>
|
||
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">/* Struct to represent a location in a file. */</span></div>
|
||
|
<div class="line"><a name="l00005"></a><span class="lineno"><a class="line" href="struct_location.html"> 5</a></span> <span class="keyword">struct </span><a class="code" href="struct_location.html">Location</a></div>
|
||
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> {</div>
|
||
|
<div class="line"><a name="l00007"></a><span class="lineno"><a class="line" href="struct_location.html#a20371736bca98414df38bc3ae316bd1c"> 7</a></span>  <span class="keywordtype">int</span> <a class="code" href="struct_location.html#a20371736bca98414df38bc3ae316bd1c">line</a>;</div>
|
||
|
<div class="line"><a name="l00008"></a><span class="lineno"><a class="line" href="struct_location.html#ae9cf292727f8758f402671c80d6c4718"> 8</a></span>  <span class="keywordtype">int</span> <a class="code" href="struct_location.html#ae9cf292727f8758f402671c80d6c4718">column</a>;</div>
|
||
|
<div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="struct_location.html#a5b691d1c7f3c5c1b7428cf118d3595c8"> 9</a></span>  std::string <a class="code" href="struct_location.html#a5b691d1c7f3c5c1b7428cf118d3595c8">fname</a>;</div>
|
||
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>  </div>
|
||
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>  <span class="comment">/* The location at which this location was imported, for error traces in imported files. */</span></div>
|
||
|
<div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="struct_location.html#af047bbd018951f48de8adf5a89938acc"> 12</a></span>  std::shared_ptr<Location> <a class="code" href="struct_location.html#af047bbd018951f48de8adf5a89938acc">parent</a> = <span class="keyword">nullptr</span>;</div>
|
||
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  </div>
|
||
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>  <span class="comment">/* Creates a Location with the given parameters. */</span></div>
|
||
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  <a class="code" href="struct_location.html#a7d1957f57b0c5b36b2f546d5833d6be6">Location</a>(<span class="keywordtype">int</span> ln, <span class="keywordtype">int</span> col, std::string file);</div>
|
||
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  </div>
|
||
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>  <a class="code" href="struct_location.html#af5be2c6550bbd96137cbb3144ec3c529">~Location</a>();</div>
|
||
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  </div>
|
||
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  <span class="comment">/* Returns a string of the format FILE:LINE:COL. */</span></div>
|
||
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  std::string <a class="code" href="struct_location.html#acebfd439c295573434454fdd3e116e0e">str</a>() <span class="keyword">const</span>;</div>
|
||
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  <span class="comment">/* Returns a string of the format (FILE:LINE:COL). */</span></div>
|
||
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  std::string <a class="code" href="struct_location.html#aaa249a0b41e4208fd9346b4744c0a823">paren_str</a>() <span class="keyword">const</span>;</div>
|
||
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  </div>
|
||
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  <span class="comment">/* Advance to the next column in the file. */</span></div>
|
||
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  <span class="keywordtype">void</span> <a class="code" href="struct_location.html#a375ecb41aafad3dba17600684cb16a6f">advance</a>();</div>
|
||
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  </div>
|
||
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  <span class="comment">/* Advance to the next line if provided a newline. */</span></div>
|
||
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <span class="keywordtype">void</span> <a class="code" href="struct_location.html#ab0754b2857e8fc1bb80f0f8c18c629ab">pos_from_char</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>& character);</div>
|
||
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  </div>
|
||
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <span class="keywordtype">void</span> <a class="code" href="struct_location.html#a8646c981888c9d6423e99a0298f9d795">operator=</a>(<span class="keyword">const</span> <a class="code" href="struct_location.html">Location</a>& other);</div>
|
||
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  </div>
|
||
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <span class="comment">/* Copies the other location into this one. */</span></div>
|
||
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keywordtype">void</span> <a class="code" href="struct_location.html#a524b9cec2031554ca8f15405ab5ae9ff">copy</a>(<span class="keyword">const</span> <a class="code" href="struct_location.html">Location</a>& other);</div>
|
||
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> };</div>
|
||
|
<div class="ttc" id="asapphirepch_8h_html"><div class="ttname"><a href="sapphirepch_8h.html">sapphirepch.h</a></div></div>
|
||
|
<div class="ttc" id="astruct_location_html"><div class="ttname"><a href="struct_location.html">Location</a></div><div class="ttdef"><b>Definition:</b> Location.h:6</div></div>
|
||
|
<div class="ttc" id="astruct_location_html_a20371736bca98414df38bc3ae316bd1c"><div class="ttname"><a href="struct_location.html#a20371736bca98414df38bc3ae316bd1c">Location::line</a></div><div class="ttdeci">int line</div><div class="ttdef"><b>Definition:</b> Location.h:7</div></div>
|
||
|
<div class="ttc" id="astruct_location_html_a375ecb41aafad3dba17600684cb16a6f"><div class="ttname"><a href="struct_location.html#a375ecb41aafad3dba17600684cb16a6f">Location::advance</a></div><div class="ttdeci">void advance()</div><div class="ttdef"><b>Definition:</b> Location.cpp:24</div></div>
|
||
|
<div class="ttc" id="astruct_location_html_a524b9cec2031554ca8f15405ab5ae9ff"><div class="ttname"><a href="struct_location.html#a524b9cec2031554ca8f15405ab5ae9ff">Location::copy</a></div><div class="ttdeci">void copy(const Location &other)</div><div class="ttdef"><b>Definition:</b> Location.cpp:46</div></div>
|
||
|
<div class="ttc" id="astruct_location_html_a5b691d1c7f3c5c1b7428cf118d3595c8"><div class="ttname"><a href="struct_location.html#a5b691d1c7f3c5c1b7428cf118d3595c8">Location::fname</a></div><div class="ttdeci">std::string fname</div><div class="ttdef"><b>Definition:</b> Location.h:9</div></div>
|
||
|
<div class="ttc" id="astruct_location_html_a7d1957f57b0c5b36b2f546d5833d6be6"><div class="ttname"><a href="struct_location.html#a7d1957f57b0c5b36b2f546d5833d6be6">Location::Location</a></div><div class="ttdeci">Location(int ln, int col, std::string file)</div><div class="ttdef"><b>Definition:</b> Location.cpp:4</div></div>
|
||
|
<div class="ttc" id="astruct_location_html_a8646c981888c9d6423e99a0298f9d795"><div class="ttname"><a href="struct_location.html#a8646c981888c9d6423e99a0298f9d795">Location::operator=</a></div><div class="ttdeci">void operator=(const Location &other)</div><div class="ttdef"><b>Definition:</b> Location.cpp:38</div></div>
|
||
|
<div class="ttc" id="astruct_location_html_aaa249a0b41e4208fd9346b4744c0a823"><div class="ttname"><a href="struct_location.html#aaa249a0b41e4208fd9346b4744c0a823">Location::paren_str</a></div><div class="ttdeci">std::string paren_str() const</div><div class="ttdef"><b>Definition:</b> Location.cpp:19</div></div>
|
||
|
<div class="ttc" id="astruct_location_html_ab0754b2857e8fc1bb80f0f8c18c629ab"><div class="ttname"><a href="struct_location.html#ab0754b2857e8fc1bb80f0f8c18c629ab">Location::pos_from_char</a></div><div class="ttdeci">void pos_from_char(const char &character)</div><div class="ttdef"><b>Definition:</b> Location.cpp:29</div></div>
|
||
|
<div class="ttc" id="astruct_location_html_acebfd439c295573434454fdd3e116e0e"><div class="ttname"><a href="struct_location.html#acebfd439c295573434454fdd3e116e0e">Location::str</a></div><div class="ttdeci">std::string str() const</div><div class="ttdef"><b>Definition:</b> Location.cpp:12</div></div>
|
||
|
<div class="ttc" id="astruct_location_html_ae9cf292727f8758f402671c80d6c4718"><div class="ttname"><a href="struct_location.html#ae9cf292727f8758f402671c80d6c4718">Location::column</a></div><div class="ttdeci">int column</div><div class="ttdef"><b>Definition:</b> Location.h:8</div></div>
|
||
|
<div class="ttc" id="astruct_location_html_af047bbd018951f48de8adf5a89938acc"><div class="ttname"><a href="struct_location.html#af047bbd018951f48de8adf5a89938acc">Location::parent</a></div><div class="ttdeci">std::shared_ptr< Location > parent</div><div class="ttdef"><b>Definition:</b> Location.h:12</div></div>
|
||
|
<div class="ttc" id="astruct_location_html_af5be2c6550bbd96137cbb3144ec3c529"><div class="ttname"><a href="struct_location.html#af5be2c6550bbd96137cbb3144ec3c529">Location::~Location</a></div><div class="ttdeci">~Location()</div><div class="ttdef"><b>Definition:</b> Location.cpp:8</div></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="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="_location_8h.html">Location.h</a></li>
|
||
|
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|