67 lines
10 KiB
HTML
67 lines
10 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.14"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>xdgcfg: src/xdgcfg.hpp Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="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="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">xdgcfg
|
|
 <span id="projectnumber">0.1.0</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.14 -->
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',false,false,'search.php','Search');
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">xdgcfg.hpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/* Public Domain / CC-0</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Author: tastytea <tastytea@tastytea.de></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> </div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#ifndef XDGCFG_HPP</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#define XDGCFG_HPP</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include <string></span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#include <cstdint></span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#include <libconfig.h++></span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> </div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="keyword">using</span> std::string;</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="keyword">using</span> std::uint_fast8_t;</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> </div><div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="classxdgcfg.html"> 15</a></span> <span class="keyword">class </span><a class="code" href="classxdgcfg.html">xdgcfg</a></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> {</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="keyword">explicit</span> <a class="code" href="classxdgcfg.html#ab6fc4f07be696a779d26317a5a7a8b54">xdgcfg</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &filename, <span class="keyword">const</span> <span class="keywordtype">string</span> &subdir = <span class="stringliteral">""</span>);</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keyword">const</span> uint_fast8_t <a class="code" href="classxdgcfg.html#ab92fdc541bdb0ee8cb845d729c960646">read</a>();</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classxdgcfg.html#a4bf7465325cd7de83169f206be9b11a8">write</a>();</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> </div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  libconfig::Config &<a class="code" href="classxdgcfg.html#ac07980ed9c75aded9db7d9a56e9e7dbf">get_cfg</a>();</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="classxdgcfg.html#a33eeb5848fc8fad11b5a0ff078d80fc3">get_filepath</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keyword">const</span> <span class="keywordtype">void</span> <a class="code" href="classxdgcfg.html#af47ec5920fc1580ea064e2c49c64c3b5">set_verbose</a>(<span class="keywordtype">bool</span> verbose);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classxdgcfg.html#a2f274a69581223de5a8aa2d93089895e">get_verbose</a>() <span class="keyword">const</span>;</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="keyword">private</span>:</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  libconfig::Config _cfg;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keywordtype">string</span> _filepath;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> </div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordtype">bool</span> _verbose;</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> </div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="preprocessor">#endif // XDGCFG_HPP</span></div><div class="ttc" id="classxdgcfg_html_a33eeb5848fc8fad11b5a0ff078d80fc3"><div class="ttname"><a href="classxdgcfg.html#a33eeb5848fc8fad11b5a0ff078d80fc3">xdgcfg::get_filepath</a></div><div class="ttdeci">const string get_filepath() const</div><div class="ttdoc">Returns the complete filepath. </div><div class="ttdef"><b>Definition:</b> xdgcfg.cpp:95</div></div>
|
|
<div class="ttc" id="classxdgcfg_html_a4bf7465325cd7de83169f206be9b11a8"><div class="ttname"><a href="classxdgcfg.html#a4bf7465325cd7de83169f206be9b11a8">xdgcfg::write</a></div><div class="ttdeci">const bool write()</div><div class="ttdoc">Write the file. </div><div class="ttdef"><b>Definition:</b> xdgcfg.cpp:71</div></div>
|
|
<div class="ttc" id="classxdgcfg_html"><div class="ttname"><a href="classxdgcfg.html">xdgcfg</a></div><div class="ttdef"><b>Definition:</b> xdgcfg.hpp:15</div></div>
|
|
<div class="ttc" id="classxdgcfg_html_af47ec5920fc1580ea064e2c49c64c3b5"><div class="ttname"><a href="classxdgcfg.html#af47ec5920fc1580ea064e2c49c64c3b5">xdgcfg::set_verbose</a></div><div class="ttdeci">const void set_verbose(bool verbose)</div><div class="ttdoc">Sets verbosity. </div><div class="ttdef"><b>Definition:</b> xdgcfg.cpp:100</div></div>
|
|
<div class="ttc" id="classxdgcfg_html_ab6fc4f07be696a779d26317a5a7a8b54"><div class="ttname"><a href="classxdgcfg.html#ab6fc4f07be696a779d26317a5a7a8b54">xdgcfg::xdgcfg</a></div><div class="ttdeci">xdgcfg(const string &filename, const string &subdir="")</div><div class="ttdoc">Checks if subdir is present, creates it if necessary. </div><div class="ttdef"><b>Definition:</b> xdgcfg.cpp:23</div></div>
|
|
<div class="ttc" id="classxdgcfg_html_ac07980ed9c75aded9db7d9a56e9e7dbf"><div class="ttname"><a href="classxdgcfg.html#ac07980ed9c75aded9db7d9a56e9e7dbf">xdgcfg::get_cfg</a></div><div class="ttdeci">libconfig::Config & get_cfg()</div><div class="ttdoc">Returns a reference to the config as libconfig::Config. </div><div class="ttdef"><b>Definition:</b> xdgcfg.cpp:90</div></div>
|
|
<div class="ttc" id="classxdgcfg_html_ab92fdc541bdb0ee8cb845d729c960646"><div class="ttname"><a href="classxdgcfg.html#ab92fdc541bdb0ee8cb845d729c960646">xdgcfg::read</a></div><div class="ttdeci">const uint_fast8_t read()</div><div class="ttdoc">Read the file. </div><div class="ttdef"><b>Definition:</b> xdgcfg.cpp:43</div></div>
|
|
<div class="ttc" id="classxdgcfg_html_a2f274a69581223de5a8aa2d93089895e"><div class="ttname"><a href="classxdgcfg.html#a2f274a69581223de5a8aa2d93089895e">xdgcfg::get_verbose</a></div><div class="ttdeci">const bool get_verbose() const</div><div class="ttdoc">Returns verbosity. </div><div class="ttdef"><b>Definition:</b> xdgcfg.cpp:105</div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.14
|
|
</small></address>
|
|
</body>
|
|
</html>
|