<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Compute Library
-  <span id="projectnumber">18.02</span>
+  <span id="projectnumber">18.05</span>
</div>
</td>
</tr>
<div class="title">SimpleOption.h</div> </div>
</div><!--header-->
<div class="contents">
-<a href="_simple_option_8h.xhtml">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="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2017 ARM Limited.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * of this software and associated documentation files (the "Software"), to</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * deal in the Software without restriction, including without limitation the</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * sell copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#ifndef ARM_COMPUTE_TEST_SIMPLEOPTION</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#define ARM_COMPUTE_TEST_SIMPLEOPTION</span></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="preprocessor">#include "<a class="code" href="_option_8h.xhtml">Option.h</a>"</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <sstream></span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include <stdexcept></span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include <string></span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">namespace </span><a class="code" href="namespacearm__compute.xhtml">arm_compute</a></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> {</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">namespace </span>test</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">namespace </span>framework</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> {</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml"> 41</a></span> <span class="keyword">class </span><a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml">SimpleOption</a> : <span class="keyword">public</span> <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_option.xhtml">Option</a></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> {</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keyword">using</span> <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_option.xhtml#a8432d7cd1d4ea8732a64e9df51147cbf">Option::Option</a>;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a53b7b0b7aee13285e6d841dc184c054b">SimpleOption</a>(std::string <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_option.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">name</a>, T default_value);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keywordtype">bool</span> <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#aba9622f1f4bc66fcba246f30d4175a4f">parse</a>(std::string <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a20f4a96fd8932e0b4d89c65f95991bc9">value</a>) <span class="keyword">override</span>;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  std::string <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#ae6038fe1a77c4b08a678530410f41efa">help</a>() <span class="keyword">const override</span>;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keyword">const</span> T &<a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a20f4a96fd8932e0b4d89c65f95991bc9">value</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="keyword">protected</span>:</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  T _value{};</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> };</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a53b7b0b7aee13285e6d841dc184c054b"> 62</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a53b7b0b7aee13285e6d841dc184c054b">SimpleOption<T>::SimpleOption</a>(std::string <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_option.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">name</a>, T default_value)</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  : <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_option.xhtml">Option</a>{ std::move(name), <span class="keyword">false</span>, <span class="keyword">true</span> }, _value{ std::move(default_value) }</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> {</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> }</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#aba9622f1f4bc66fcba246f30d4175a4f"> 68</a></span> <span class="keywordtype">bool</span> <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#aba9622f1f4bc66fcba246f30d4175a4f">SimpleOption<T>::parse</a>(std::string <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a20f4a96fd8932e0b4d89c65f95991bc9">value</a>)</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> {</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordflow">try</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  {</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  std::stringstream stream{ std::move(value) };</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  stream >> _value;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  _is_set = !stream.fail();</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">return</span> _is_set;</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  }</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">catch</span>(<span class="keyword">const</span> std::invalid_argument &)</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  {</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  }</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> }</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="keyword">template</span> <></div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#afeee88c6cc79c347f803741da7f325f0"> 84</a></span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#aba9622f1f4bc66fcba246f30d4175a4f">SimpleOption<std::string>::parse</a>(std::string <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a20f4a96fd8932e0b4d89c65f95991bc9">value</a>)</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> {</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  _value = std::move(value);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  _is_set = <span class="keyword">true</span>;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span> }</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#ae6038fe1a77c4b08a678530410f41efa"> 92</a></span> <span class="keyword">inline</span> std::string <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#ae6038fe1a77c4b08a678530410f41efa">SimpleOption<T>::help</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="keyword"></span>{</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keywordflow">return</span> <span class="stringliteral">"--"</span> + <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_option.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">name</a>() + <span class="stringliteral">"=VALUE - "</span> + _help;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span> }</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a20f4a96fd8932e0b4d89c65f95991bc9"> 98</a></span> <span class="keyword">inline</span> <span class="keyword">const</span> T &<a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a20f4a96fd8932e0b4d89c65f95991bc9">SimpleOption<T>::value</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="keyword"></span>{</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keywordflow">return</span> _value;</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> }</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span> } <span class="comment">// namespace framework</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span> } <span class="comment">// namespace test</span></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> } <span class="comment">// namespace arm_compute</span></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="preprocessor">#endif </span><span class="comment">/* ARM_COMPUTE_TEST_SIMPLEOPTION */</span><span class="preprocessor"></span></div><div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_simple_option_xhtml_aba9622f1f4bc66fcba246f30d4175a4f"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#aba9622f1f4bc66fcba246f30d4175a4f">arm_compute::test::framework::SimpleOption::parse</a></div><div class="ttdeci">bool parse(std::string value) override</div><div class="ttdoc">Parses the given string. </div><div class="ttdef"><b>Definition:</b> <a href="_simple_option_8h_source.xhtml#l00068">SimpleOption.h:68</a></div></div>
+<a href="_simple_option_8h.xhtml">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="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2017-2018 ARM Limited.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * of this software and associated documentation files (the "Software"), to</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * deal in the Software without restriction, including without limitation the</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * sell copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#ifndef ARM_COMPUTE_TEST_SIMPLEOPTION</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#define ARM_COMPUTE_TEST_SIMPLEOPTION</span></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="preprocessor">#include "<a class="code" href="_option_8h.xhtml">Option.h</a>"</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <sstream></span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include <stdexcept></span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include <string></span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">namespace </span><a class="code" href="namespacearm__compute.xhtml">arm_compute</a></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> {</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">namespace </span>test</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">namespace </span>framework</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> {</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml"> 41</a></span> <span class="keyword">class </span><a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml">SimpleOption</a> : <span class="keyword">public</span> <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_option.xhtml">Option</a></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> {</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keyword">using</span> <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_option.xhtml#a8432d7cd1d4ea8732a64e9df51147cbf">Option::Option</a>;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a53b7b0b7aee13285e6d841dc184c054b">SimpleOption</a>(std::string <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_option.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">name</a>, T default_value);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keywordtype">bool</span> <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#aba9622f1f4bc66fcba246f30d4175a4f">parse</a>(std::string <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a20f4a96fd8932e0b4d89c65f95991bc9">value</a>) <span class="keyword">override</span>;</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  std::string <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#ae6038fe1a77c4b08a678530410f41efa">help</a>() <span class="keyword">const override</span>;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="keyword">const</span> T &<a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a20f4a96fd8932e0b4d89c65f95991bc9">value</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> </div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="keyword">protected</span>:</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  T _value{};</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> };</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span> </div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a53b7b0b7aee13285e6d841dc184c054b"> 78</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a53b7b0b7aee13285e6d841dc184c054b">SimpleOption<T>::SimpleOption</a>(std::string <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_option.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">name</a>, T default_value)</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  : <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_option.xhtml">Option</a>{ std::move(name), <span class="keyword">false</span>, <span class="keyword">true</span> }, _value{ std::move(default_value) }</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> {</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> }</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#aba9622f1f4bc66fcba246f30d4175a4f"> 84</a></span> <span class="keywordtype">bool</span> <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#aba9622f1f4bc66fcba246f30d4175a4f">SimpleOption<T>::parse</a>(std::string <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a20f4a96fd8932e0b4d89c65f95991bc9">value</a>)</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> {</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordflow">try</span></div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  {</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  std::stringstream stream{ std::move(value) };</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  stream >> _value;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  _is_set = !stream.fail();</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordflow">return</span> _is_set;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  }</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordflow">catch</span>(<span class="keyword">const</span> std::invalid_argument &)</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  {</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  }</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span> }</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> </div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="keyword">template</span> <></div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#afeee88c6cc79c347f803741da7f325f0"> 100</a></span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#aba9622f1f4bc66fcba246f30d4175a4f">SimpleOption<std::string>::parse</a>(std::string <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a20f4a96fd8932e0b4d89c65f95991bc9">value</a>)</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> {</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  _value = std::move(value);</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  _is_set = <span class="keyword">true</span>;</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span> }</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span> </div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div><div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#ae6038fe1a77c4b08a678530410f41efa"> 108</a></span> <span class="keyword">inline</span> std::string <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#ae6038fe1a77c4b08a678530410f41efa">SimpleOption<T>::help</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="keyword"></span>{</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keywordflow">return</span> <span class="stringliteral">"--"</span> + <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_option.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">name</a>() + <span class="stringliteral">"=VALUE - "</span> + _help;</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> }</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span> </div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a20f4a96fd8932e0b4d89c65f95991bc9"> 114</a></span> <span class="keyword">inline</span> <span class="keyword">const</span> T &<a class="code" href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a20f4a96fd8932e0b4d89c65f95991bc9">SimpleOption<T>::value</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="keyword"></span>{</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keywordflow">return</span> _value;</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> }</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> } <span class="comment">// namespace framework</span></div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span> } <span class="comment">// namespace test</span></div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span> } <span class="comment">// namespace arm_compute</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="preprocessor">#endif </span><span class="comment">/* ARM_COMPUTE_TEST_SIMPLEOPTION */</span><span class="preprocessor"></span></div><div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_simple_option_xhtml_aba9622f1f4bc66fcba246f30d4175a4f"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#aba9622f1f4bc66fcba246f30d4175a4f">arm_compute::test::framework::SimpleOption::parse</a></div><div class="ttdeci">bool parse(std::string value) override</div><div class="ttdoc">Parses the given string. </div><div class="ttdef"><b>Definition:</b> <a href="_simple_option_8h_source.xhtml#l00084">SimpleOption.h:84</a></div></div>
<div class="ttc" id="_option_8h_xhtml"><div class="ttname"><a href="_option_8h.xhtml">Option.h</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_simple_option_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml">arm_compute::test::framework::SimpleOption</a></div><div class="ttdoc">Implementation of an option that accepts a single value. </div><div class="ttdef"><b>Definition:</b> <a href="_simple_option_8h_source.xhtml#l00041">SimpleOption.h:41</a></div></div>
-<div class="ttc" id="namespacearm__compute_xhtml"><div class="ttname"><a href="namespacearm__compute.xhtml">arm_compute</a></div><div class="ttdoc">This file contains all available output stages for GEMMLowp on OpenCL. </div><div class="ttdef"><b>Definition:</b> <a href="01__library_8dox_source.xhtml#l00001">01_library.dox:1</a></div></div>
-<div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_simple_option_xhtml_a53b7b0b7aee13285e6d841dc184c054b"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a53b7b0b7aee13285e6d841dc184c054b">arm_compute::test::framework::SimpleOption::SimpleOption</a></div><div class="ttdeci">SimpleOption(std::string name, T default_value)</div><div class="ttdoc">Construct the option with the given default value. </div><div class="ttdef"><b>Definition:</b> <a href="_simple_option_8h_source.xhtml#l00062">SimpleOption.h:62</a></div></div>
+<div class="ttc" id="namespacearm__compute_xhtml"><div class="ttname"><a href="namespacearm__compute.xhtml">arm_compute</a></div><div class="ttdoc">This file contains all available output stages for GEMMLowp on OpenCL. </div><div class="ttdef"><b>Definition:</b> <a href="00__introduction_8dox_source.xhtml#l00001">00_introduction.dox:1</a></div></div>
+<div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_simple_option_xhtml_a53b7b0b7aee13285e6d841dc184c054b"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a53b7b0b7aee13285e6d841dc184c054b">arm_compute::test::framework::SimpleOption::SimpleOption</a></div><div class="ttdeci">SimpleOption(std::string name, T default_value)</div><div class="ttdoc">Construct the option with the given default value. </div><div class="ttdef"><b>Definition:</b> <a href="_simple_option_8h_source.xhtml#l00078">SimpleOption.h:78</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_option_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_option.xhtml">arm_compute::test::framework::Option</a></div><div class="ttdoc">Abstract base class for a command line option. </div><div class="ttdef"><b>Definition:</b> <a href="_option_8h_source.xhtml#l00036">Option.h:36</a></div></div>
-<div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_simple_option_xhtml_ae6038fe1a77c4b08a678530410f41efa"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#ae6038fe1a77c4b08a678530410f41efa">arm_compute::test::framework::SimpleOption::help</a></div><div class="ttdeci">std::string help() const override</div><div class="ttdoc">Help message for the option. </div><div class="ttdef"><b>Definition:</b> <a href="_simple_option_8h_source.xhtml#l00092">SimpleOption.h:92</a></div></div>
+<div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_simple_option_xhtml_ae6038fe1a77c4b08a678530410f41efa"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#ae6038fe1a77c4b08a678530410f41efa">arm_compute::test::framework::SimpleOption::help</a></div><div class="ttdeci">std::string help() const override</div><div class="ttdoc">Help message for the option. </div><div class="ttdef"><b>Definition:</b> <a href="_simple_option_8h_source.xhtml#l00108">SimpleOption.h:108</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_option_xhtml_a8432d7cd1d4ea8732a64e9df51147cbf"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_option.xhtml#a8432d7cd1d4ea8732a64e9df51147cbf">arm_compute::test::framework::Option::Option</a></div><div class="ttdeci">Option(std::string name)</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> <a href="_option_8cpp_source.xhtml#l00032">Option.cpp:32</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_option_xhtml_a37627d5d5bba7f4a8690c71c2ab3cb07"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_option.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">arm_compute::test::framework::Option::name</a></div><div class="ttdeci">std::string name() const </div><div class="ttdoc">Name of the option. </div><div class="ttdef"><b>Definition:</b> <a href="_option_8cpp_source.xhtml#l00042">Option.cpp:42</a></div></div>
-<div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_simple_option_xhtml_a20f4a96fd8932e0b4d89c65f95991bc9"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a20f4a96fd8932e0b4d89c65f95991bc9">arm_compute::test::framework::SimpleOption::value</a></div><div class="ttdeci">const T & value() const </div><div class="ttdef"><b>Definition:</b> <a href="_simple_option_8h_source.xhtml#l00098">SimpleOption.h:98</a></div></div>
+<div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_simple_option_xhtml_a20f4a96fd8932e0b4d89c65f95991bc9"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_simple_option.xhtml#a20f4a96fd8932e0b4d89c65f95991bc9">arm_compute::test::framework::SimpleOption::value</a></div><div class="ttdeci">const T & value() const </div><div class="ttdoc">Get the option value. </div><div class="ttdef"><b>Definition:</b> <a href="_simple_option_8h_source.xhtml#l00114">SimpleOption.h:114</a></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_59425e443f801f1f2fd8bbe4959a3ccf.xhtml">tests</a></li><li class="navelem"><a class="el" href="dir_9e71e2da941d3cafc4d98a9f6ae3de4f.xhtml">framework</a></li><li class="navelem"><a class="el" href="dir_d247c927d0dc22626cf668ab2bd7f080.xhtml">command_line</a></li><li class="navelem"><a class="el" href="_simple_option_8h.xhtml">SimpleOption.h</a></li>
- <li class="footer">Generated on Thu Feb 22 2018 15:45:20 for Compute Library by
+ <li class="footer">Generated on Wed May 23 2018 11:36:37 for Compute Library by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
</ul>