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 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 | <!-- |
---|
10 | function 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 | } |
---|
22 | function 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 | } |
---|
46 | window.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 Page</span></a></li> |
---|
53 | <li><a href="pages.html"><span>Related 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 List</span></a></li> |
---|
62 | <li><a href="classes.html"><span>Class Index</span></a></li> |
---|
63 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
64 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
65 | </ul> |
---|
66 | </div> |
---|
67 | <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1UI.html">UI</a> |
---|
68 | </div> |
---|
69 | </div> |
---|
70 | <div class="contents"> |
---|
71 | <h1>bdm::UI Class Reference</h1><!-- doxytag: class="bdm::UI" -->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 <<a class="el" href="user__info_8h-source.html">user_info.h</a>></code> |
---|
75 | <p> |
---|
76 | |
---|
77 | <p> |
---|
78 | <a href="classbdm_1_1UI-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>Classes</h2></td></tr> |
---|
81 | <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><b>Link_Expander</b></td></tr> |
---|
82 | |
---|
83 | <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><b>Mapped_UI</b></td></tr> |
---|
84 | |
---|
85 | <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> |
---|
86 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="792cae11679b69900ca7c7b99e5288c3"></a><!-- doxytag: member="bdm::UI::ui_error" ref="792cae11679b69900ca7c7b99e5288c3" args="(string message, const Setting &element)" --> |
---|
87 | static void </td><td class="memItemRight" valign="bottom"><b>ui_error</b> (string message, const Setting &element)</td></tr> |
---|
88 | |
---|
89 | <tr><td class="memTemplParams" nowrap colspan="2">template<class T > </td></tr> |
---|
90 | <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static T * </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#f0eccc7bbe4b680f3e1cb84b455a1125">build</a> (const Setting &element, const int index)</td></tr> |
---|
91 | |
---|
92 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Prototype of a <a class="el" href="classbdm_1_1UI.html" title="This class serves to load and/or save DOMElements into/from files stored on a hard-disk...">UI</a> builder. Return value is by the second argument since it type checking via <code>dynamic_cast</code>. <a href="#f0eccc7bbe4b680f3e1cb84b455a1125"></a><br></td></tr> |
---|
93 | <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="dda27449f8bd19d54db9ccfb2644e908"></a><!-- doxytag: member="bdm::UI::build" ref="dda27449f8bd19d54db9ccfb2644e908" args="(const Setting &element, const string &name)" --> |
---|
94 | template<class T > </td></tr> |
---|
95 | <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static T * </td><td class="memTemplItemRight" valign="bottom"><b>build</b> (const Setting &element, const string &name)</td></tr> |
---|
96 | |
---|
97 | <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="32e63fc6ca11603442d46350bb66a76f"></a><!-- doxytag: member="bdm::UI::get" ref="32e63fc6ca11603442d46350bb66a76f" args="(T &instance, const Setting &element, const string &name)" --> |
---|
98 | template<class T > </td></tr> |
---|
99 | <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#32e63fc6ca11603442d46350bb66a76f">get</a> (T &instance, const Setting &element, const string &name)</td></tr> |
---|
100 | |
---|
101 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This methods tries to build a new double matrix. <br></td></tr> |
---|
102 | <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="0d197e27bb914fe6cc1ca41b90899742"></a><!-- doxytag: member="bdm::UI::get" ref="0d197e27bb914fe6cc1ca41b90899742" args="(T &instance, const Setting &element, const int index)" --> |
---|
103 | template<class T > </td></tr> |
---|
104 | <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#0d197e27bb914fe6cc1ca41b90899742">get</a> (T &instance, const Setting &element, const int index)</td></tr> |
---|
105 | |
---|
106 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This methods tries to build a new double matrix. <br></td></tr> |
---|
107 | <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="7b83f1e2352f9ed7fb65437dd33e2005"></a><!-- doxytag: member="bdm::UI::get" ref="7b83f1e2352f9ed7fb65437dd33e2005" args="(Array< T > &array_to_load, const Setting &element, const string &name)" --> |
---|
108 | template<class T > </td></tr> |
---|
109 | <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#7b83f1e2352f9ed7fb65437dd33e2005">get</a> (Array< T > &array_to_load, const Setting &element, const string &name)</td></tr> |
---|
110 | |
---|
111 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This methods tries to build a new double matrix. <br></td></tr> |
---|
112 | <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="472abdce7adb048a40ef3d84ed0f592d"></a><!-- doxytag: member="bdm::UI::get" ref="472abdce7adb048a40ef3d84ed0f592d" args="(Array< T > &array_to_load, const Setting &element, const int index)" --> |
---|
113 | template<class T > </td></tr> |
---|
114 | <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#472abdce7adb048a40ef3d84ed0f592d">get</a> (Array< T > &array_to_load, const Setting &element, const int index)</td></tr> |
---|
115 | |
---|
116 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This methods tries to build a new double matrix. <br></td></tr> |
---|
117 | <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="c83987949e6a9e79d6e093797ab7d917"></a><!-- doxytag: member="bdm::UI::save" ref="c83987949e6a9e79d6e093797ab7d917" args="(const T *const instance, Setting &element, const string &name="")" --> |
---|
118 | template<class T > </td></tr> |
---|
119 | <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static void </td><td class="memTemplItemRight" valign="bottom"><b>save</b> (const T *const instance, Setting &element, const string &name="")</td></tr> |
---|
120 | |
---|
121 | <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="4514f93573a9d9126c506d176fbd3163"></a><!-- doxytag: member="bdm::UI::save" ref="4514f93573a9d9126c506d176fbd3163" args="(const Array< T > &array_to_save, Setting &element, const string &name="")" --> |
---|
122 | template<class T > </td></tr> |
---|
123 | <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#4514f93573a9d9126c506d176fbd3163">save</a> (const Array< T > &array_to_save, Setting &element, const string &name="")</td></tr> |
---|
124 | |
---|
125 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This methods tries to save a double vec. <br></td></tr> |
---|
126 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="42e908a4f1b09d701be69c8784a02df7"></a><!-- doxytag: member="bdm::UI::save" ref="42e908a4f1b09d701be69c8784a02df7" args="(const mat &matrix, Setting &element, const string &name="")" --> |
---|
127 | static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#42e908a4f1b09d701be69c8784a02df7">save</a> (const mat &matrix, Setting &element, const string &name="")</td></tr> |
---|
128 | |
---|
129 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This methods tries to save a double matrix. <br></td></tr> |
---|
130 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cc2afb61a772d8571f7bb19065da4695"></a><!-- doxytag: member="bdm::UI::save" ref="cc2afb61a772d8571f7bb19065da4695" args="(const ivec &vec, Setting &element, const string &name="")" --> |
---|
131 | static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#cc2afb61a772d8571f7bb19065da4695">save</a> (const ivec &vec, Setting &element, const string &name="")</td></tr> |
---|
132 | |
---|
133 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This methods tries to save a double vec. <br></td></tr> |
---|
134 | <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> |
---|
135 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d60234c0673f345424329894b9b0cef8"></a><!-- doxytag: member="bdm::UI::UI" ref="d60234c0673f345424329894b9b0cef8" args="(const string &class_name, const type_info *const class_type_info)" --> |
---|
136 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#d60234c0673f345424329894b9b0cef8">UI</a> (const string &class_name, const type_info *const class_type_info)</td></tr> |
---|
137 | |
---|
138 | <tr><td class="mdescLeft"> </td><td class="mdescRight">default constructor <br></td></tr> |
---|
139 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="95a5a0e160bf21357f99a9291b0b5e88"></a><!-- doxytag: member="bdm::UI::~UI" ref="95a5a0e160bf21357f99a9291b0b5e88" args="()" --> |
---|
140 | virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#95a5a0e160bf21357f99a9291b0b5e88">~UI</a> ()</td></tr> |
---|
141 | |
---|
142 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Virtual destructor for future use;. <br></td></tr> |
---|
143 | </table> |
---|
144 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
145 | This class serves to load and/or save DOMElements into/from files stored on a hard-disk. |
---|
146 | <p> |
---|
147 | Firstly, 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; |
---|
148 | RootElement root(<span class="stringliteral">"cars.xml"</span>); |
---|
149 | UserInfo::save( audi, root, <span class="stringliteral">"TT"</span>); |
---|
150 | root.save(); |
---|
151 | </pre></div><p> |
---|
152 | In 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>); |
---|
153 | root.load(); |
---|
154 | UserInfo::build<T>(root,<span class="stringliteral">"TT"</span>); |
---|
155 | </pre></div><p> |
---|
156 | UserInfo is an abstract is for internal purposes only. Use CompoundUserInfo<T> or Particular_UI<T> instead. The raison d'etre of this class is to allow pointers to its templated descendants.Also, the main functions of the whole UserInfo library are included within this class, see static methods 'build' and 'save'.<p> |
---|
157 | /*!Builds computational object from a UserInfo structureReturn value is a pointer to the created object (memory management issue?) / <hr><h2>Member Function Documentation</h2> |
---|
158 | <a class="anchor" name="f0eccc7bbe4b680f3e1cb84b455a1125"></a><!-- doxytag: member="bdm::UI::build" ref="f0eccc7bbe4b680f3e1cb84b455a1125" args="(const Setting &element, const int index)" --> |
---|
159 | <div class="memitem"> |
---|
160 | <div class="memproto"> |
---|
161 | <div class="memtemplate"> |
---|
162 | template<class T > </div> |
---|
163 | <table class="memname"> |
---|
164 | <tr> |
---|
165 | <td class="memname">static T* bdm::UI::build </td> |
---|
166 | <td>(</td> |
---|
167 | <td class="paramtype">const Setting & </td> |
---|
168 | <td class="paramname"> <em>element</em>, </td> |
---|
169 | </tr> |
---|
170 | <tr> |
---|
171 | <td class="paramkey"></td> |
---|
172 | <td></td> |
---|
173 | <td class="paramtype">const int </td> |
---|
174 | <td class="paramname"> <em>index</em></td><td> </td> |
---|
175 | </tr> |
---|
176 | <tr> |
---|
177 | <td></td> |
---|
178 | <td>)</td> |
---|
179 | <td></td><td></td><td><code> [inline, static]</code></td> |
---|
180 | </tr> |
---|
181 | </table> |
---|
182 | </div> |
---|
183 | <div class="memdoc"> |
---|
184 | |
---|
185 | <p> |
---|
186 | Prototype of a <a class="el" href="classbdm_1_1UI.html" title="This class serves to load and/or save DOMElements into/from files stored on a hard-disk...">UI</a> builder. Return value is by the second argument since it type checking via <code>dynamic_cast</code>. |
---|
187 | <p> |
---|
188 | This methods tries to build a new instance of type T (or some of its descendant types) according to a data stored in a DOMNode named class_name within a child nodes of the passed element. If an ui_error occurs, it returns a NULL pointer. |
---|
189 | </div> |
---|
190 | </div><p> |
---|
191 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
192 | <li><a class="el" href="user__info_8h-source.html">user_info.h</a><li>user_info.cpp</ul> |
---|
193 | </div> |
---|
194 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:11:01 2009 for mixpp by |
---|
195 | <a href="http://www.doxygen.org/index.html"> |
---|
196 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
197 | </body> |
---|
198 | </html> |
---|