Show
Ignore:
Timestamp:
10/12/09 13:49:39 (15 years ago)
Author:
mido
Message:

\doc directory cleaned a bit

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/doc/html/classbdm_1_1SettingResolver.html

    r641 r651  
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    2 <html xmlns="http://www.w3.org/1999/xhtml"> 
    3 <head> 
    4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 
     1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
     2<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 
    53<title>mixpp: bdm::SettingResolver Class Reference</title> 
    6 <link href="tabs.css" rel="stylesheet" type="text/css"/> 
    7 <link href="doxygen.css" rel="stylesheet" type="text/css"/> 
    8 </head> 
    9 <body> 
    10 <!-- Generated by Doxygen 1.6.1 --> 
     4<link href="tabs.css" rel="stylesheet" type="text/css"> 
     5<link href="doxygen.css" rel="stylesheet" type="text/css"> 
     6</head><body> 
     7<!-- Generated by Doxygen 1.5.9 --> 
    118<script type="text/javascript"> 
    129<!-- 
     
    7168</div> 
    7269<div class="contents"> 
    73 <h1>bdm::SettingResolver Class Reference</h1><!-- doxytag: class="bdm::SettingResolver" --><!-- doxytag: inherits="bdm::root" --> 
    74 <p>This class serves to expand links used within configuration files.   
    75 <a href="#_details">More...</a></p> 
    76 <hr/><a name="_details"></a><h2>Detailed Description</h2> 
    77 <p>This class serves to expand links used within configuration files. </p> 
    78 <p>Value of any type but string can be linked to some other value of the same type defined elsewhere in the current configuration file or even in some different configuration file.</p> 
    79 <p>Link have three parts, &lt;name&gt; : &lt;path&gt; &lt;@filename&gt;. Field &lt;name&gt; contains the name of the new setting, &lt;path&gt; is the relative path to the referenced setting, which has to be taken from the root Setting element. The last part &lt;@filename&gt; is optional, it contains filename in the case the link should refer to a variable stored in a different file. From the previous part &lt;path&gt;, it has to be separated by '@'.</p> 
     70<h1>bdm::SettingResolver Class Reference</h1><!-- doxytag: class="bdm::SettingResolver" --><!-- doxytag: inherits="bdm::root" -->This class serves to expand links used within configuration files.   
     71<a href="#_details">More...</a> 
     72<p> 
     73<code>#include &lt;<a class="el" href="user__info_8h_source.html">user_info.h</a>&gt;</code> 
     74<p> 
     75 
     76<p> 
     77<a href="classbdm_1_1SettingResolver-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> 
     78<tr><td></td></tr> 
     79<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> 
     80<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e2299746b95bf8af54a867aaf52fc8da"></a><!-- doxytag: member="bdm::SettingResolver::SettingResolver" ref="e2299746b95bf8af54a867aaf52fc8da" args="(const Setting &amp;potential_link)" --> 
     81&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1SettingResolver.html#e2299746b95bf8af54a867aaf52fc8da">SettingResolver</a> (const Setting &amp;potential_link)</td></tr> 
     82 
     83<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">If potential_link contains a link to some other setting, it is resolved here. Anyway, the Setting reference <a class="el" href="classbdm_1_1SettingResolver.html#adfcd0a81d025c52c8335b6aea07b498" title="Reference to a resolved link or to the original Setting in the case it does not contain...">result</a> is prepared for use. <br></td></tr> 
     84<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c8b29999710e2db98c1a3979e25e6bbc"></a><!-- doxytag: member="bdm::SettingResolver::~SettingResolver" ref="c8b29999710e2db98c1a3979e25e6bbc" args="()" --> 
     85&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1SettingResolver.html#c8b29999710e2db98c1a3979e25e6bbc">~SettingResolver</a> ()</td></tr> 
     86 
     87<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An opened <a class="el" href="classbdm_1_1UIFile.html" title="This class serves to load and/or save user-infos into/from configuration files stored...">UIFile</a> file is closed here if necessary. <br></td></tr> 
     88<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr> 
     89<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="adfcd0a81d025c52c8335b6aea07b498"></a><!-- doxytag: member="bdm::SettingResolver::result" ref="adfcd0a81d025c52c8335b6aea07b498" args="" --> 
     90const Setting &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1SettingResolver.html#adfcd0a81d025c52c8335b6aea07b498">result</a></td></tr> 
     91 
     92<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reference to a resolved link or to the original Setting in the case it does not contain a link. <br></td></tr> 
     93<tr><td colspan="2"><br><h2>Private Member Functions</h2></td></tr> 
     94<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af0e6941ba5919cae1bc530e2181b109"></a><!-- doxytag: member="bdm::SettingResolver::to_string" ref="af0e6941ba5919cae1bc530e2181b109" args="()" --> 
     95virtual string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#af0e6941ba5919cae1bc530e2181b109">to_string</a> ()</td></tr> 
     96 
     97<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method returns a basic info about the current instance. <br></td></tr> 
     98<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0551e3121091c5199bf4413b50522176"></a><!-- doxytag: member="bdm::SettingResolver::from_setting" ref="0551e3121091c5199bf4413b50522176" args="(const Setting &amp;set)" --> 
     99virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#0551e3121091c5199bf4413b50522176">from_setting</a> (const Setting &amp;set)</td></tr> 
     100 
     101<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method arrange instance properties according the data stored in the Setting structure. <br></td></tr> 
     102<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="67d954d255ede776eade7334d4895790"></a><!-- doxytag: member="bdm::SettingResolver::to_setting" ref="67d954d255ede776eade7334d4895790" args="(Setting &amp;set) const " --> 
     103virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#67d954d255ede776eade7334d4895790">to_setting</a> (Setting &amp;set) const </td></tr> 
     104 
     105<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method save all the instance properties into the Setting structure. <br></td></tr> 
     106<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1c314bd6d6dacb8ba78ea5eb88fd9516"></a><!-- doxytag: member="bdm::SettingResolver::validate" ref="1c314bd6d6dacb8ba78ea5eb88fd9516" args="()" --> 
     107virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#1c314bd6d6dacb8ba78ea5eb88fd9516">validate</a> ()</td></tr> 
     108 
     109<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method TODO. <br></td></tr> 
     110</table> 
     111<hr><a name="_details"></a><h2>Detailed Description</h2> 
     112This class serves to expand links used within configuration files.  
     113<p> 
     114Value of any type but string can be linked to some other value of the same type defined elsewhere in the current configuration file or even in some different configuration file.<p> 
     115Link have three parts, &lt;name&gt; : &lt;path&gt; &lt;@filename&gt;. Field &lt;name&gt; contains the name of the new setting, &lt;path&gt; is the relative path to the referenced setting, which has to be taken from the root Setting element. The last part &lt;@filename&gt; is optional, it contains filename in the case the link should refer to a variable stored in a different file. From the previous part &lt;path&gt;, it has to be separated by '@'.<p> 
    80116<div class="fragment"><pre class="fragment">    ... 
    81117        jardovo : 
    82118        { 
    83           <span class="keyword">class </span>= &quot;Car&quot;; 
     119          <span class="keyword">class </span>= "Car"; 
    84120          year = 1992; 
    85           manufacturer = <span class="stringliteral">&quot;liaz&quot;</span>; 
     121          manufacturer = <span class="stringliteral">"liaz"</span>; 
    86122          kilometers = 1555000; 
    87123        }; 
    88124        ondrejovo : 
    89125        { 
    90           <span class="keyword">class </span>= &quot;Bike&quot;; 
     126          <span class="keyword">class </span>= "Bike"; 
    91127          year = 1996; 
    92           manufacturer = <span class="stringliteral">&quot;author&quot;</span>; 
     128          manufacturer = <span class="stringliteral">"author"</span>; 
    93129          electricLights = <span class="keyword">true</span>; 
    94130          matr = ( 2, 2, [ 1.0, 0.0, 0.0, 1.0 ] ); 
     
    96132 
    97133<span class="preprocessor">        #this is the example of local link to another mean of transport</span> 
    98 <span class="preprocessor"></span>        elisky = <span class="stringliteral">&quot;jardovo&quot;</span>; 
     134<span class="preprocessor"></span>        elisky = <span class="stringliteral">"jardovo"</span>; 
    99135 
    100136        ... 
    101137 
    102         # And <span class="keyword">this</span> link is external link pointing to the file <span class="stringliteral">&quot;other_cars.cfg&quot;</span> stored in the 
    103 <span class="preprocessor">        # same directory. In that file, it refers to the local Setting &quot;magic_cars.skubankovo&quot;.</span> 
    104 <span class="preprocessor"></span>        kati = <span class="stringliteral">&quot;magic_cars.skubankovo@other_cars.cfg&quot;</span>; 
     138        # And <span class="keyword">this</span> link is external link pointing to the file <span class="stringliteral">"other_cars.cfg"</span> stored in the 
     139<span class="preprocessor">        # same directory. In that file, it refers to the local Setting "magic_cars.skubankovo".</span> 
     140<span class="preprocessor"></span>        kati = <span class="stringliteral">"magic_cars.skubankovo@other_cars.cfg"</span>; 
    105141 
    106142    ... 
    107 </pre></div><p>When you want to expand a possible linked setting "element" within your code, it has to be treated this way:</p> 
     143</pre></div><p> 
     144When you want to expand a possible linked setting "element" within your code, it has to be treated this way:<p> 
    108145<div class="fragment"><pre class="fragment">        ... 
    109146 
    110         <span class="keyword">const</span> <a class="code" href="classbdm_1_1SettingResolver.html#ae2299746b95bf8af54a867aaf52fc8da" title="If potential_link contains a link to some other setting, it is resolved here. Anyway...">SettingResolver</a> link( element ); 
     147        <span class="keyword">const</span> <a class="code" href="classbdm_1_1SettingResolver.html#e2299746b95bf8af54a867aaf52fc8da" title="If potential_link contains a link to some other setting, it is resolved here. Anyway...">SettingResolver</a> link( element ); 
    111148 
    112149        ... 
     
    115152 
    116153        ... 
    117 </pre></div><p>The whole point is that a resolved link (class member <a class="el" href="classbdm_1_1SettingResolver.html#aadfcd0a81d025c52c8335b6aea07b498" title="Reference to a resolved link or to the original Setting in the case it does not contain...">result</a>, i.e., "link.result" in the previous example) could point into a different configuration file. In that case there has to be an <a class="el" href="classbdm_1_1UIFile.html" title="This class serves to load and/or save user-infos into/from configuration files stored...">UIFile</a> instance managing reading from this file. As the libconfig::Config deletes all its Settings when dealocated, <a class="el" href="classbdm_1_1UIFile.html" title="This class serves to load and/or save user-infos into/from configuration files stored...">UIFile</a> must not be dealocated until all the necessary operation on the linked Setting are finished (otherwise, the link <a class="el" href="classbdm_1_1SettingResolver.html#aadfcd0a81d025c52c8335b6aea07b498" title="Reference to a resolved link or to the original Setting in the case it does not contain...">result</a> would be invalid just after the <a class="el" href="classbdm_1_1UIFile.html" title="This class serves to load and/or save user-infos into/from configuration files stored...">UIFile</a> dealocation). And that is exactly the mechanism implemented within <a class="el" href="classbdm_1_1SettingResolver.html" title="This class serves to expand links used within configuration files.">SettingResolver</a> class. It assures, that the <a class="el" href="classbdm_1_1SettingResolver.html#aadfcd0a81d025c52c8335b6aea07b498" title="Reference to a resolved link or to the original Setting in the case it does not contain...">result</a> Setting reference is valid within the scope of <a class="el" href="classbdm_1_1SettingResolver.html" title="This class serves to expand links used within configuration files.">SettingResolver</a> instance.</p> 
    118 <p><a class="el" href="ui_page.html">User Infos and their use</a> </p> 
    119  
    120 <p><code>#include &lt;<a class="el" href="user__info_8h_source.html">user_info.h</a>&gt;</code></p> 
    121  
    122 <p><a href="classbdm_1_1SettingResolver-members.html">List of all members.</a></p> 
    123 <table border="0" cellpadding="0" cellspacing="0"> 
    124 <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> 
    125 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae2299746b95bf8af54a867aaf52fc8da"></a><!-- doxytag: member="bdm::SettingResolver::SettingResolver" ref="ae2299746b95bf8af54a867aaf52fc8da" args="(const Setting &amp;potential_link)" --> 
    126 &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1SettingResolver.html#ae2299746b95bf8af54a867aaf52fc8da">SettingResolver</a> (const Setting &amp;potential_link)</td></tr> 
    127 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">If potential_link contains a link to some other setting, it is resolved here. Anyway, the Setting reference <a class="el" href="classbdm_1_1SettingResolver.html#aadfcd0a81d025c52c8335b6aea07b498" title="Reference to a resolved link or to the original Setting in the case it does not contain...">result</a> is prepared for use. <br/></td></tr> 
    128 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac8b29999710e2db98c1a3979e25e6bbc"></a><!-- doxytag: member="bdm::SettingResolver::~SettingResolver" ref="ac8b29999710e2db98c1a3979e25e6bbc" args="()" --> 
    129 &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1SettingResolver.html#ac8b29999710e2db98c1a3979e25e6bbc">~SettingResolver</a> ()</td></tr> 
    130 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An opened <a class="el" href="classbdm_1_1UIFile.html" title="This class serves to load and/or save user-infos into/from configuration files stored...">UIFile</a> file is closed here if necessary. <br/></td></tr> 
    131 <tr><td colspan="2"><h2>Public Attributes</h2></td></tr> 
    132 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aadfcd0a81d025c52c8335b6aea07b498"></a><!-- doxytag: member="bdm::SettingResolver::result" ref="aadfcd0a81d025c52c8335b6aea07b498" args="" --> 
    133 const Setting &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1SettingResolver.html#aadfcd0a81d025c52c8335b6aea07b498">result</a></td></tr> 
    134 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reference to a resolved link or to the original Setting in the case it does not contain a link. <br/></td></tr> 
    135 <tr><td colspan="2"><h2>Private Member Functions</h2></td></tr> 
    136 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaf0e6941ba5919cae1bc530e2181b109"></a><!-- doxytag: member="bdm::SettingResolver::to_string" ref="aaf0e6941ba5919cae1bc530e2181b109" args="()" --> 
    137 virtual string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#aaf0e6941ba5919cae1bc530e2181b109">to_string</a> ()</td></tr> 
    138 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method returns a basic info about the current instance. <br/></td></tr> 
    139 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0551e3121091c5199bf4413b50522176"></a><!-- doxytag: member="bdm::SettingResolver::from_setting" ref="a0551e3121091c5199bf4413b50522176" args="(const Setting &amp;set)" --> 
    140 virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#a0551e3121091c5199bf4413b50522176">from_setting</a> (const Setting &amp;set)</td></tr> 
    141 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method arrange instance properties according the data stored in the Setting structure. <br/></td></tr> 
    142 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a67d954d255ede776eade7334d4895790"></a><!-- doxytag: member="bdm::SettingResolver::to_setting" ref="a67d954d255ede776eade7334d4895790" args="(Setting &amp;set) const " --> 
    143 virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#a67d954d255ede776eade7334d4895790">to_setting</a> (Setting &amp;set) const </td></tr> 
    144 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method save all the instance properties into the Setting structure. <br/></td></tr> 
    145 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c314bd6d6dacb8ba78ea5eb88fd9516"></a><!-- doxytag: member="bdm::SettingResolver::validate" ref="a1c314bd6d6dacb8ba78ea5eb88fd9516" args="()" --> 
    146 virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#a1c314bd6d6dacb8ba78ea5eb88fd9516">validate</a> ()</td></tr> 
    147 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method TODO. <br/></td></tr> 
    148 </table> 
    149 <hr/>The documentation for this class was generated from the following files:<ul> 
    150 <li><a class="el" href="user__info_8h_source.html">user_info.h</a></li> 
    151 <li>user_info.cpp</li> 
    152 </ul> 
     154</pre></div><p> 
     155The whole point is that a resolved link (class member <a class="el" href="classbdm_1_1SettingResolver.html#adfcd0a81d025c52c8335b6aea07b498" title="Reference to a resolved link or to the original Setting in the case it does not contain...">result</a>, i.e., "link.result" in the previous example) could point into a different configuration file. In that case there has to be an <a class="el" href="classbdm_1_1UIFile.html" title="This class serves to load and/or save user-infos into/from configuration files stored...">UIFile</a> instance managing reading from this file. As the libconfig::Config deletes all its Settings when dealocated, <a class="el" href="classbdm_1_1UIFile.html" title="This class serves to load and/or save user-infos into/from configuration files stored...">UIFile</a> must not be dealocated until all the necessary operation on the linked Setting are finished (otherwise, the link <a class="el" href="classbdm_1_1SettingResolver.html#adfcd0a81d025c52c8335b6aea07b498" title="Reference to a resolved link or to the original Setting in the case it does not contain...">result</a> would be invalid just after the <a class="el" href="classbdm_1_1UIFile.html" title="This class serves to load and/or save user-infos into/from configuration files stored...">UIFile</a> dealocation). And that is exactly the mechanism implemented within <a class="el" href="classbdm_1_1SettingResolver.html" title="This class serves to expand links used within configuration files.">SettingResolver</a> class. It assures, that the <a class="el" href="classbdm_1_1SettingResolver.html#adfcd0a81d025c52c8335b6aea07b498" title="Reference to a resolved link or to the original Setting in the case it does not contain...">result</a> Setting reference is valid within the scope of <a class="el" href="classbdm_1_1SettingResolver.html" title="This class serves to expand links used within configuration files.">SettingResolver</a> instance.<p> 
     156<a class="el" href="ui_page.html">User Infos and their use</a> <hr>The documentation for this class was generated from the following files:<ul> 
     157<li><a class="el" href="user__info_8h_source.html">user_info.h</a><li>user_info.cpp</ul> 
    153158</div> 
    154 <hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 27 00:49:05 2009 for mixpp by&nbsp; 
     159<hr size="1"><address style="text-align: right;"><small>Generated on Wed Oct 7 17:34:46 2009 for mixpp by&nbsp; 
    155160<a href="http://www.doxygen.org/index.html"> 
    156 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> 
     161<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> 
    157162</body> 
    158163</html>