[259] | 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"> |
---|
[261] | 3 | <title>mixpp: uibuilder.h Source File</title> |
---|
[290] | 4 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
[259] | 5 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
| 6 | </head><body> |
---|
[290] | 7 | <!-- Generated by Doxygen 1.5.8 --> |
---|
[271] | 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> |
---|
[259] | 49 | <div class="navigation" id="top"> |
---|
| 50 | <div class="tabs"> |
---|
| 51 | <ul> |
---|
[271] | 52 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
[259] | 53 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
| 54 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
[290] | 55 | <li><a href="annotated.html"><span>Classes</span></a></li> |
---|
[259] | 56 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
---|
| 57 | </ul> |
---|
| 58 | </div> |
---|
[290] | 59 | <div class="tabs"> |
---|
| 60 | <ul> |
---|
| 61 | <li><a href="files.html"><span>File List</span></a></li> |
---|
| 62 | <li><a href="globals.html"><span>File Members</span></a></li> |
---|
| 63 | </ul> |
---|
| 64 | </div> |
---|
[261] | 65 | <h1>uibuilder.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef UIBUILD</span> |
---|
[259] | 66 | <a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define UIBUILD</span> |
---|
| 67 | <a name="l00003"></a>00003 <span class="preprocessor"></span> |
---|
[261] | 68 | <a name="l00004"></a>00004 <span class="preprocessor">#include <itpp/itbase.h></span> |
---|
| 69 | <a name="l00005"></a>00005 <span class="preprocessor">#include "<a class="code" href="libBM_8h.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations.">stat/libBM.h</a>"</span> |
---|
| 70 | <a name="l00006"></a>00006 <span class="preprocessor">#include "libconfig/libconfig.h++"</span> |
---|
[259] | 71 | <a name="l00007"></a>00007 |
---|
[261] | 72 | <a name="l00008"></a>00008 <span class="keyword">namespace </span>bdm { |
---|
[259] | 73 | <a name="l00009"></a>00009 |
---|
[287] | 74 | <a name="l00010"></a>00010 <span class="keyword">using namespace </span>libconfig; |
---|
| 75 | <a name="l00011"></a>00011 <span class="keyword">using namespace </span>std; |
---|
[259] | 76 | <a name="l00012"></a>00012 |
---|
| 77 | <a name="l00013"></a>00013 <span class="preprocessor">#define CHECK_UITYPE(S,Type) it_assert_debug(S.getType()==Setting::Type, string("Wrong input path \"")+string(S.getPath())+string("\""));</span> |
---|
| 78 | <a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define UIREGISTER(UI) UI* UI##_global_instance = new UI();</span> |
---|
| 79 | <a name="l00015"></a>00015 <span class="preprocessor"></span> |
---|
[287] | 80 | <a name="l00017"></a>00017 <span class="preprocessor">#define UICATCH ( SettingTypeException e ) {it_error ( "Setting " +string ( e.getPath() ) +" is of incorrect Type" );} catch ( SettingNotFoundException e ) {it_error ( "Setting " + string ( e.getPath() ) +" was not found" );}</span> |
---|
| 81 | <a name="l00018"></a>00018 <span class="preprocessor"></span> |
---|
| 82 | <a name="l00020"></a>00020 |
---|
| 83 | <a name="l00021"></a>00021 <span class="keyword">class </span>UIbuilder; |
---|
| 84 | <a name="l00023"></a>00023 <span class="keyword">typedef</span> map<const string, const UIbuilder*> UImap; |
---|
| 85 | <a name="l00024"></a>00024 <span class="keyword">extern</span> UImap __uimap__; |
---|
| 86 | <a name="l00025"></a>00025 |
---|
| 87 | <a name="l00026"></a>00026 <span class="keyword">class </span>UIFile : <span class="keyword">public</span> Config { |
---|
| 88 | <a name="l00027"></a>00027 <span class="keyword">public</span>: |
---|
| 89 | <a name="l00028"></a>00028 UIFile ( <span class="keyword">const</span> <span class="keywordtype">char</span> * fname ) :Config() { |
---|
| 90 | <a name="l00029"></a>00029 <span class="keywordflow">try</span>{Config::readFile ( fname );} |
---|
| 91 | <a name="l00030"></a>00030 <span class="keywordflow">catch</span> ( FileIOException f ) {it_error ( <span class="stringliteral">"File "</span> + <span class="keywordtype">string</span> ( fname ) + <span class="stringliteral">" not found"</span> );} |
---|
| 92 | <a name="l00031"></a>00031 <span class="keywordflow">catch</span> ( ParseException& P ) { |
---|
| 93 | <a name="l00032"></a>00032 <span class="keywordtype">char</span> msg[200]; |
---|
| 94 | <a name="l00033"></a>00033 sprintf ( msg,<span class="stringliteral">"Error in file %s on line %d."</span>, fname, P.getLine() ); |
---|
| 95 | <a name="l00034"></a>00034 it_error ( msg ); |
---|
[271] | 96 | <a name="l00035"></a>00035 } |
---|
[287] | 97 | <a name="l00036"></a>00036 } |
---|
| 98 | <a name="l00037"></a>00037 }; |
---|
| 99 | <a name="l00038"></a>00038 |
---|
| 100 | <a name="l00041"></a>00041 |
---|
| 101 | <a name="l00043"></a>00043 <span class="keyword">inline</span> vec getvec ( Setting& S ) { |
---|
| 102 | <a name="l00044"></a>00044 CHECK_UITYPE ( S,TypeArray ); |
---|
| 103 | <a name="l00045"></a>00045 vec tmp; |
---|
| 104 | <a name="l00046"></a>00046 tmp.set_size ( S.getLength() ); |
---|
| 105 | <a name="l00047"></a>00047 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i<S.getLength();i++ ) { |
---|
| 106 | <a name="l00048"></a>00048 <span class="keywordflow">switch</span> ( S[i].getType() ) { |
---|
| 107 | <a name="l00049"></a>00049 <span class="keywordflow">case</span> Setting::TypeFloat : |
---|
| 108 | <a name="l00050"></a>00050 tmp[i]=double ( S[i] );<span class="keywordflow">break</span>; |
---|
| 109 | <a name="l00051"></a>00051 <span class="keywordflow">case</span> Setting::TypeInt : |
---|
| 110 | <a name="l00052"></a>00052 tmp[i]=int ( S[i] );<span class="keywordflow">break</span>; |
---|
| 111 | <a name="l00053"></a>00053 <span class="keywordflow">case</span> Setting::TypeBoolean : |
---|
| 112 | <a name="l00054"></a>00054 tmp[i]=bool ( S[i] );<span class="keywordflow">break</span>; |
---|
| 113 | <a name="l00055"></a>00055 <span class="keywordflow">default</span>: it_error ( <span class="stringliteral">"libconfig error?"</span> ); |
---|
| 114 | <a name="l00056"></a>00056 } |
---|
| 115 | <a name="l00057"></a>00057 } |
---|
| 116 | <a name="l00058"></a>00058 <span class="keywordflow">return</span> tmp; |
---|
| 117 | <a name="l00059"></a>00059 }; |
---|
| 118 | <a name="l00060"></a>00060 |
---|
| 119 | <a name="l00062"></a>00062 <span class="keyword">inline</span> mat getmat ( Setting& S , <span class="keywordtype">int</span> ncols ) { |
---|
| 120 | <a name="l00063"></a>00063 CHECK_UITYPE ( S,TypeArray ); |
---|
| 121 | <a name="l00064"></a>00064 mat tmp; |
---|
| 122 | <a name="l00065"></a>00065 <span class="keywordtype">int</span> nrows=S.getLength() /ncols; |
---|
| 123 | <a name="l00066"></a>00066 <span class="keywordtype">int</span> r=0,c=0; |
---|
| 124 | <a name="l00067"></a>00067 tmp.set_size ( nrows, ncols ); |
---|
| 125 | <a name="l00068"></a>00068 <span class="comment">// Build matrix row-wise</span> |
---|
| 126 | <a name="l00069"></a>00069 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i<S.getLength();i++ ) { |
---|
| 127 | <a name="l00070"></a>00070 <span class="keywordflow">switch</span> ( S[i].getType() ) { |
---|
| 128 | <a name="l00071"></a>00071 <span class="keywordflow">case</span> Setting::TypeFloat : |
---|
| 129 | <a name="l00072"></a>00072 tmp ( r,c ) =double ( S[i] );<span class="keywordflow">break</span>; |
---|
| 130 | <a name="l00073"></a>00073 <span class="keywordflow">case</span> Setting::TypeInt : |
---|
| 131 | <a name="l00074"></a>00074 tmp ( r,c ) =int ( S[i] );<span class="keywordflow">break</span>; |
---|
| 132 | <a name="l00075"></a>00075 <span class="keywordflow">case</span> Setting::TypeBoolean : |
---|
| 133 | <a name="l00076"></a>00076 tmp ( r,c ) =bool ( S[i] );<span class="keywordflow">break</span>; |
---|
| 134 | <a name="l00077"></a>00077 <span class="keywordflow">default</span>: it_error ( <span class="stringliteral">"libconfig error?"</span> ); |
---|
| 135 | <a name="l00078"></a>00078 } |
---|
| 136 | <a name="l00079"></a>00079 c++; <span class="keywordflow">if</span> ( c==ncols ) {c=0;r++;} |
---|
| 137 | <a name="l00080"></a>00080 } |
---|
| 138 | <a name="l00081"></a>00081 <span class="keywordflow">return</span> tmp; |
---|
| 139 | <a name="l00082"></a>00082 }; |
---|
| 140 | <a name="l00083"></a>00083 |
---|
| 141 | <a name="l00085"></a>00085 |
---|
| 142 | <a name="l00086"></a>00086 <span class="keyword">inline</span> ivec getivec ( Setting& S ) { |
---|
| 143 | <a name="l00087"></a>00087 CHECK_UITYPE ( S,TypeArray ); |
---|
| 144 | <a name="l00088"></a>00088 ivec tmp; |
---|
| 145 | <a name="l00089"></a>00089 tmp.set_size ( S.getLength() ); |
---|
| 146 | <a name="l00090"></a>00090 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i<S.getLength();i++ ) { |
---|
| 147 | <a name="l00091"></a>00091 <span class="keywordflow">switch</span> ( S[i].getType() ) { |
---|
| 148 | <a name="l00092"></a>00092 <span class="keywordflow">case</span> Setting::TypeFloat : |
---|
| 149 | <a name="l00093"></a>00093 tmp[i]=double ( S[i] );<span class="keywordflow">break</span>; |
---|
| 150 | <a name="l00094"></a>00094 <span class="keywordflow">case</span> Setting::TypeInt : |
---|
| 151 | <a name="l00095"></a>00095 tmp[i]=int ( S[i] );<span class="keywordflow">break</span>; |
---|
| 152 | <a name="l00096"></a>00096 <span class="keywordflow">case</span> Setting::TypeBoolean : |
---|
| 153 | <a name="l00097"></a>00097 tmp[i]=bool ( S[i] );<span class="keywordflow">break</span>; |
---|
| 154 | <a name="l00098"></a>00098 <span class="keywordflow">default</span>: it_error ( <span class="stringliteral">"libconfig error?"</span> ); |
---|
| 155 | <a name="l00099"></a>00099 } |
---|
| 156 | <a name="l00100"></a>00100 } |
---|
| 157 | <a name="l00101"></a>00101 <span class="keywordflow">return</span> tmp; |
---|
| 158 | <a name="l00102"></a>00102 }; |
---|
| 159 | <a name="l00103"></a>00103 |
---|
| 160 | <a name="l00105"></a>00105 |
---|
| 161 | <a name="l00106"></a>00106 <span class="keyword">inline</span> Array<string> get_as ( Setting& S ) { |
---|
| 162 | <a name="l00107"></a>00107 CHECK_UITYPE ( S,TypeArray ); |
---|
| 163 | <a name="l00108"></a>00108 Array<string> tmp; |
---|
| 164 | <a name="l00109"></a>00109 tmp.set_size ( S.getLength() ); |
---|
| 165 | <a name="l00110"></a>00110 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i<S.getLength();i++ ) {tmp ( i ) = ( <span class="keyword">const</span> <span class="keywordtype">char</span>* ) S[i];} |
---|
| 166 | <a name="l00111"></a>00111 <span class="keywordflow">return</span> tmp; |
---|
| 167 | <a name="l00112"></a>00112 }; |
---|
| 168 | <a name="l00113"></a>00113 |
---|
| 169 | <a name="l00115"></a>00115 |
---|
| 170 | <a name="l00120"></a><a class="code" href="classbdm_1_1UIbuilder.html">00120</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1UIbuilder.html" title="Builds computational object from a UserInfo structure.">UIbuilder</a> { |
---|
| 171 | <a name="l00121"></a>00121 <span class="keyword">protected</span>: |
---|
| 172 | <a name="l00122"></a>00122 <span class="keyword">public</span>: |
---|
| 173 | <a name="l00124"></a><a class="code" href="classbdm_1_1UIbuilder.html#c75103dd58395644e80f1eea886c656b">00124</a> <a class="code" href="classbdm_1_1UIbuilder.html#c75103dd58395644e80f1eea886c656b" title="Constructor needs to be run only once macro UIREGISTER.">UIbuilder</a> ( <span class="keyword">const</span> <span class="keywordtype">string</span> &typ ) {__uimap__.insert ( make_pair ( typ,<span class="keyword">this</span> ) );} |
---|
| 174 | <a name="l00126"></a>00126 <span class="keyword">virtual</span> <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a>* <a class="code" href="classbdm_1_1UIbuilder.html#193cede6302669ff48dfd8ab3b7e31f8" title="Function building the computational object.">build</a> ( Setting &S ) <span class="keyword">const</span> =0; |
---|
| 175 | <a name="l00127"></a>00127 }; |
---|
| 176 | <a name="l00128"></a>00128 |
---|
| 177 | <a name="l00138"></a><a class="code" href="classbdm_1_1UIexternal.html">00138</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1UIexternal.html">UIexternal</a>:<span class="keyword">public</span> <a class="code" href="classbdm_1_1UIbuilder.html" title="Builds computational object from a UserInfo structure.">UIbuilder</a> { |
---|
| 178 | <a name="l00139"></a>00139 <span class="keyword">public</span>: |
---|
| 179 | <a name="l00140"></a>00140 <a class="code" href="classbdm_1_1UIexternal.html">UIexternal</a>() :<a class="code" href="classbdm_1_1UIbuilder.html#c75103dd58395644e80f1eea886c656b" title="Constructor needs to be run only once macro UIREGISTER.">UIbuilder</a> ( <span class="stringliteral">"external"</span> ) {} |
---|
| 180 | <a name="l00141"></a>00141 <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a>* <a class="code" href="classbdm_1_1UIexternal.html#d0daa9edf070e7a01eff13ba02ce84a4" title="Function building the computational object.">build</a> ( Setting &S ) <span class="keyword">const</span>; |
---|
| 181 | <a name="l00142"></a>00142 }; |
---|
| 182 | <a name="l00143"></a>00143 |
---|
| 183 | <a name="l00152"></a><a class="code" href="classbdm_1_1UIinternal.html">00152</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1UIinternal.html">UIinternal</a>:<span class="keyword">public</span> <a class="code" href="classbdm_1_1UIbuilder.html" title="Builds computational object from a UserInfo structure.">UIbuilder</a> { |
---|
| 184 | <a name="l00153"></a>00153 <span class="keyword">public</span>: |
---|
| 185 | <a name="l00154"></a>00154 <a class="code" href="classbdm_1_1UIinternal.html">UIinternal</a>() :<a class="code" href="classbdm_1_1UIbuilder.html#c75103dd58395644e80f1eea886c656b" title="Constructor needs to be run only once macro UIREGISTER.">UIbuilder</a> ( <span class="stringliteral">"internal"</span> ) {} |
---|
| 186 | <a name="l00155"></a>00155 <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a>* <a class="code" href="classbdm_1_1UIinternal.html#badb583eaae9f935cda7b410d85d52a6" title="Function building the computational object.">build</a> ( Setting &S ) <span class="keyword">const</span>; |
---|
| 187 | <a name="l00156"></a>00156 }; |
---|
| 188 | <a name="l00157"></a>00157 |
---|
| 189 | <a name="l00159"></a>00159 <span class="keywordtype">void</span> UI_DBG ( Setting &S, <span class="keyword">const</span> <span class="keywordtype">string</span> &spc ); |
---|
| 190 | <a name="l00160"></a>00160 |
---|
| 191 | <a name="l00162"></a>00162 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
| 192 | <a name="l00163"></a>00163 <span class="keywordtype">void</span> UIbuild ( Setting &S, T* &ret ) { |
---|
| 193 | <a name="l00164"></a>00164 CHECK_UITYPE ( S,TypeGroup ); |
---|
| 194 | <a name="l00165"></a>00165 <span class="comment">// Check if field "type" is present, if not it is not a valid UI</span> |
---|
| 195 | <a name="l00166"></a>00166 it_assert_debug ( S.exists ( <span class="stringliteral">"type"</span> ), string ( S.getPath() ) +<span class="stringliteral">" is not a valid UI!"</span> ); |
---|
| 196 | <a name="l00167"></a>00167 |
---|
| 197 | <a name="l00168"></a>00168 <span class="keyword">const</span> <span class="keywordtype">string</span> typ=S[<span class="stringliteral">"type"</span>]; |
---|
| 198 | <a name="l00169"></a>00169 <span class="comment">// Find "type" in list of registred UI builders</span> |
---|
| 199 | <a name="l00170"></a>00170 UImap::const_iterator iter = __uimap__.find ( typ ); |
---|
| 200 | <a name="l00171"></a>00171 <span class="keywordflow">if</span> ( iter == __uimap__.end() ) { |
---|
| 201 | <a name="l00172"></a>00172 it_error ( <span class="stringliteral">"UI of type \""</span> + typ + <span class="stringliteral">"\" is not registered!"</span> ); |
---|
| 202 | <a name="l00173"></a>00173 } |
---|
| 203 | <a name="l00174"></a>00174 |
---|
| 204 | <a name="l00175"></a>00175 <span class="comment">//BUILD the result</span> |
---|
| 205 | <a name="l00176"></a>00176 <span class="keywordflow">try</span> { |
---|
| 206 | <a name="l00177"></a>00177 ret = <span class="keyword">dynamic_cast<</span>T*<span class="keyword">></span> ( iter->second->build ( S ) ); |
---|
| 207 | <a name="l00178"></a>00178 } |
---|
| 208 | <a name="l00179"></a>00179 <span class="keywordflow">catch</span> UICATCH |
---|
| 209 | <a name="l00180"></a>00180 }; |
---|
| 210 | <a name="l00181"></a>00181 |
---|
| 211 | <a name="l00183"></a>00183 <span class="keyword">template</span><<span class="keyword">class</span> T> |
---|
| 212 | <a name="l00184"></a>00184 <span class="keywordtype">void</span> UIcall ( Setting &S, <span class="keywordtype">void</span> ( *func ) ( Setting&, T ), T Tmp ) { |
---|
| 213 | <a name="l00185"></a>00185 CHECK_UITYPE ( S,TypeGroup ); |
---|
| 214 | <a name="l00186"></a>00186 <span class="comment">// Check if field "type" is present, if not it is not a valid UI</span> |
---|
| 215 | <a name="l00187"></a>00187 it_assert_debug ( S.exists ( <span class="stringliteral">"type"</span> ), string ( S.getPath() ) +<span class="stringliteral">" is not a valid UI!"</span> ); |
---|
| 216 | <a name="l00188"></a>00188 |
---|
| 217 | <a name="l00189"></a>00189 <span class="keyword">const</span> <span class="keywordtype">string</span> typ=S[<span class="stringliteral">"type"</span>]; |
---|
| 218 | <a name="l00190"></a>00190 <span class="keywordflow">if</span> ( typ==<span class="stringliteral">"internal"</span> ) { |
---|
| 219 | <a name="l00191"></a>00191 <span class="keywordflow">try</span> { |
---|
| 220 | <a name="l00192"></a>00192 Setting* Stmp = &S; |
---|
| 221 | <a name="l00193"></a>00193 <span class="keywordflow">do</span> {Stmp=& ( Stmp->getParent() );} |
---|
| 222 | <a name="l00194"></a>00194 <span class="keywordflow">while</span> ( !Stmp->isRoot() ); |
---|
| 223 | <a name="l00195"></a>00195 Setting& intS=Stmp->lookup ( ( <span class="keyword">const</span> <span class="keywordtype">char</span>* ) S[<span class="stringliteral">"path"</span>] ); |
---|
| 224 | <a name="l00196"></a>00196 func ( intS, Tmp ); <span class="comment">// <======== calling func</span> |
---|
| 225 | <a name="l00197"></a>00197 <span class="keywordflow">return</span>; |
---|
| 226 | <a name="l00198"></a>00198 } |
---|
| 227 | <a name="l00199"></a>00199 <span class="keywordflow">catch</span> ( ... ) { |
---|
| 228 | <a name="l00200"></a>00200 it_error ( <span class="stringliteral">"Internal field "</span> + <span class="keywordtype">string</span> ( S.getPath() ) + <span class="stringliteral">" not valid"</span> ); |
---|
| 229 | <a name="l00201"></a>00201 } |
---|
| 230 | <a name="l00202"></a>00202 } |
---|
| 231 | <a name="l00203"></a>00203 <span class="keywordflow">if</span> ( typ==<span class="stringliteral">"external"</span> ) { |
---|
| 232 | <a name="l00204"></a>00204 UIFile C ( S[<span class="stringliteral">"filename"</span>] ); |
---|
| 233 | <a name="l00205"></a>00205 <span class="keywordflow">try</span> { |
---|
| 234 | <a name="l00206"></a>00206 func ( C.lookup ( ( <span class="keyword">const</span> <span class="keywordtype">char</span>* ) S[<span class="stringliteral">"path"</span>] ), Tmp ); |
---|
| 235 | <a name="l00207"></a>00207 } |
---|
| 236 | <a name="l00208"></a>00208 <span class="keywordflow">catch</span> ( ... ) { |
---|
| 237 | <a name="l00209"></a>00209 it_error ( <span class="stringliteral">"External field "</span> + <span class="keywordtype">string</span> ( S.getPath() ) + <span class="stringliteral">" not valid"</span> ); |
---|
| 238 | <a name="l00210"></a>00210 } |
---|
| 239 | <a name="l00211"></a>00211 <span class="keywordflow">return</span>; |
---|
| 240 | <a name="l00212"></a>00212 } |
---|
| 241 | <a name="l00213"></a>00213 |
---|
| 242 | <a name="l00214"></a>00214 <span class="comment">// v======================= calling final func</span> |
---|
| 243 | <a name="l00215"></a>00215 func ( S, Tmp ); |
---|
| 244 | <a name="l00216"></a>00216 }; |
---|
| 245 | <a name="l00217"></a>00217 |
---|
| 246 | <a name="l00218"></a>00218 } |
---|
| 247 | <a name="l00219"></a>00219 <span class="preprocessor">#endif //UIBUILD</span> |
---|
[259] | 248 | </pre></div></div> |
---|
[312] | 249 | <hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 9 14:33:20 2009 for mixpp by |
---|
[259] | 250 | <a href="http://www.doxygen.org/index.html"> |
---|
[290] | 251 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
[259] | 252 | </body> |
---|
| 253 | </html> |
---|