| 84 | <tr><td colspan="2"><div class="groupHeader">Initialization of classes</div></td></tr> |
| 85 | <tr><td colspan="2"><div class="groupText">The type T has to be a <a class="el" href="classbdm_1_1root.html" title="Root class of BDM objects.">root</a> descendant class <br><br></div></td></tr> |
| 86 | <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)" --> |
| 87 | template<class T > </td></tr> |
| 88 | <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#dda27449f8bd19d54db9ccfb2644e908">build</a> (const Setting &element, const string &name)</td></tr> |
| 89 | |
| 90 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The new instance of type T* is constructed and initialized with values stored in the Setting element[name]. <br></td></tr> |
90 | | <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>. <br></td></tr> |
91 | | <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)" --> |
92 | | template<class T > </td></tr> |
93 | | <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> |
94 | | |
| 95 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The new instance of type T* is constructed and initialized with values stored in the Setting element[index]. <br></td></tr> |
| 96 | <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="6e2da6a142fecf5f21e0bb86a7211cb4"></a><!-- doxytag: member="bdm::UI::build" ref="6e2da6a142fecf5f21e0bb86a7211cb4" args="(const Setting &element)" --> |
| 97 | template<class T > </td></tr> |
| 98 | <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#6e2da6a142fecf5f21e0bb86a7211cb4">build</a> (const Setting &element)</td></tr> |
| 99 | |
| 100 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The new instance of type T* is constructed and initialized with values stored in the Setting element. <br></td></tr> |
| 101 | <tr><td colspan="2"><div class="groupHeader">Initialization of structures</div></td></tr> |
| 102 | <tr><td colspan="2"><div class="groupText">The type T has to be int, double, string, vec, ivec or mat. <br><br></div></td></tr> |
104 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">This methods tries to build a new double matrix. <br></td></tr> |
| 112 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The existing instance of type T is initialized with values stored in the Setting element[index]. <br></td></tr> |
| 113 | <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="25747ac6d0232aa7102dbb316f65ddce"></a><!-- doxytag: member="bdm::UI::get" ref="25747ac6d0232aa7102dbb316f65ddce" args="(T &instance, const Setting &element)" --> |
| 114 | template<class T > </td></tr> |
| 115 | <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#25747ac6d0232aa7102dbb316f65ddce">get</a> (T &instance, const Setting &element)</td></tr> |
| 116 | |
| 117 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The existing instance of type T is initialized with values stored in the Setting element directly. <br></td></tr> |
| 118 | <tr><td colspan="2"><div class="groupHeader">Initialization of arrays Array<T></div></td></tr> |
| 119 | <tr><td colspan="2"><div class="groupText">The type T has to be int, double, string, vec, ivec or mat, or pointer to any <a class="el" href="classbdm_1_1root.html" title="Root class of BDM objects.">root</a> descendant. <br><br></div></td></tr> |
114 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">This methods tries to build a new double matrix. <br></td></tr> |
| 129 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The existing array of type T is initialized with values stored in the Setting element[index]. <br></td></tr> |
| 130 | <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="4fc5efdc58e4e184218b6d5beeb5ceab"></a><!-- doxytag: member="bdm::UI::get" ref="4fc5efdc58e4e184218b6d5beeb5ceab" args="(Array< T > &array_to_load, const Setting &element)" --> |
| 131 | template<class T > </td></tr> |
| 132 | <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#4fc5efdc58e4e184218b6d5beeb5ceab">get</a> (Array< T > &array_to_load, const Setting &element)</td></tr> |
| 133 | |
| 134 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The existing array of type T is initialized with values stored in the Setting element. <br></td></tr> |
| 135 | <tr><td colspan="2"><div class="groupHeader">Serialization of objects and structures into a new Setting</div></td></tr> |
| 136 | <tr><td colspan="2"><div class="groupText">The new child Setting can be accessed either by its name - if some name is passed as a parameter - or by its integer index. In that case, the new element is added at the very end of the current list of child Settings. <br><br></div></td></tr> |
127 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">This methods tries to save a double matrix. <br></td></tr> |
128 | | <tr><td class="memItemLeft" nowrap align="right" valign="top">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> |
129 | | |
130 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">This methods tries to save a double vec. <a href="#cc2afb61a772d8571f7bb19065da4695"></a><br></td></tr> |
131 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7d4028226c09da8bdf442c1e183d564e"></a><!-- doxytag: member="bdm::UI::save" ref="7d4028226c09da8bdf442c1e183d564e" args="(const vec &vector, Setting &element, const string &name)" --> |
132 | | static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#7d4028226c09da8bdf442c1e183d564e">save</a> (const vec &vector, Setting &element, const string &name)</td></tr> |
133 | | |
134 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">This methods tries to save a double vector. <br></td></tr> |
| 150 | <tr><td class="mdescLeft"> </td><td class="mdescRight">A matrix(of type mat) is stored in the new child Setting appended to the passed element. <br></td></tr> |
| 151 | <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="")" --> |
| 152 | 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> |
| 153 | |
| 154 | <tr><td class="mdescLeft"> </td><td class="mdescRight">An integer vector (of type ivec) is stored in the new child Setting appended to the passed element. <br></td></tr> |
| 155 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7c3b1846b2f29fb70e6a9d789daab808"></a><!-- doxytag: member="bdm::UI::save" ref="7c3b1846b2f29fb70e6a9d789daab808" args="(const vec &vector, Setting &element, const string &name="")" --> |
| 156 | static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#7c3b1846b2f29fb70e6a9d789daab808">save</a> (const vec &vector, Setting &element, const string &name="")</td></tr> |
| 157 | |
| 158 | <tr><td class="mdescLeft"> </td><td class="mdescRight">A double vector (of type vec) is stored in the new child Setting appended to the passed element. <br></td></tr> |
| 159 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7c822efd5f8550480d0756352d430c05"></a><!-- doxytag: member="bdm::UI::save" ref="7c822efd5f8550480d0756352d430c05" args="(const string &str, Setting &element, const string &name="")" --> |
| 160 | static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#7c822efd5f8550480d0756352d430c05">save</a> (const string &<a class="el" href="classbdm_1_1str.html">str</a>, Setting &element, const string &name="")</td></tr> |
| 161 | |
| 162 | <tr><td class="mdescLeft"> </td><td class="mdescRight">A string is stored in the new child Setting appended to the passed element. <br></td></tr> |
| 163 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8cd58216bcd732856846d18503c92d48"></a><!-- doxytag: member="bdm::UI::save" ref="8cd58216bcd732856846d18503c92d48" args="(const int &integer, Setting &element, const string &name="")" --> |
| 164 | static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#8cd58216bcd732856846d18503c92d48">save</a> (const int &integer, Setting &element, const string &name="")</td></tr> |
| 165 | |
| 166 | <tr><td class="mdescLeft"> </td><td class="mdescRight">An integer is stored in the new child Setting appended to the passed element. <br></td></tr> |
| 167 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4e943ed7b3e65c9fd2842670fa8cf4a8"></a><!-- doxytag: member="bdm::UI::save" ref="4e943ed7b3e65c9fd2842670fa8cf4a8" args="(const double &real, Setting &element, const string &name="")" --> |
| 168 | static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#4e943ed7b3e65c9fd2842670fa8cf4a8">save</a> (const double &real, Setting &element, const string &name="")</td></tr> |
| 169 | |
| 170 | <tr><td class="mdescLeft"> </td><td class="mdescRight">A double is stored in the new child Setting appended to the passed element. <br></td></tr> |
136 | | <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)" --> |
137 | | </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> |
138 | | |
139 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">default constructor <br></td></tr> |
140 | | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="95a5a0e160bf21357f99a9291b0b5e88"></a><!-- doxytag: member="bdm::UI::~UI" ref="95a5a0e160bf21357f99a9291b0b5e88" args="()" --> |
141 | | virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1UI.html#95a5a0e160bf21357f99a9291b0b5e88">~UI</a> ()</td></tr> |
142 | | |
143 | | <tr><td class="mdescLeft"> </td><td class="mdescRight">Virtual destructor for future use;. <br></td></tr> |
| 172 | <tr><td class="memItemLeft" nowrap align="right" valign="top"> </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> |
| 173 | |
| 174 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor for internal use only, see. <a href="#d60234c0673f345424329894b9b0cef8"></a><br></td></tr> |
146 | | This class serves to load and/or save DOMElements into/from files stored on a hard-disk. |
147 | | <p> |
148 | | 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; |
149 | | RootElement root(<span class="stringliteral">"cars.xml"</span>); |
150 | | UserInfo::save( audi, root, <span class="stringliteral">"TT"</span>); |
151 | | root.save(); |
152 | | </pre></div><p> |
153 | | 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>); |
154 | | root.load(); |
155 | | UserInfo::build<T>(root,<span class="stringliteral">"TT"</span>); |
156 | | </pre></div><p> |
157 | | 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'. <hr><h2>Member Function Documentation</h2> |
158 | | <a class="anchor" name="cc2afb61a772d8571f7bb19065da4695"></a><!-- doxytag: member="bdm::UI::save" ref="cc2afb61a772d8571f7bb19065da4695" args="(const ivec &vec, Setting &element, const string &name="")" --> |
| 177 | <a class="el" href="classbdm_1_1UI.html" title="UI is an abstract class and it is intended for internal purposes only.">UI</a> is an abstract class and it is intended for internal purposes only. |
| 178 | <p> |
| 179 | This class exists mainly to allow pointers to its templated descendant ParticularUI<T>. Next, it collects all the auxiliary functions useful to prepare some concret user-infos, see static methods 'build', 'get' and 'save'. <hr><h2>Constructor & Destructor Documentation</h2> |
| 180 | <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)" --> |