File: incroncfg_8h_source.html

package info (click to toggle)
incron 0.5.10-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,560 kB
  • sloc: cpp: 3,045; makefile: 108; sh: 84
file content (114 lines) | stat: -rw-r--r-- 6,578 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!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"/>
<title>incron: incroncfg.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">incron
   &#160;<span id="projectnumber">0.5.10</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">incroncfg.h</div>  </div>
</div>
<div class="contents">
<a href="incroncfg_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00003"></a>00003 
<a name="l00017"></a>00017 <span class="preprocessor">#ifndef INCRONCFG_H_</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define INCRONCFG_H_</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;cstring&gt;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;map&gt;</span>
<a name="l00023"></a>00023 
<a name="l00025"></a>00025 
<a name="l00030"></a><a class="code" href="classIncronCfg.html">00030</a> <span class="keyword">class </span><a class="code" href="classIncronCfg.html" title="Configuration class.">IncronCfg</a>
<a name="l00031"></a>00031 {
<a name="l00032"></a>00032 <span class="keyword">public</span>:
<a name="l00033"></a>00033 
<a name="l00035"></a>00035   <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classIncronCfg.html#a9fe219f0d98b358a32fd4e58804f1213" title="Initializes default configuration values.">Init</a>();
<a name="l00036"></a>00036 
<a name="l00038"></a>00038 
<a name="l00047"></a>00047   <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classIncronCfg.html#ac75ef9eab5f3878c4470b08231afd1e1" title="Loads configuration values.">Load</a>(<span class="keyword">const</span> std::string&amp; rPath);
<a name="l00048"></a>00048 
<a name="l00050"></a>00050 
<a name="l00059"></a>00059   <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classIncronCfg.html#abcb3d392c025d0d93f9c9c49ef8f7d42" title="Retrieves a configuration value.">GetValue</a>(<span class="keyword">const</span> std::string&amp; rKey, std::string&amp; rVal);
<a name="l00060"></a>00060   
<a name="l00062"></a>00062 
<a name="l00071"></a>00071   <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classIncronCfg.html#abcb3d392c025d0d93f9c9c49ef8f7d42" title="Retrieves a configuration value.">GetValue</a>(<span class="keyword">const</span> std::string&amp; rKey, <span class="keywordtype">int</span>&amp; rVal);
<a name="l00072"></a>00072   
<a name="l00074"></a>00074 
<a name="l00083"></a>00083   <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classIncronCfg.html#abcb3d392c025d0d93f9c9c49ef8f7d42" title="Retrieves a configuration value.">GetValue</a>(<span class="keyword">const</span> std::string&amp; rKey, <span class="keywordtype">unsigned</span>&amp; rVal);
<a name="l00084"></a>00084   
<a name="l00086"></a>00086 
<a name="l00095"></a>00095   <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classIncronCfg.html#abcb3d392c025d0d93f9c9c49ef8f7d42" title="Retrieves a configuration value.">GetValue</a>(<span class="keyword">const</span> std::string&amp; rKey, <span class="keywordtype">bool</span>&amp; rVal);
<a name="l00096"></a>00096   
<a name="l00098"></a>00098 
<a name="l00105"></a>00105   <span class="keyword">static</span> std::string <a class="code" href="classIncronCfg.html#a68271df7c649d11b4c405422f21d779b" title="Builds a file path.">BuildPath</a>(<span class="keyword">const</span> std::string&amp; rPath, <span class="keyword">const</span> std::string&amp; rName);
<a name="l00106"></a>00106   
<a name="l00107"></a>00107 <span class="keyword">protected</span>:
<a name="l00109"></a>00109 
<a name="l00115"></a>00115   <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classIncronCfg.html#afe4381ce8e57579dd59097192bd75ac6" title="Parses a line a attempts to get a key and a value.">ParseLine</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* s, std::string&amp; rKey, std::string&amp; rVal);
<a name="l00116"></a>00116   
<a name="l00118"></a>00118 
<a name="l00122"></a>00122   <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classIncronCfg.html#ab995e931ef67fc62a833227332a10735" title="Checks whether a line is a comment.">IsComment</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* s);
<a name="l00123"></a>00123 
<a name="l00124"></a>00124 <span class="keyword">private</span>:
<a name="l00125"></a>00125   <span class="keyword">static</span> std::map&lt;std::string, std::string&gt; m_values;
<a name="l00126"></a>00126   <span class="keyword">static</span> std::map&lt;std::string, std::string&gt; m_defaults;
<a name="l00127"></a>00127 };
<a name="l00128"></a>00128 
<a name="l00129"></a>00129 <span class="preprocessor">#endif </span><span class="comment">/*INCRONCFG_H_*/</span>
</pre></div></div>
</div>


<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>