root/doc/html/classbdm_1_1UI__File.html @ 353

Revision 353, 6.4 kB (checked in by smidl, 15 years ago)

doc

Line 
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">
3<title>mixpp: bdm::UI_File Class Reference</title>
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.8 -->
8<script type="text/javascript">
9<!--
10function changeDisplayState (e){
11  var num=this.id.replace(/[^[0-9]/g,'');
12  var button=this.firstChild;
13  var sectionDiv=document.getElementById('dynsection'+num);
14  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
15    sectionDiv.style.display='block';
16    button.src='open.gif';
17  }else{
18    sectionDiv.style.display='none';
19    button.src='closed.gif';
20  }
21}
22function initDynSections(){
23  var divs=document.getElementsByTagName('div');
24  var sectionCounter=1;
25  for(var i=0;i<divs.length-1;i++){
26    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
27      var header=divs[i];
28      var section=divs[i+1];
29      var button=header.firstChild;
30      if (button!='IMG'){
31        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
32        button=document.createElement('img');
33        divs[i].insertBefore(button,divs[i].firstChild);
34      }
35      header.style.cursor='pointer';
36      header.onclick=changeDisplayState;
37      header.id='dynheader'+sectionCounter;
38      button.src='closed.gif';
39      section.id='dynsection'+sectionCounter;
40      section.style.display='none';
41      section.style.marginLeft='14px';
42      sectionCounter++;
43    }
44  }
45}
46window.onload = initDynSections;
47-->
48</script>
49<div class="navigation" id="top">
50  <div class="tabs">
51    <ul>
52      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
53      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
54      <li><a href="modules.html"><span>Modules</span></a></li>
55      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
56      <li><a href="files.html"><span>Files</span></a></li>
57    </ul>
58  </div>
59  <div class="tabs">
60    <ul>
61      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
62      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
63      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
64      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
65    </ul>
66  </div>
67  <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1UI__File.html">UI_File</a>
68  </div>
69</div>
70<div class="contents">
71<h1>bdm::UI_File Class Reference</h1><!-- doxytag: class="bdm::UI_File" -->This class serves to load and/or save DOMElements into/from files stored on a hard-disk. 
72<a href="#_details">More...</a>
73<p>
74<code>#include &lt;<a class="el" href="user__info_8h-source.html">user_info.h</a>&gt;</code>
75<p>
76
77<p>
78<a href="classbdm_1_1UI__File-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
79<tr><td></td></tr>
80<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
81<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ae02de2102865cdfdf8a9b27e2f22dd8"></a><!-- doxytag: member="bdm::UI_File::UI_File" ref="ae02de2102865cdfdf8a9b27e2f22dd8" args="(const string &amp;file_name)" -->
82&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI__File.html#ae02de2102865cdfdf8a9b27e2f22dd8">UI_File</a> (const string &amp;file_name)</td></tr>
83
84<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">attach new RootElement instance to a file (typically with an XML extension) <br></td></tr>
85<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6485b7f1f07eecb92551f9e9857c0716"></a><!-- doxytag: member="bdm::UI_File::load" ref="6485b7f1f07eecb92551f9e9857c0716" args="()" -->
86void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI__File.html#6485b7f1f07eecb92551f9e9857c0716">load</a> ()</td></tr>
87
88<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">loads root element from a file <br></td></tr>
89<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2a2482e189601fe5cd98777c55b80ae5"></a><!-- doxytag: member="bdm::UI_File::save" ref="2a2482e189601fe5cd98777c55b80ae5" args="()" -->
90void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI__File.html#2a2482e189601fe5cd98777c55b80ae5">save</a> ()</td></tr>
91
92<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">save UserInfo to the file (typically with an XML extension) <br></td></tr>
93<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0e3f8287959a3076153e1a1c446e6109"></a><!-- doxytag: member="bdm::UI_File::operator Setting &amp;" ref="0e3f8287959a3076153e1a1c446e6109" args="()" -->
94&nbsp;</td><td class="memItemRight" valign="bottom"><b>operator Setting &amp;</b> ()</td></tr>
95
96</table>
97<hr><a name="_details"></a><h2>Detailed Description</h2>
98This class serves to load and/or save DOMElements into/from files stored on a hard-disk.
99<p>
100Firstly, you associate new RootElement instance with some filename during a time of its construtcion. Then, you save some object into the new RootElement instance, and save it into the file this way: <div class="fragment"><pre class="fragment">        CAudi audi;
101        RootElement root(<span class="stringliteral">"cars.xml"</span>);
102        <a class="code" href="classbdm_1_1UI__File.html#2a2482e189601fe5cd98777c55b80ae5" title="save UserInfo to the file (typically with an XML extension)">UserInfo::save</a>( audi, root, <span class="stringliteral">"TT"</span>);
103        root.save();
104</pre></div><p>
105In the other way round, when loading object from a XML file, the appropriate code looks like this: <div class="fragment"><pre class="fragment">        RootElement root(<span class="stringliteral">"cars.xml"</span>);
106        root.load();
107        UserInfo::build&lt;T&gt;(root,<span class="stringliteral">"TT"</span>);
108</pre></div> <hr>The documentation for this class was generated from the following files:<ul>
109<li><a class="el" href="user__info_8h-source.html">user_info.h</a><li>user_info.cpp</ul>
110</div>
111<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:18 2009 for mixpp by&nbsp;
112<a href="http://www.doxygen.org/index.html">
113<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
114</body>
115</html>
Note: See TracBrowser for help on using the browser.