Show
Ignore:
Timestamp:
10/15/09 00:10:19 (15 years ago)
Author:
smidl
Message:

doc

Files:
1 copied

Legend:

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

    r656 r661  
    5959    </ul> 
    6060  </div> 
    61   <div class="navpath"><a class="el" href="dev_guide.html">BDM Use - in C++</a> 
     61  <div class="navpath"><a class="el" href="devguide.html">BDM Use - in C++</a> 
    6262  </div> 
    6363</div> 
     
    6565 
    6666 
    67 <h1><a class="anchor" id="ui_page">User Infos and their use </a></h1><dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classbdm_1_1UI.html" title="UI is an abstract class which collects all the auxiliary functions useful to prepare...">bdm::UI</a></dd> 
     67<h1><a class="anchor" id="ui">User Infos and their use </a></h1><dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classbdm_1_1UI.html" title="UI is an abstract class which collects all the auxiliary functions useful to prepare...">bdm::UI</a></dd> 
    6868<dd> 
    6969<a class="el" href="user__info_8h.html#a4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a></dd> 
     
    130130} 
    131131</pre></div><p>As you can see, the presence of a concrete Setting in the configuration file can be tested by the return value of these methods and the code initializing the default values can follow immediately. Imagine, for example, that the first attribute <code>ndat</code> is optional. Thereore, the default value is filled in the case that there is not any other in the configuration file (and so <a class="el" href="classbdm_1_1UI.html#acd1667e6fec99ec64dabcb3ca2ff922d">bdm::UI::get</a> method returs <code>false</code>). The second atribute, <code>prior</code>, is intended to be compulsory. This fact is specified by the last parameter of the templated <a class="el" href="classbdm_1_1UI.html#a1f3d45184f803e1256cfc896b43ed2f8">bdm::UI::build</a> method. In this case, the method throws an exception if there is not proper data in the configuration file.</p> 
    132 <p>The only difference between <a class="el" href="classbdm_1_1UI.html#a1f3d45184f803e1256cfc896b43ed2f8">bdm::UI::build</a> and <a class="el" href="classbdm_1_1UI.html#acd1667e6fec99ec64dabcb3ca2ff922d">bdm::UI::get</a> method is in the types of variables they are prepared to. The <a class="el" href="classbdm_1_1UI.html#a1f3d45184f803e1256cfc896b43ed2f8">bdm::UI::build&lt;T&gt;</a> method is used to initialize instances of classes derived from <a class="el" href="classbdm_1_1root.html" title="Root class of BDM objects.">bdm::root</a>. It allocates them dynamically and return just an pointer to the new instance. This way it is possible even to load instances of inherited classes without aneven knowing about it. Oppositely, all scalar values of types int, double, string, vec, ivec or mat are loaded by the <a class="el" href="classbdm_1_1UI.html#acd1667e6fec99ec64dabcb3ca2ff922d">bdm::UI::get</a> method with a static memory management. It is also capable to load arrays of templated type itpp::Array&lt;T&gt;.</p> 
     132<p>The only difference between <a class="el" href="classbdm_1_1UI.html#a1f3d45184f803e1256cfc896b43ed2f8">bdm::UI::build</a> and <a class="el" href="classbdm_1_1UI.html#acd1667e6fec99ec64dabcb3ca2ff922d">bdm::UI::get</a> method is in the types of variables they are prepared to. The <a class="el" href="classbdm_1_1UI.html#a1f3d45184f803e1256cfc896b43ed2f8">bdm::UI::build&lt;T&gt;</a> method is used to initialize instances of classes derived from <a class="el" href="classbdm_1_1root.html" title="Root class of BDM objects.">bdm::root</a>. It allocates them dynamically and return just an pointer to the new instance. This way it is possible even to load instances of inherited classes without aneven knowing about it. Oppositely, all scalar values of types int, double, string, vec, ivec or mat are loaded by the <a class="el" href="classbdm_1_1UI.html#acd1667e6fec99ec64dabcb3ca2ff922d">bdm::UI::get</a> method with a static memory management. It is also capable to load arrays of templated type <code>itpp::Array&lt;T&gt;</code>.</p> 
    133133<p>Saving is much more easier. For all the variable types, use the <a class="el" href="classbdm_1_1UI.html#ac83987949e6a9e79d6e093797ab7d917" title="A root descendant instance is stored in the new child Setting appended to the passed...">bdm::UI::save</a> method. </p> 
    134134</div> 
    135 <hr size="1"/><address style="text-align: right;"><small>Generated on Mon Oct 12 19:37:19 2009 for mixpp by&nbsp; 
     135<hr size="1"/><address style="text-align: right;"><small>Generated on Thu Oct 15 00:07:49 2009 for mixpp by&nbsp; 
    136136<a href="http://www.doxygen.org/index.html"> 
    137137<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>