Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 9a9cef5a3a2b597a6e4663b51cfdf030 > files > 33

incron-0.5.12-3.mga7.armv7hl.rpm

<!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 Class Reference</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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-static-methods">Static Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">IncronCfg Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="IncronCfg" -->
<p>Configuration class.  
 <a href="classIncronCfg.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="incroncfg_8h_source.html">incroncfg.h</a>&gt;</code></p>

<p><a href="classIncronCfg-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIncronCfg.html#a9fe219f0d98b358a32fd4e58804f1213">Init</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes default configuration values.  <a href="#a9fe219f0d98b358a32fd4e58804f1213"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIncronCfg.html#ac75ef9eab5f3878c4470b08231afd1e1">Load</a> (const std::string &amp;rPath)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads configuration values.  <a href="#ac75ef9eab5f3878c4470b08231afd1e1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIncronCfg.html#abcb3d392c025d0d93f9c9c49ef8f7d42">GetValue</a> (const std::string &amp;rKey, std::string &amp;rVal)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves a configuration value.  <a href="#abcb3d392c025d0d93f9c9c49ef8f7d42"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIncronCfg.html#a7d895e75750a5db599e7583cdfd3ea71">GetValue</a> (const std::string &amp;rKey, int &amp;rVal)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves a configuration value.  <a href="#a7d895e75750a5db599e7583cdfd3ea71"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIncronCfg.html#adaf0adc9641cc14ed6f889cd3d317deb">GetValue</a> (const std::string &amp;rKey, unsigned &amp;rVal)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves a configuration value.  <a href="#adaf0adc9641cc14ed6f889cd3d317deb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIncronCfg.html#ad0542b2131c813fdce5f704b399ebaab">GetValue</a> (const std::string &amp;rKey, bool &amp;rVal)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves a configuration value.  <a href="#ad0542b2131c813fdce5f704b399ebaab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIncronCfg.html#a68271df7c649d11b4c405422f21d779b">BuildPath</a> (const std::string &amp;rPath, const std::string &amp;rName)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Builds a file path.  <a href="#a68271df7c649d11b4c405422f21d779b"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIncronCfg.html#afe4381ce8e57579dd59097192bd75ac6">ParseLine</a> (const char *s, std::string &amp;rKey, std::string &amp;rVal)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses a line a attempts to get a key and a value.  <a href="#afe4381ce8e57579dd59097192bd75ac6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIncronCfg.html#ab995e931ef67fc62a833227332a10735">IsComment</a> (const char *s)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether a line is a comment.  <a href="#ab995e931ef67fc62a833227332a10735"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Configuration class. </p>
<p>This class provides access to values loaded from a configuration file (either a explicitly specified one or the default one). </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a68271df7c649d11b4c405422f21d779b"></a><!-- doxytag: member="IncronCfg::BuildPath" ref="a68271df7c649d11b4c405422f21d779b" args="(const std::string &amp;rPath, const std::string &amp;rName)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string IncronCfg::BuildPath </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>rPath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>rName</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Builds a file path. </p>
<p>This function composes a path from a base path and a file name.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rPath</td><td>base path </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rName</td><td>file name </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>full path </dd></dl>

</div>
</div>
<a class="anchor" id="abcb3d392c025d0d93f9c9c49ef8f7d42"></a><!-- doxytag: member="IncronCfg::GetValue" ref="abcb3d392c025d0d93f9c9c49ef8f7d42" args="(const std::string &amp;rKey, std::string &amp;rVal)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool IncronCfg::GetValue </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>rKey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>rVal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieves a configuration value. </p>
<p>This method attempts to find the appropriate configuration value for the given key and stores it into the given variable.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rKey</td><td>value key </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">rVal</td><td>retrieved value </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true = success, false = failure (invalid key) </dd></dl>

</div>
</div>
<a class="anchor" id="a7d895e75750a5db599e7583cdfd3ea71"></a><!-- doxytag: member="IncronCfg::GetValue" ref="a7d895e75750a5db599e7583cdfd3ea71" args="(const std::string &amp;rKey, int &amp;rVal)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool IncronCfg::GetValue </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>rKey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>rVal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieves a configuration value. </p>
<p>This method attempts to find the appropriate configuration value for the given key and stores it into the given variable.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rKey</td><td>value key </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">rVal</td><td>retrieved value </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true = success, false = failure (invalid key) </dd></dl>

</div>
</div>
<a class="anchor" id="adaf0adc9641cc14ed6f889cd3d317deb"></a><!-- doxytag: member="IncronCfg::GetValue" ref="adaf0adc9641cc14ed6f889cd3d317deb" args="(const std::string &amp;rKey, unsigned &amp;rVal)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool IncronCfg::GetValue </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>rKey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned &amp;&#160;</td>
          <td class="paramname"><em>rVal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieves a configuration value. </p>
<p>This method attempts to find the appropriate configuration value for the given key and stores it into the given variable.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rKey</td><td>value key </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">rVal</td><td>retrieved value </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true = success, false = failure (invalid key) </dd></dl>

</div>
</div>
<a class="anchor" id="ad0542b2131c813fdce5f704b399ebaab"></a><!-- doxytag: member="IncronCfg::GetValue" ref="ad0542b2131c813fdce5f704b399ebaab" args="(const std::string &amp;rKey, bool &amp;rVal)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool IncronCfg::GetValue </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>rKey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool &amp;&#160;</td>
          <td class="paramname"><em>rVal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieves a configuration value. </p>
<p>This method attempts to find the appropriate configuration value for the given key and stores it into the given variable.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rKey</td><td>value key </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">rVal</td><td>retrieved value </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true = success, false = failure (invalid key) </dd></dl>

</div>
</div>
<a class="anchor" id="a9fe219f0d98b358a32fd4e58804f1213"></a><!-- doxytag: member="IncronCfg::Init" ref="a9fe219f0d98b358a32fd4e58804f1213" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IncronCfg::Init </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initializes default configuration values. </p>

</div>
</div>
<a class="anchor" id="ab995e931ef67fc62a833227332a10735"></a><!-- doxytag: member="IncronCfg::IsComment" ref="ab995e931ef67fc62a833227332a10735" args="(const char *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool IncronCfg::IsComment </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td><code> [static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Checks whether a line is a comment. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>text line </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true = comment, false = otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="ac75ef9eab5f3878c4470b08231afd1e1"></a><!-- doxytag: member="IncronCfg::Load" ref="ac75ef9eab5f3878c4470b08231afd1e1" args="(const std::string &amp;rPath)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IncronCfg::Load </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>rPath</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Loads configuration values. </p>
<p>This method attempts to load configuration values from the specified file. If it fails (e.g. the file doesn't exist) the default file is read. As the last resort (for the case the default file can't be loaded) the hard-wired values are used.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rPath</td><td>configuration file path </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="afe4381ce8e57579dd59097192bd75ac6"></a><!-- doxytag: member="IncronCfg::ParseLine" ref="afe4381ce8e57579dd59097192bd75ac6" args="(const char *s, std::string &amp;rKey, std::string &amp;rVal)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool IncronCfg::ParseLine </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>rKey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>rVal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parses a line a attempts to get a key and a value. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>text line </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">rKey</td><td>key </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">rVal</td><td>value </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true = success, false = failure </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="incroncfg_8h_source.html">incroncfg.h</a></li>
<li><a class="el" href="incroncfg_8cpp.html">incroncfg.cpp</a></li>
</ul>
</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>