<ahref="CmdArgsInterface_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 CmdArgsInterface 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 CmdArgsInterface 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, CmdArgsInterface 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, CmdArgsInterface will crash the application with output to stderr when an exception is thrown whilst parsing.</span></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a1026d98c23659b6d3d108b231806a1e3"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a1026d98c23659b6d3d108b231806a1e3">Hazelnp::CmdArgsInterface::GetCatchHelp</a></div><divclass="ttdeci">bool GetCatchHelp() const</div><divclass="ttdoc">Retruns whether the CmdArgsInterface should automatically catch the –help parameter,...</div><divclass="ttdef"><b>Definition:</b><ahref="CmdArgsInterface_8cpp_source.html#l00340">CmdArgsInterface.cpp:340</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html">Hazelnp::CmdArgsInterface</a></div><divclass="ttdoc">The main class to interface with.</div><divclass="ttdef"><b>Definition:</b><ahref="CmdArgsInterface_8h_source.html#l00011">CmdArgsInterface.h:11</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_adec82884377a5193f68dcc7b6ef69d8b"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#adec82884377a5193f68dcc7b6ef69d8b">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00542">CmdArgsInterface.cpp:542</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a019e48f48427e7caa76c964bd0f117d0"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a019e48f48427e7caa76c964bd0f117d0">Hazelnp::CmdArgsInterface::ClearAbbreviations</a></div><divclass="ttdeci">void ClearAbbreviations()</div><divclass="ttdoc">Will delete all abbreviations.</div><divclass="ttdef"><b>Definition:</b><ahref="CmdArgsInterface_8cpp_source.html#l00592">CmdArgsInterface.cpp:592</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_abf553ed4acabf9e1db357715bc10533c"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#abf553ed4acabf9e1db357715bc10533c">Hazelnp::CmdArgsInterface::SetCatchHelp</a></div><divclass="ttdeci">void SetCatchHelp(bool catchHelp)</div><divclass="ttdoc">Sets whether the CmdArgsInterface should automatically catch the –help parameter, print the parameter...</div><divclass="ttdef"><b>Definition:</b><ahref="CmdArgsInterface_8cpp_source.html#l00334">CmdArgsInterface.cpp:334</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a58b81709e631cee5f3db3f3f48611fe9"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a58b81709e631cee5f3db3f3f48611fe9">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00581">CmdArgsInterface.cpp:581</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_aa30222df012f357455f90e3620346bb2"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#aa30222df012f357455f90e3620346bb2">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00598">CmdArgsInterface.cpp:598</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a112d2d5e3fd1cf1507592389c8454984"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a112d2d5e3fd1cf1507592389c8454984">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00547">CmdArgsInterface.cpp:547</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_1CmdArgsInterface_html_aaccf591a74408aeb4363033fe8cb2224"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#aaccf591a74408aeb4363033fe8cb2224">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00567">CmdArgsInterface.cpp:567</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a3a7fa36fe69ee8bf3b400983a21ecd24"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a3a7fa36fe69ee8bf3b400983a21ecd24">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00165">CmdArgsInterface.cpp:165</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_ad472671fb12450b8d929418fbbffbe40"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#ad472671fb12450b8d929418fbbffbe40">Hazelnp::CmdArgsInterface::ClearConstraints</a></div><divclass="ttdeci">void ClearConstraints()</div><divclass="ttdoc">Will delete all constraints.</div><divclass="ttdef"><b>Definition:</b><ahref="CmdArgsInterface_8cpp_source.html#l00605">CmdArgsInterface.cpp:605</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a3e60c7a90c11bdc634d0f5d0dba5064c"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a3e60c7a90c11bdc634d0f5d0dba5064c">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00329">CmdArgsInterface.cpp:329</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a5003f826ee31c6365bf4b6e8b2c8d9f1"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a5003f826ee31c6365bf4b6e8b2c8d9f1">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00373">CmdArgsInterface.cpp:373</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a62889ce1faa90d0f20be3ae45803baa0"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a62889ce1faa90d0f20be3ae45803baa0">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00378">CmdArgsInterface.cpp:378</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a31f690bd95d5469d38af816183cbe3e7"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a31f690bd95d5469d38af816183cbe3e7">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00586">CmdArgsInterface.cpp:586</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a1f4845041e08b3335510de44fafaee19"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a1f4845041e08b3335510de44fafaee19">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00036">CmdArgsInterface.cpp:36</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a67ba6cb3176884c85dd56fc9084ab66a"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a67ba6cb3176884c85dd56fc9084ab66a">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00345">CmdArgsInterface.cpp:345</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a1945208a97707b2e3c654424f0760441"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a1945208a97707b2e3c654424f0760441">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00351">CmdArgsInterface.cpp:351</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_af5e43c1067fb6c1074d9be3427c7a415"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#af5e43c1067fb6c1074d9be3427c7a415">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00558">CmdArgsInterface.cpp:558</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a328dbc265e7ffa9ab526ed8aa755e107"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a328dbc265e7ffa9ab526ed8aa755e107">Hazelnp::CmdArgsInterface::ClearDescriptions</a></div><divclass="ttdeci">void ClearDescriptions()</div><divclass="ttdoc">Will delete all parameter descriptions.</div><divclass="ttdef"><b>Definition:</b><ahref="CmdArgsInterface_8cpp_source.html#l00385">CmdArgsInterface.cpp:385</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a9b9bc5c4443799ea847077e9cefb1927"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a9b9bc5c4443799ea847077e9cefb1927">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00391">CmdArgsInterface.cpp:391</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a6589d2e818ba32f2a3e5b5a6a5e2bf1e"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a6589d2e818ba32f2a3e5b5a6a5e2bf1e">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00356">CmdArgsInterface.cpp:356</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a89bc3f54d7ff0740549dbdf7b7f727e3"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a89bc3f54d7ff0740549dbdf7b7f727e3">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00362">CmdArgsInterface.cpp:362</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a1486bfef870e6502aefc23b11ce6caaf"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a1486bfef870e6502aefc23b11ce6caaf">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00573">CmdArgsInterface.cpp:573</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_afe83a815b21d37b3d2a6d0ef67137faf"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#afe83a815b21d37b3d2a6d0ef67137faf">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00553">CmdArgsInterface.cpp:553</a></div></div>
<divclass="ttc"id="aclassHazelnp_1_1CmdArgsInterface_html_a16a3a02f77d240d8cf51cd4ee1797113"><divclass="ttname"><ahref="classHazelnp_1_1CmdArgsInterface.html#a16a3a02f77d240d8cf51cd4ee1797113">Hazelnp::CmdArgsInterface::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="CmdArgsInterface_8cpp_source.html#l00611">CmdArgsInterface.cpp:611</a></div></div>