| 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"/> | 
|---|
| 5 | <title>mixpp: bdm::UIFile 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 --> | 
|---|
| 11 | <script type="text/javascript"> | 
|---|
| 12 | <!-- | 
|---|
| 13 | function changeDisplayState (e){ | 
|---|
| 14 |   var num=this.id.replace(/[^[0-9]/g,''); | 
|---|
| 15 |   var button=this.firstChild; | 
|---|
| 16 |   var sectionDiv=document.getElementById('dynsection'+num); | 
|---|
| 17 |   if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ | 
|---|
| 18 |     sectionDiv.style.display='block'; | 
|---|
| 19 |     button.src='open.gif'; | 
|---|
| 20 |   }else{ | 
|---|
| 21 |     sectionDiv.style.display='none'; | 
|---|
| 22 |     button.src='closed.gif'; | 
|---|
| 23 |   } | 
|---|
| 24 | } | 
|---|
| 25 | function initDynSections(){ | 
|---|
| 26 |   var divs=document.getElementsByTagName('div'); | 
|---|
| 27 |   var sectionCounter=1; | 
|---|
| 28 |   for(var i=0;i<divs.length-1;i++){ | 
|---|
| 29 |     if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ | 
|---|
| 30 |       var header=divs[i]; | 
|---|
| 31 |       var section=divs[i+1]; | 
|---|
| 32 |       var button=header.firstChild; | 
|---|
| 33 |       if (button!='IMG'){ | 
|---|
| 34 |         divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); | 
|---|
| 35 |         button=document.createElement('img'); | 
|---|
| 36 |         divs[i].insertBefore(button,divs[i].firstChild); | 
|---|
| 37 |       } | 
|---|
| 38 |       header.style.cursor='pointer'; | 
|---|
| 39 |       header.onclick=changeDisplayState; | 
|---|
| 40 |       header.id='dynheader'+sectionCounter; | 
|---|
| 41 |       button.src='closed.gif'; | 
|---|
| 42 |       section.id='dynsection'+sectionCounter; | 
|---|
| 43 |       section.style.display='none'; | 
|---|
| 44 |       section.style.marginLeft='14px'; | 
|---|
| 45 |       sectionCounter++; | 
|---|
| 46 |     } | 
|---|
| 47 |   } | 
|---|
| 48 | } | 
|---|
| 49 | window.onload = initDynSections; | 
|---|
| 50 | --> | 
|---|
| 51 | </script> | 
|---|
| 52 | <div class="navigation" id="top"> | 
|---|
| 53 |   <div class="tabs"> | 
|---|
| 54 |     <ul> | 
|---|
| 55 |       <li><a href="main.html"><span>Main Page</span></a></li> | 
|---|
| 56 |       <li><a href="pages.html"><span>Related Pages</span></a></li> | 
|---|
| 57 |       <li class="current"><a href="annotated.html"><span>Classes</span></a></li> | 
|---|
| 58 |       <li><a href="files.html"><span>Files</span></a></li> | 
|---|
| 59 |     </ul> | 
|---|
| 60 |   </div> | 
|---|
| 61 |   <div class="tabs"> | 
|---|
| 62 |     <ul> | 
|---|
| 63 |       <li><a href="annotated.html"><span>Class List</span></a></li> | 
|---|
| 64 |       <li><a href="classes.html"><span>Class Index</span></a></li> | 
|---|
| 65 |       <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> | 
|---|
| 66 |       <li><a href="functions.html"><span>Class Members</span></a></li> | 
|---|
| 67 |     </ul> | 
|---|
| 68 |   </div> | 
|---|
| 69 |   <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1UIFile.html">UIFile</a> | 
|---|
| 70 |   </div> | 
|---|
| 71 | </div> | 
|---|
| 72 | <div class="contents"> | 
|---|
| 73 | <h1>bdm::UIFile Class Reference</h1><!-- doxytag: class="bdm::UIFile" --> | 
|---|
| 74 | <p>This class serves to load and/or save user-infos into/from configuration files stored on a hard-disk.   | 
|---|
| 75 | <a href="#_details">More...</a></p> | 
|---|
| 76 |  | 
|---|
| 77 | <p><code>#include <<a class="el" href="user__info_8h_source.html">user_info.h</a>></code></p> | 
|---|
| 78 |  | 
|---|
| 79 | <p><a href="classbdm_1_1UIFile-members.html">List of all members.</a></p> | 
|---|
| 80 | <table border="0" cellpadding="0" cellspacing="0"> | 
|---|
| 81 | <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> | 
|---|
| 82 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a77274c827f87f16bd6671df8a0cc1e33"></a><!-- doxytag: member="bdm::UIFile::UIFile" ref="a77274c827f87f16bd6671df8a0cc1e33" args="()" --> | 
|---|
| 83 |  </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UIFile.html#a77274c827f87f16bd6671df8a0cc1e33">UIFile</a> ()</td></tr> | 
|---|
| 84 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Create empty file instance prepared to store Settings. <br/></td></tr> | 
|---|
| 85 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a56b491cf846ddd6b47198ff67bbf87e4"></a><!-- doxytag: member="bdm::UIFile::UIFile" ref="a56b491cf846ddd6b47198ff67bbf87e4" args="(const string &file_name)" --> | 
|---|
| 86 |  </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UIFile.html#a56b491cf846ddd6b47198ff67bbf87e4">UIFile</a> (const string &file_name)</td></tr> | 
|---|
| 87 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates instance and fills it from the configuration file file_name. <br/></td></tr> | 
|---|
| 88 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1f8af28a0d8ef1a4956e198df0beb5ba"></a><!-- doxytag: member="bdm::UIFile::save" ref="a1f8af28a0d8ef1a4956e198df0beb5ba" args="(const string &file_name)" --> | 
|---|
| 89 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UIFile.html#a1f8af28a0d8ef1a4956e198df0beb5ba">save</a> (const string &file_name)</td></tr> | 
|---|
| 90 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Save all the stored Settings into the configuration file file_name. <br/></td></tr> | 
|---|
| 91 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5bce10d88c71f6147d58baa8400ff61f"></a><!-- doxytag: member="bdm::UIFile::operator Setting &" ref="a5bce10d88c71f6147d58baa8400ff61f" args="()" --> | 
|---|
| 92 |  </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UIFile.html#a5bce10d88c71f6147d58baa8400ff61f">operator Setting &</a> ()</td></tr> | 
|---|
| 93 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This operator allows the ability of substituting Setting parameter by <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. <br/></td></tr> | 
|---|
| 94 | </table> | 
|---|
| 95 | <hr/><a name="_details"></a><h2>Detailed Description</h2> | 
|---|
| 96 | <p>This class serves to load and/or save user-infos into/from configuration files stored on a hard-disk. </p> | 
|---|
| 97 | <p>Firstly, save some user-infos into the new <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. Then, call the save method with a filename as its only argument:</p> | 
|---|
| 98 | <div class="fragment"><pre class="fragment">        CAudi audi; | 
|---|
| 99 |         <a class="code" href="classbdm_1_1UIFile.html#a77274c827f87f16bd6671df8a0cc1e33" title="Create empty file instance prepared to store Settings.">UIFile</a> file; | 
|---|
| 100 |         <a class="code" href="classbdm_1_1UIFile.html#a1f8af28a0d8ef1a4956e198df0beb5ba" title="Save all the stored Settings into the configuration file file_name.">UI::save</a>( audi, file, <span class="stringliteral">"TT"</span>); | 
|---|
| 101 |         file.save(<span class="stringliteral">"cars.cfg"</span>); | 
|---|
| 102 | </pre></div><p>In the other way round, when loading object from a configuration file, the appropriate code looks like this:</p> | 
|---|
| 103 | <div class="fragment"><pre class="fragment">        <a class="code" href="classbdm_1_1UIFile.html#a77274c827f87f16bd6671df8a0cc1e33" title="Create empty file instance prepared to store Settings.">UIFile</a> file(<span class="stringliteral">"cars.cfg"</span>); | 
|---|
| 104 |         CAudi *audi = UI::build<CAudi>(file,<span class="stringliteral">"TT"</span>); | 
|---|
| 105 | </pre></div><p><a class="el" href="ui_page.html">User Infos and their use</a> </p> | 
|---|
| 106 | <hr/>The documentation for this class was generated from the following files:<ul> | 
|---|
| 107 | <li><a class="el" href="user__info_8h_source.html">user_info.h</a></li> | 
|---|
| 108 | <li>user_info.cpp</li> | 
|---|
| 109 | </ul> | 
|---|
| 110 | </div> | 
|---|
| 111 | <hr size="1"/><address style="text-align: right;"><small>Generated on Sun Aug 30 22:10:50 2009 for mixpp by  | 
|---|
| 112 | <a href="http://www.doxygen.org/index.html"> | 
|---|
| 113 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> | 
|---|
| 114 | </body> | 
|---|
| 115 | </html> | 
|---|