<ahref="Hazelnupp_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="preprocessor">#pragma once</span></div>
<divclass="line"><aname="l00022"></a><spanclass="lineno"> 22</span> <spanclass="comment"> //! Will return argv[0], the name of the executable.</span></div>
<divclass="line"><aname="l00028"></a><spanclass="lineno"> 28</span> <spanclass="comment"> //! Will check wether a parameter exists given a key, or not</span></div>
<divclass="line"><aname="l00032"></a><spanclass="lineno"> 32</span> <spanclass="comment"> //! Will register an abbreviation (like -f for --force)</span></div>
<divclass="line"><aname="l00035"></a><spanclass="lineno"> 35</span> <spanclass="comment"> //! Will return the long form of an abbreviation (like --force for -f) </span></div>
<divclass="line"><aname="l00036"></a><spanclass="lineno"> 36</span> <spanclass="comment"> //! Returns "" if no match is found</span></div>
<divclass="line"><aname="l00039"></a><spanclass="lineno"> 39</span> <spanclass="comment"> //! Will check wether or not an abbreviation is registered</span></div>
<divclass="line"><aname="l00042"></a><spanclass="lineno"> 42</span> <spanclass="comment"> //! Will delete the abbreviation for a given parameter. </span></div>
<divclass="line"><aname="l00043"></a><spanclass="lineno"> 43</span> <spanclass="comment"> //! IMPORTANT: This parameter is the abbreviation! Not the long form!</span></div>
<divclass="line"><aname="l00049"></a><spanclass="lineno"> 49</span> <spanclass="comment"> //! Will register a constraint for a parameter.</span></div>
<divclass="line"><aname="l00050"></a><spanclass="lineno"> 50</span> <spanclass="comment"> //! IMPORTANT: Any parameter can only have ONE constraint. Applying a new one will overwrite the old one!</span></div>
<divclass="line"><aname="l00051"></a><spanclass="lineno"> 51</span> <spanclass="comment"> //! Construct the ParamConstraint struct yourself to combine Require and TypeSafety! You can also use the ParamConstraint constructor!</span></div>
<divclass="line"><aname="l00054"></a><spanclass="lineno"> 54</span> <spanclass="comment"> //! Will return the constraint information for a specific parameter</span></div>
<divclass="line"><aname="l00057"></a><spanclass="lineno"> 57</span> <spanclass="comment"> //! Will the constraint of a specific parameter</span></div>
<divclass="line"><aname="l00063"></a><spanclass="lineno"> 63</span> <spanclass="comment"> //! Sets whether to crash the application, and print to stderr, when an exception is </span></div>
<divclass="line"><aname="l00064"></a><spanclass="lineno"> 64</span> <spanclass="comment"> //! raised whilst parsing, or not.</span></div>
<divclass="line"><aname="l00067"></a><spanclass="lineno"> 67</span> <spanclass="comment"> //! Gets whether the application crashes on an exception whilst parsing, and prints to stderr.</span></div>
<divclass="line"><aname="l00070"></a><spanclass="lineno"> 70</span> <spanclass="comment"> //! Sets whether the Hazelnupp should automatically catch the --help parameter, print the parameter documentation to stdout, and exit or not.</span></div>
<divclass="line"><aname="l00073"></a><spanclass="lineno"> 73</span> <spanclass="comment"> //! Retruns whether the Hazelnupp should automatically catch the --help parameter, print the parameter documentation to stdout, and exit or not.</span></div>
<divclass="line"><aname="l00076"></a><spanclass="lineno"> 76</span> <spanclass="comment"> //! Sets a brief description of the application to be automatically added to the documentation.</span></div>
<divclass="line"><aname="l00079"></a><spanclass="lineno"> 79</span> <spanclass="comment"> //! Returns the brief description of the application to be automatically added to the documentation.</span></div>
<divclass="line"><aname="l00082"></a><spanclass="lineno"> 82</span> <spanclass="comment"> //! Willl register a short description for a parameter. </span></div>
<divclass="line"><aname="l00083"></a><spanclass="lineno"> 83</span> <spanclass="comment"> //! Will overwrite existing descriptions for that parameter.</span></div>
<divclass="line"><aname="l00086"></a><spanclass="lineno"> 86</span> <spanclass="comment"> //! Will return a short description for a parameter, if it exists. </span></div>
<divclass="line"><aname="l00087"></a><spanclass="lineno"> 87</span> <spanclass="comment"> //! Empty string if it does not exist.</span></div>
<divclass="line"><aname="l00090"></a><spanclass="lineno"> 90</span> <spanclass="comment"> //! Returns whether or not a given parameter has a registered description</span></div>
<divclass="line"><aname="l00093"></a><spanclass="lineno"> 93</span> <spanclass="comment"> //! Will delete the description of a parameter if it exists.</span></div>
<divclass="line"><aname="l00099"></a><spanclass="lineno"> 99</span> <spanclass="comment"> //! Will generate a text-based documentation suited to show the user, for example on --help.</span></div>
<divclass="line"><aname="l00103"></a><spanclass="lineno"> 103</span> <spanclass="comment"> //! Will translate the c-like args to an std::vector</span></div>
<divclass="line"><aname="l00106"></a><spanclass="lineno"> 106</span> <spanclass="comment"> //! Will replace all args matching an abbreviation with their long form (like -f for --force)</span></div>
<divclass="line"><aname="l00109"></a><spanclass="lineno"> 109</span> <spanclass="comment"> //! Will parse the next parameter. Returns the index of the next parameter.</span></div>
<divclass="line"><aname="l00112"></a><spanclass="lineno"> 112</span> <spanclass="comment"> //! Will convert a vector of string-values to an actual Value</span></div>
<divclass="line"><aname="l00115"></a><spanclass="lineno"> 115</span> <spanclass="comment"> //! Will apply the loaded constraints on the loaded values, exluding types.</span></div>
<divclass="line"><aname="l00118"></a><spanclass="lineno"> 118</span> <spanclass="comment"> //! Will return a pointer to a paramConstraint given a key. If there is no, it returns nullptr</span></div>
<divclass="line"><aname="l00121"></a><spanclass="lineno"> 121</span>  std::string executableName; <spanclass="comment">//! The path of the executable. Always argv[0]</span></div>
<divclass="line"><aname="l00124"></a><spanclass="lineno"> 124</span> <spanclass="comment"> //! These are abbreviations. Like, -f for --force.</span></div>
<divclass="line"><aname="l00137"></a><spanclass="lineno"> 137</span> <spanclass="comment"> //! A brief description of the application to be added to the generated documentation. Optional.</span></div>
<divclass="line"><aname="l00140"></a><spanclass="lineno"> 140</span> <spanclass="comment"> //! If set to true, Hazelnupp will automatically catch the --help parameter, print the parameter documentation to stdout and exit.</span></div>
<divclass="line"><aname="l00143"></a><spanclass="lineno"> 143</span> <spanclass="comment"> //! If set to true, Hazelnupp will crash the application with output to stderr when an exception is thrown whilst parsing.</span></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a1d32c3047a8c58650476d1ae7e9fb582"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a1d32c3047a8c58650476d1ae7e9fb582">Hazelnp::Hazelnupp::GetBriefDescription</a></div><divclass="ttdeci">const std::string & GetBriefDescription()</div><divclass="ttdoc">Returns the brief description of the application to be automatically added to the documentation.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00351">Hazelnupp.cpp:351</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a3970b74583def49c6632fe08a4499809"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a3970b74583def49c6632fe08a4499809">Hazelnp::Hazelnupp::ClearConstraints</a></div><divclass="ttdeci">void ClearConstraints()</div><divclass="ttdoc">Will delete all constraints.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00605">Hazelnupp.cpp:605</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_af6bb41fb079131f8b91fe981f63f7469"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#af6bb41fb079131f8b91fe981f63f7469">Hazelnp::Hazelnupp::GetExecutableName</a></div><divclass="ttdeci">const std::string & GetExecutableName() const</div><divclass="ttdoc">Will return argv[0], the name of the executable.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00553">Hazelnupp.cpp:553</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a7b1bf5e700d8a0d8e90c5750e54749de"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a7b1bf5e700d8a0d8e90c5750e54749de">Hazelnp::Hazelnupp::GenerateDocumentation</a></div><divclass="ttdeci">std::string GenerateDocumentation() const</div><divclass="ttdoc">Will generate a text-based documentation suited to show the user, for example on –help.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00391">Hazelnupp.cpp:391</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_acaec2780d800113ffc2d72a6b865955c"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#acaec2780d800113ffc2d72a6b865955c">Hazelnp::Hazelnupp::GetConstraint</a></div><divclass="ttdeci">ParamConstraint GetConstraint(const std::string &parameter) const</div><divclass="ttdoc">Will return the constraint information for a specific parameter.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00542">Hazelnupp.cpp:542</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a419ccdc6bad00b0fc3e17ed9b41f5dc5"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a419ccdc6bad00b0fc3e17ed9b41f5dc5">Hazelnp::Hazelnupp::operator[]</a></div><divclass="ttdeci">const Value & operator[](const std::string &key) const</div><divclass="ttdoc">Will return the value given a key.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00558">Hazelnupp.cpp:558</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html">Hazelnp::Hazelnupp</a></div><divclass="ttdoc">The main class to interface with.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8h_source.html#l00011">Hazelnupp.h:11</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a5175869b025468324cefad487081e91d"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a5175869b025468324cefad487081e91d">Hazelnp::Hazelnupp::ClearAbbreviations</a></div><divclass="ttdeci">void ClearAbbreviations()</div><divclass="ttdoc">Will delete all abbreviations.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00592">Hazelnupp.cpp:592</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a037f84b32c7a2420c387dd46445291ac"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a037f84b32c7a2420c387dd46445291ac">Hazelnp::Hazelnupp::SetBriefDescription</a></div><divclass="ttdeci">void SetBriefDescription(const std::string &description)</div><divclass="ttdoc">Sets a brief description of the application to be automatically added to the documentation.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00345">Hazelnupp.cpp:345</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Value_html"><divclass="ttname"><ahref="classHazelnp_1_1Value.html">Hazelnp::Value</a></div><divclass="ttdoc">Abstract class for values.</div><divclass="ttdef"><b>Definition:</b><ahref="Value_8h_source.html#l00010">Value.h:10</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a1b810cc7db2cf64aecaa70c686b14bb7"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a1b810cc7db2cf64aecaa70c686b14bb7">Hazelnp::Hazelnupp::GetCrashOnFail</a></div><divclass="ttdeci">bool GetCrashOnFail() const</div><divclass="ttdoc">Gets whether the application crashes on an exception whilst parsing, and prints to stderr.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00329">Hazelnupp.cpp:329</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_aabab94412ff5eecf95b97a4e21eb9cf6"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#aabab94412ff5eecf95b97a4e21eb9cf6">Hazelnp::Hazelnupp::HasDescription</a></div><divclass="ttdeci">bool HasDescription(const std::string &parameter) const</div><divclass="ttdoc">Returns whether or not a given parameter has a registered description.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00373">Hazelnupp.cpp:373</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a60e0a51cd92014a87e44322158e45872"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a60e0a51cd92014a87e44322158e45872">Hazelnp::Hazelnupp::SetCatchHelp</a></div><divclass="ttdeci">void SetCatchHelp(bool catchHelp)</div><divclass="ttdoc">Sets whether the Hazelnupp should automatically catch the –help parameter, print the parameter docume...</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00334">Hazelnupp.cpp:334</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a05a3d112bcc00cdeade76f3643ba9e94"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a05a3d112bcc00cdeade76f3643ba9e94">Hazelnp::Hazelnupp::GetCatchHelp</a></div><divclass="ttdeci">bool GetCatchHelp() const</div><divclass="ttdoc">Retruns whether the Hazelnupp should automatically catch the –help parameter, print the parameter doc...</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00340">Hazelnupp.cpp:340</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a8b79a79d40420ae748c108c691111040"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a8b79a79d40420ae748c108c691111040">Hazelnp::Hazelnupp::HasParam</a></div><divclass="ttdeci">bool HasParam(const std::string &key) const</div><divclass="ttdoc">Will check wether a parameter exists given a key, or not.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00165">Hazelnupp.cpp:165</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a1ccb88faca1a8deb77161888479c300b"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a1ccb88faca1a8deb77161888479c300b">Hazelnp::Hazelnupp::Parse</a></div><divclass="ttdeci">void Parse(const int argc, const char *const *argv)</div><divclass="ttdoc">Will parse command line arguments.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00036">Hazelnupp.cpp:36</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a26eaac65949072b659531444d32c4cbf"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a26eaac65949072b659531444d32c4cbf">Hazelnp::Hazelnupp::ClearDescription</a></div><divclass="ttdeci">void ClearDescription(const std::string &parameter)</div><divclass="ttdoc">Will delete the description of a parameter if it exists.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00378">Hazelnupp.cpp:378</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_abf1e0ebf0207ca2327fcde81f7372124"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#abf1e0ebf0207ca2327fcde81f7372124">Hazelnp::Hazelnupp::RegisterAbbreviation</a></div><divclass="ttdeci">void RegisterAbbreviation(const std::string &abbrev, const std::string &target)</div><divclass="ttdoc">Will register an abbreviation (like -f for –force)</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00567">Hazelnupp.cpp:567</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a579e78129f19cb9f17a6075366ababe5"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a579e78129f19cb9f17a6075366ababe5">Hazelnp::Hazelnupp::GetAbbreviation</a></div><divclass="ttdeci">const std::string & GetAbbreviation(const std::string &abbrev) const</div><divclass="ttdoc">Will return the long form of an abbreviation (like –force for -f) Returns "" if no match is found.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00573">Hazelnupp.cpp:573</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_ae266cfb3526b9223fc05beb01646fb42"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#ae266cfb3526b9223fc05beb01646fb42">Hazelnp::Hazelnupp::ClearDescriptions</a></div><divclass="ttdeci">void ClearDescriptions()</div><divclass="ttdoc">Will delete all parameter descriptions.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00385">Hazelnupp.cpp:385</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_add731b65fb0741e4fb0b8fc8a601a11d"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#add731b65fb0741e4fb0b8fc8a601a11d">Hazelnp::Hazelnupp::RegisterConstraint</a></div><divclass="ttdeci">void RegisterConstraint(const std::string &key, const ParamConstraint &constraint)</div><divclass="ttdoc">Will register a constraint for a parameter.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00598">Hazelnupp.cpp:598</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a300e55438cb0983b02347fdc3653e32c"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a300e55438cb0983b02347fdc3653e32c">Hazelnp::Hazelnupp::GetDescription</a></div><divclass="ttdeci">const std::string & GetDescription(const std::string &parameter) const</div><divclass="ttdoc">Will return a short description for a parameter, if it exists.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00362">Hazelnupp.cpp:362</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a63d6bdfc0d6255b5d663f3a786077eb4"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a63d6bdfc0d6255b5d663f3a786077eb4">Hazelnp::Hazelnupp::ClearConstraint</a></div><divclass="ttdeci">void ClearConstraint(const std::string &parameter)</div><divclass="ttdoc">Will the constraint of a specific parameter.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00547">Hazelnupp.cpp:547</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a46df7d396fb56e30351c9a7308792200"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a46df7d396fb56e30351c9a7308792200">Hazelnp::Hazelnupp::HasAbbreviation</a></div><divclass="ttdeci">bool HasAbbreviation(const std::string &abbrev) const</div><divclass="ttdoc">Will check wether or not an abbreviation is registered.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00581">Hazelnupp.cpp:581</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a17845623ca686caa51f3c8254e85551e"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a17845623ca686caa51f3c8254e85551e">Hazelnp::Hazelnupp::SetCrashOnFail</a></div><divclass="ttdeci">void SetCrashOnFail(bool crashOnFail)</div><divclass="ttdoc">Sets whether to crash the application, and print to stderr, when an exception is raised whilst parsin...</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00611">Hazelnupp.cpp:611</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a17883db87e97caad4a0f114f9f850f5e"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a17883db87e97caad4a0f114f9f850f5e">Hazelnp::Hazelnupp::RegisterDescription</a></div><divclass="ttdeci">void RegisterDescription(const std::string &parameter, const std::string &description)</div><divclass="ttdoc">Willl register a short description for a parameter.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00356">Hazelnupp.cpp:356</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1Hazelnupp_html_a05d1decbb08d1f9368bc9a0d3dfd6398"><divclass="ttname"><ahref="classHazelnp_1_1Hazelnupp.html#a05d1decbb08d1f9368bc9a0d3dfd6398">Hazelnp::Hazelnupp::ClearAbbreviation</a></div><divclass="ttdeci">void ClearAbbreviation(const std::string &abbrevation)</div><divclass="ttdoc">Will delete the abbreviation for a given parameter.</div><divclass="ttdef"><b>Definition:</b><ahref="Hazelnupp_8cpp_source.html#l00586">Hazelnupp.cpp:586</a></div></div>