Hazelnupp/docs/main_8cpp.html
2021-06-04 02:30:58 +02:00

185 lines
15 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Leonetienne/Hazelnupp: Hazelnupp/main.cpp File 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.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="nupp_small.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Leonetienne/Hazelnupp
</div>
<div id="projectbrief">Simple, easy to use, command line parameter interface</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @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&amp;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>
<!-- 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"><a class="el" href="dir_0202e1e26df2e040f4dc3d434eecf04c.html">Hazelnupp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">main.cpp File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;iostream&gt;</code><br />
<code>#include &quot;<a class="el" href="Hazelnupp_8h_source.html">Hazelnupp.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="IntValue_8h_source.html">IntValue.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for main.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="main_8cpp__incl.png" border="0" usemap="#Hazelnupp_2main_8cpp" alt=""/></div>
<map name="Hazelnupp_2main_8cpp" id="Hazelnupp_2main_8cpp">
<area shape="rect" title=" " alt="" coords="198,5,353,32"/>
<area shape="rect" title=" " alt="" coords="119,80,199,107"/>
<area shape="rect" href="Hazelnupp_8h.html" title=" " alt="" coords="224,80,327,107"/>
<area shape="rect" href="IntValue_8h.html" title=" " alt="" coords="321,155,408,181"/>
<area shape="rect" href="Parameter_8h.html" title=" " alt="" coords="432,155,532,181"/>
<area shape="rect" title=" " alt="" coords="239,304,301,331"/>
<area shape="rect" href="ParamConstraint_8h.html" title=" " alt="" coords="205,229,348,256"/>
<area shape="rect" title=" " alt="" coords="5,155,129,181"/>
<area shape="rect" href="Value_8h.html" title=" " alt="" coords="372,229,443,256"/>
<area shape="rect" title=" " alt="" coords="343,379,402,405"/>
<area shape="rect" title=" " alt="" coords="444,304,520,331"/>
<area shape="rect" href="DataType_8h.html" title=" " alt="" coords="325,304,420,331"/>
</map>
</div>
</div>
<p><a href="main_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
<tr class="separator:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a3c04138a5bfe5d72780bb7e82a18e627"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c04138a5bfe5d72780bb7e82a18e627">&#9670;&nbsp;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int main </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char **&#160;</td>
<td class="paramname"><em>argv</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00007">7</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;{</div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160; <a class="code" href="classHazelnp_1_1Hazelnupp.html">Hazelnupp</a> nupp;</div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160; </div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160; nupp.<a class="code" href="classHazelnp_1_1Hazelnupp.html#a037f84b32c7a2420c387dd46445291ac">SetBriefDescription</a>(<span class="stringliteral">&quot;This is the testing application for Hazelnupp.&quot;</span>);</div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160; nupp.<a class="code" href="classHazelnp_1_1Hazelnupp.html#a17883db87e97caad4a0f114f9f850f5e">RegisterDescription</a>(<span class="stringliteral">&quot;--help&quot;</span>, <span class="stringliteral">&quot;This will display the parameter documentation.&quot;</span>);</div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160; nupp.<a class="code" href="classHazelnp_1_1Hazelnupp.html#a17883db87e97caad4a0f114f9f850f5e">RegisterDescription</a>(<span class="stringliteral">&quot;--force&quot;</span>, <span class="stringliteral">&quot;Just forces it.&quot;</span>);</div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160; nupp.<a class="code" href="classHazelnp_1_1Hazelnupp.html#a17883db87e97caad4a0f114f9f850f5e">RegisterDescription</a>(<span class="stringliteral">&quot;--width&quot;</span>, <span class="stringliteral">&quot;The width of something...&quot;</span>);</div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160; nupp.<a class="code" href="classHazelnp_1_1Hazelnupp.html#a17883db87e97caad4a0f114f9f850f5e">RegisterDescription</a>(<span class="stringliteral">&quot;--name&quot;</span>, <span class="stringliteral">&quot;The names to target&quot;</span>);</div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160; nupp.<a class="code" href="classHazelnp_1_1Hazelnupp.html#a17883db87e97caad4a0f114f9f850f5e">RegisterDescription</a>(<span class="stringliteral">&quot;--fruit&quot;</span>, <span class="stringliteral">&quot;The fruit to use&quot;</span>);</div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160; nupp.<a class="code" href="classHazelnp_1_1Hazelnupp.html#abf1e0ebf0207ca2327fcde81f7372124">RegisterAbbreviation</a>(<span class="stringliteral">&quot;-f&quot;</span>, <span class="stringliteral">&quot;--force&quot;</span>);</div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; nupp.<a class="code" href="classHazelnp_1_1Hazelnupp.html#abf1e0ebf0207ca2327fcde81f7372124">RegisterAbbreviation</a>(<span class="stringliteral">&quot;-w&quot;</span>, <span class="stringliteral">&quot;--width&quot;</span>);</div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; nupp.<a class="code" href="classHazelnp_1_1Hazelnupp.html#abf1e0ebf0207ca2327fcde81f7372124">RegisterAbbreviation</a>(<span class="stringliteral">&quot;-h&quot;</span>, <span class="stringliteral">&quot;--height&quot;</span>);</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; nupp.<a class="code" href="classHazelnp_1_1Hazelnupp.html#a8a3331836b9ea1f920e77f6d332019d5">RegisterConstraints</a>({</div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; ParamConstraint::TypeSafety(<span class="stringliteral">&quot;--width&quot;</span>, DATA_TYPE::FLOAT),</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; <a class="code" href="structHazelnp_1_1ParamConstraint.html">ParamConstraint</a>(<span class="stringliteral">&quot;--name&quot;</span>, <span class="keyword">true</span>, DATA_TYPE::LIST, {<span class="stringliteral">&quot;peter&quot;</span>, <span class="stringliteral">&quot;hannes&quot;</span>}, <span class="keyword">true</span>),</div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160; <a class="code" href="structHazelnp_1_1ParamConstraint.html">ParamConstraint</a>(<span class="stringliteral">&quot;--fruit&quot;</span>, <span class="keyword">true</span>, DATA_TYPE::STRING, {}, <span class="keyword">true</span>)</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; });</div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; nupp.<a class="code" href="classHazelnp_1_1Hazelnupp.html#a1ccb88faca1a8deb77161888479c300b">Parse</a>(argc, argv);</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
<div class="ttc" id="aclassHazelnp_1_1Hazelnupp_html"><div class="ttname"><a href="classHazelnp_1_1Hazelnupp.html">Hazelnp::Hazelnupp</a></div><div class="ttdoc">The main class to interface with.</div><div class="ttdef"><b>Definition:</b> <a href="Hazelnupp_8h_source.html#l00011">Hazelnupp.h:11</a></div></div>
<div class="ttc" id="aclassHazelnp_1_1Hazelnupp_html_a037f84b32c7a2420c387dd46445291ac"><div class="ttname"><a href="classHazelnp_1_1Hazelnupp.html#a037f84b32c7a2420c387dd46445291ac">Hazelnp::Hazelnupp::SetBriefDescription</a></div><div class="ttdeci">void SetBriefDescription(const std::string &amp;description)</div><div class="ttdoc">Sets a brief description of the application to be automatically added to the documentation.</div><div class="ttdef"><b>Definition:</b> <a href="Hazelnupp_8cpp_source.html#l00306">Hazelnupp.cpp:306</a></div></div>
<div class="ttc" id="astructHazelnp_1_1ParamConstraint_html"><div class="ttname"><a href="structHazelnp_1_1ParamConstraint.html">Hazelnp::ParamConstraint</a></div><div class="ttdef"><b>Definition:</b> <a href="ParamConstraint_8h_source.html#l00008">ParamConstraint.h:8</a></div></div>
<div class="ttc" id="aclassHazelnp_1_1Hazelnupp_html_a1ccb88faca1a8deb77161888479c300b"><div class="ttname"><a href="classHazelnp_1_1Hazelnupp.html#a1ccb88faca1a8deb77161888479c300b">Hazelnp::Hazelnupp::Parse</a></div><div class="ttdeci">void Parse(const int argc, const char *const *argv)</div><div class="ttdoc">Will parse command line arguments.</div><div class="ttdef"><b>Definition:</b> <a href="Hazelnupp_8cpp_source.html#l00035">Hazelnupp.cpp:35</a></div></div>
<div class="ttc" id="aclassHazelnp_1_1Hazelnupp_html_abf1e0ebf0207ca2327fcde81f7372124"><div class="ttname"><a href="classHazelnp_1_1Hazelnupp.html#abf1e0ebf0207ca2327fcde81f7372124">Hazelnp::Hazelnupp::RegisterAbbreviation</a></div><div class="ttdeci">void RegisterAbbreviation(const std::string &amp;abbrev, const std::string &amp;target)</div><div class="ttdoc">Will register an abbreviation (like -f for force)</div><div class="ttdef"><b>Definition:</b> <a href="Hazelnupp_8cpp_source.html#l00499">Hazelnupp.cpp:499</a></div></div>
<div class="ttc" id="aclassHazelnp_1_1Hazelnupp_html_a8a3331836b9ea1f920e77f6d332019d5"><div class="ttname"><a href="classHazelnp_1_1Hazelnupp.html#a8a3331836b9ea1f920e77f6d332019d5">Hazelnp::Hazelnupp::RegisterConstraints</a></div><div class="ttdeci">void RegisterConstraints(const std::vector&lt; ParamConstraint &gt; &amp;constraints)</div><div class="ttdoc">Will register parameter constraints.</div><div class="ttdef"><b>Definition:</b> <a href="Hazelnupp_8cpp_source.html#l00521">Hazelnupp.cpp:521</a></div></div>
<div class="ttc" id="aclassHazelnp_1_1Hazelnupp_html_a17883db87e97caad4a0f114f9f850f5e"><div class="ttname"><a href="classHazelnp_1_1Hazelnupp.html#a17883db87e97caad4a0f114f9f850f5e">Hazelnp::Hazelnupp::RegisterDescription</a></div><div class="ttdeci">void RegisterDescription(const std::string &amp;parameter, const std::string &amp;description)</div><div class="ttdoc">Willl register a short description for a parameter.</div><div class="ttdef"><b>Definition:</b> <a href="Hazelnupp_8cpp_source.html#l00317">Hazelnupp.cpp:317</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Jun 4 2021 02:30:28 for Leonetienne/Hazelnupp by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>