root/doc/html/classCompoundUserInfo.html @ 264

Revision 261, 15.7 kB (checked in by smidl, 16 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: CompoundUserInfo&lt; T &gt; Class Template Reference</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5<link href="tabs.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.5.6 -->
8<div class="navigation" id="top">
9  <div class="tabs">
10    <ul>
11      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
13      <li><a href="modules.html"><span>Modules</span></a></li>
14      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
15      <li class="current"><a href="classes.html"><span>Classes</span></a></li>
16      <li><a href="files.html"><span>Files</span></a></li>
17    </ul>
18  </div>
19  <div class="tabs">
20    <ul>
21      <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
22      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
23      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
24      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
25    </ul>
26  </div>
27</div>
28<div class="contents">
29<h1>CompoundUserInfo&lt; T &gt; Class Template Reference</h1><!-- doxytag: class="CompoundUserInfo" --><!-- doxytag: inherits="TypedUserInfo" -->The main userinfo template class. You should derive this class whenever you need a new userinfo of a class which is compound from smaller elements (all having its own userinfo class prepared). 
30<a href="#_details">More...</a>
31<p>
32<code>#include &lt;<a class="el" href="userinfo_8h-source.html">userinfo.h</a>&gt;</code>
33<p>
34<div class="dynheader">
35Inheritance diagram for CompoundUserInfo&lt; T &gt;:</div>
36<div class="dynsection">
37<p><center><img src="classCompoundUserInfo__inherit__graph.png" border="0" usemap="#CompoundUserInfo_3_01T_01_4__inherit__map" alt="Inheritance graph"></center>
38<map name="CompoundUserInfo_3_01T_01_4__inherit__map">
39<area shape="rect" href="classCompoundUserInfo.html" title="CompoundUserInfo\&lt; Car \&gt;" alt="" coords="5,343,200,369"><area shape="rect" href="classCompoundUserInfo.html" title="CompoundUserInfo\&lt; Bike \&gt;" alt="" coords="224,343,424,369"><area shape="rect" href="classTypedUserInfo.html" title="TypeUserInfo is still an abstract class, but contrary to the UserInfo class it is..." alt="" coords="105,167,252,193"><area shape="rect" href="classUserInfo.html" title="UserInfo is an abstract is for internal purposes only. Use CompoundUserInfo&lt;T&gt;..." alt="" coords="141,87,216,113"><area shape="rect" href="classBindingFrame.html" title="Abstract class declaring general properties of a frame for data binding." alt="" coords="125,7,232,33"></map>
40<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
41<div class="dynheader">
42Collaboration diagram for CompoundUserInfo&lt; T &gt;:</div>
43<div class="dynsection">
44<p><center><img src="classCompoundUserInfo__coll__graph.png" border="0" usemap="#CompoundUserInfo_3_01T_01_4__coll__map" alt="Collaboration graph"></center>
45<map name="CompoundUserInfo_3_01T_01_4__coll__map">
46<area shape="rect" href="classTypedUserInfo.html" title="TypeUserInfo is still an abstract class, but contrary to the UserInfo class it is..." alt="" coords="83,295,229,321"><area shape="rect" href="classUserInfo.html" title="UserInfo is an abstract is for internal purposes only. Use CompoundUserInfo&lt;T&gt;..." alt="" coords="119,215,193,241"><area shape="rect" href="classBindingFrame.html" title="Abstract class declaring general properties of a frame for data binding." alt="" coords="24,103,131,129"><area shape="rect" href="classAssertXercesIsAlive.html" title="Class initializing Xerces library." alt="" coords="5,7,149,33"></map>
47<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
48
49<p>
50<a href="classCompoundUserInfo-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
51<tr><td></td></tr>
52<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
53<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class T&gt; </td></tr>
54<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static T *&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classUserInfo.html#0f090c6525a3e8fb11634a553f467ede">Assembly</a> (DOMElement &amp;element, const string tagName)</td></tr>
55
56<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class T&gt; </td></tr>
57<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static bool&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classUserInfo.html#1d402661b82feccb5265a70f65c242e1">Disassembly</a> (T &amp;<a class="el" href="classTypedUserInfo.html#c7ad10a9ff002383518155c965ade85c">instance</a>, DOMElement &amp;element, const string tagName, const string help)</td></tr>
58
59<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class T&gt; </td></tr>
60<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static bool&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classUserInfo.html#917b2257abc31b94c89ef3cd270e4a42">Disassembly</a> (T &amp;<a class="el" href="classTypedUserInfo.html#c7ad10a9ff002383518155c965ade85c">instance</a>, DOMElement &amp;element, const string tagName)</td></tr>
61
62<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
63<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e2265e447e2f48550c5d8d479119bbb3"></a><!-- doxytag: member="CompoundUserInfo::CompoundUserInfo" ref="e2265e447e2f48550c5d8d479119bbb3" args="(string userFriendlyTypeName)" -->
64&nbsp;</td><td class="memItemRight" valign="bottom"><b>CompoundUserInfo</b> (string userFriendlyTypeName)</td></tr>
65
66<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2244bd5181c3d1e70f3a6be2b72e9424"></a><!-- doxytag: member="CompoundUserInfo::XMLCh2str" ref="2244bd5181c3d1e70f3a6be2b72e9424" args="(const XMLCh *const XMLCh_str)" -->
67string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBindingFrame.html#2244bd5181c3d1e70f3a6be2b72e9424">XMLCh2str</a> (const XMLCh *const XMLCh_str)</td></tr>
68
69<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">function which transcodes Xerces' XMLCh-based strings into C++ strings <br></td></tr>
70<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="820e4df85c0dc545e3079e407fcdbbaa"></a><!-- doxytag: member="CompoundUserInfo::removeSpaces" ref="820e4df85c0dc545e3079e407fcdbbaa" args="(const string &amp;str)" -->
71string&nbsp;</td><td class="memItemRight" valign="bottom"><b>removeSpaces</b> (const string &amp;str)</td></tr>
72
73<tr><td colspan="2"><br><h2>Static Protected Attributes</h2></td></tr>
74<tr><td class="memItemLeft" nowrap align="right" valign="top">static const <a class="el" href="classTypedUserInfo.html">TypedUserInfo</a>&lt; T &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTypedUserInfo.html#c7ad10a9ff002383518155c965ade85c">instance</a></td></tr>
75
76<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
77<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCompoundUserInfo_1_1BindedElement.html">BindedElement</a></td></tr>
78
79<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Templated class binding inner element with its XML tag and automating data transfers in both directions.  <a href="classCompoundUserInfo_1_1BindedElement.html#_details">More...</a><br></td></tr>
80</table>
81<hr><a name="_details"></a><h2>Detailed Description</h2>
82<h3>template&lt;typename T&gt;<br>
83 class CompoundUserInfo&lt; T &gt;</h3>
84
85The main userinfo template class. You should derive this class whenever you need a new userinfo of a class which is compound from smaller elements (all having its own userinfo class prepared).
86<p>
87To bind some inner element to its own userinfo class, and also to automate its assembling and disassembling, it is necessary to create a instance of an inner templated class BindedElement&lt;T&gt;. Those attributes have to be initialized in constructor of a new compound userinfo this way:<p>
88<div class="fragment"><pre class="fragment"><span class="keyword">class </span>BikeUI: <span class="keyword">public</span> <a class="code" href="classCompoundUserInfo.html" title="The main userinfo template class. You should derive this class whenever you need...">CompoundUserInfo</a>&lt;Bike&gt;
89{
90<span class="keyword">private</span>:
91        BindedElement&lt;int&gt; year;
92        BindedElement&lt;bool&gt; lights;
93        BindedElement&lt;string&gt; manufacturer;
94<span class="keyword">public</span>:
95        BikeUI()
96                :<a class="code" href="classCompoundUserInfo.html" title="The main userinfo template class. You should derive this class whenever you need...">CompoundUserInfo</a>&lt;Bike&gt;(<span class="stringliteral">"bike"</span>),
97                year( this, <span class="stringliteral">"year"</span>, 0 ),
98                lights( this, <span class="stringliteral">"electric lights"</span>, false ),
99                manufacturer( this, <span class="stringliteral">"manufacturer"</span>, <span class="stringliteral">"unknown"</span>)
100        {
101        }
102
103        ...
104}
105</pre></div> <hr><h2>Member Function Documentation</h2>
106<a class="anchor" name="0f090c6525a3e8fb11634a553f467ede"></a><!-- doxytag: member="CompoundUserInfo::Assembly" ref="0f090c6525a3e8fb11634a553f467ede" args="(DOMElement &amp;element, const string tagName)" -->
107<div class="memitem">
108<div class="memproto">
109<div class="memtemplate">
110template&lt;class T&gt; </div>
111      <table class="memname">
112        <tr>
113          <td class="memname">static T* UserInfo::Assembly           </td>
114          <td>(</td>
115          <td class="paramtype">DOMElement &amp;&nbsp;</td>
116          <td class="paramname"> <em>element</em>, </td>
117        </tr>
118        <tr>
119          <td class="paramkey"></td>
120          <td></td>
121          <td class="paramtype">const string&nbsp;</td>
122          <td class="paramname"> <em>tagName</em></td><td>&nbsp;</td>
123        </tr>
124        <tr>
125          <td></td>
126          <td>)</td>
127          <td></td><td></td><td><code> [inline, static, inherited]</code></td>
128        </tr>
129      </table>
130</div>
131<div class="memdoc">
132
133<p>
134This methods tries to assembly a new instance of type T (or some of its descendant types) according to a data stored in a DOMNode named tagName within a child nodes of the passed element. If an error occurs, it returns a NULL pointer.
135<p>References <a class="el" href="userinfo_8cpp-source.html#l00040">Attribute::Get()</a>, and <a class="el" href="userinfo_8h-source.html#l00152">Attribute::type</a>.</p>
136
137</div>
138</div><p>
139<a class="anchor" name="1d402661b82feccb5265a70f65c242e1"></a><!-- doxytag: member="CompoundUserInfo::Disassembly" ref="1d402661b82feccb5265a70f65c242e1" args="(T &amp;instance, DOMElement &amp;element, const string tagName, const string help)" -->
140<div class="memitem">
141<div class="memproto">
142<div class="memtemplate">
143template&lt;class T&gt; </div>
144      <table class="memname">
145        <tr>
146          <td class="memname">static bool UserInfo::Disassembly           </td>
147          <td>(</td>
148          <td class="paramtype">T &amp;&nbsp;</td>
149          <td class="paramname"> <em>instance</em>, </td>
150        </tr>
151        <tr>
152          <td class="paramkey"></td>
153          <td></td>
154          <td class="paramtype">DOMElement &amp;&nbsp;</td>
155          <td class="paramname"> <em>element</em>, </td>
156        </tr>
157        <tr>
158          <td class="paramkey"></td>
159          <td></td>
160          <td class="paramtype">const string&nbsp;</td>
161          <td class="paramname"> <em>tagName</em>, </td>
162        </tr>
163        <tr>
164          <td class="paramkey"></td>
165          <td></td>
166          <td class="paramtype">const string&nbsp;</td>
167          <td class="paramname"> <em>help</em></td><td>&nbsp;</td>
168        </tr>
169        <tr>
170          <td></td>
171          <td>)</td>
172          <td></td><td></td><td><code> [inline, static, inherited]</code></td>
173        </tr>
174      </table>
175</div>
176<div class="memdoc">
177
178<p>
179This methods tries to disassembly an instance of type T (or some of its descendant types) and build DOM tree accordingly. Then, it creates a new DOMNode named according tagName and connecti it to the passed DOMElement as a new child node (with a help attribute filled).
180<p>References <a class="el" href="userinfo_8h-source.html#l00149">Attribute::help</a>, <a class="el" href="userinfo_8cpp-source.html#l00046">Attribute::Set()</a>, and <a class="el" href="userinfo_8h-source.html#l00152">Attribute::type</a>.</p>
181
182<p>Referenced by <a class="el" href="userinfo_8h-source.html#l00327">UserInfo::Disassembly()</a>, and <a class="el" href="userinfo_8h-source.html#l00479">CompoundUserInfo&lt; T &gt;::BindedElement&lt; U &gt;::DisassemblyComponentsToXML()</a>.</p>
183
184</div>
185</div><p>
186<a class="anchor" name="917b2257abc31b94c89ef3cd270e4a42"></a><!-- doxytag: member="CompoundUserInfo::Disassembly" ref="917b2257abc31b94c89ef3cd270e4a42" args="(T &amp;instance, DOMElement &amp;element, const string tagName)" -->
187<div class="memitem">
188<div class="memproto">
189<div class="memtemplate">
190template&lt;class T&gt; </div>
191      <table class="memname">
192        <tr>
193          <td class="memname">static bool UserInfo::Disassembly           </td>
194          <td>(</td>
195          <td class="paramtype">T &amp;&nbsp;</td>
196          <td class="paramname"> <em>instance</em>, </td>
197        </tr>
198        <tr>
199          <td class="paramkey"></td>
200          <td></td>
201          <td class="paramtype">DOMElement &amp;&nbsp;</td>
202          <td class="paramname"> <em>element</em>, </td>
203        </tr>
204        <tr>
205          <td class="paramkey"></td>
206          <td></td>
207          <td class="paramtype">const string&nbsp;</td>
208          <td class="paramname"> <em>tagName</em></td><td>&nbsp;</td>
209        </tr>
210        <tr>
211          <td></td>
212          <td>)</td>
213          <td></td><td></td><td><code> [inline, static, inherited]</code></td>
214        </tr>
215      </table>
216</div>
217<div class="memdoc">
218
219<p>
220This methods tries to disassembly an instance of type T (or some of its descendant types) and build DOM tree accordingly. Then, it creates a new DOMNode named according tagName and connecti it to the passed DOMElement as a new child node.
221<p>References <a class="el" href="userinfo_8h-source.html#l00297">UserInfo::Disassembly()</a>.</p>
222
223</div>
224</div><p>
225<hr><h2>Member Data Documentation</h2>
226<a class="anchor" name="c7ad10a9ff002383518155c965ade85c"></a><!-- doxytag: member="CompoundUserInfo::instance" ref="c7ad10a9ff002383518155c965ade85c" args="" -->
227<div class="memitem">
228<div class="memproto">
229<div class="memtemplate">
230template&lt;typename T&gt; </div>
231      <table class="memname">
232        <tr>
233          <td class="memname">const <a class="el" href="classTypedUserInfo.html">TypedUserInfo</a>&lt;T&gt;&amp; <a class="el" href="classTypedUserInfo.html">TypedUserInfo</a>&lt; T &gt;::<a class="el" href="classTypedUserInfo.html#c7ad10a9ff002383518155c965ade85c">instance</a><code> [static, protected, inherited]</code>          </td>
234        </tr>
235      </table>
236</div>
237<div class="memdoc">
238
239<p>
240the only instance of this class (each type T has its own instance) which is used as a factory for processing related userinfos
241</div>
242</div><p>
243<hr>The documentation for this class was generated from the following file:<ul>
244<li><a class="el" href="userinfo_8h-source.html">userinfo.h</a></ul>
245</div>
246<hr size="1"><address style="text-align: right;"><small>Generated on Fri Feb 6 15:29:49 2009 for mixpp by&nbsp;
247<a href="http://www.doxygen.org/index.html">
248<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
249</body>
250</html>
Note: See TracBrowser for help on using the browser.