root/doc/html/itppconf_8h-source.html @ 259

Revision 259, 3.6 kB (checked in by smidl, 16 years ago)

doc

RevLine 
[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">
3<title>mixpp: work/git/mixpp/bdm/config/itppconf.h Source File</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="annotated.html"><span>Classes</span></a></li>
15      <li class="current"><a href="files.html"><span>Files</span></a></li>
16    </ul>
17  </div>
18<h1>work/git/mixpp/bdm/config/itppconf.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &lt;libconfig.h++&gt;</span>
19<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;itpp/itbase.h&gt;</span>
20<a name="l00003"></a>00003
21<a name="l00004"></a>00004 <span class="preprocessor">#ifndef ITPPCONF</span>
22<a name="l00005"></a>00005 <span class="preprocessor"></span><span class="preprocessor">#define ITPPCONF</span>
23<a name="l00006"></a>00006 <span class="preprocessor"></span>
24<a name="l00007"></a>00007 <span class="keyword">using namespace </span>libconfig;
25<a name="l00008"></a>00008 <span class="keyword">using namespace </span>bdm;
26<a name="l00009"></a>00009         
27<a name="l00010"></a>00010 vec getVec(Setting &amp;S){
28<a name="l00011"></a>00011         vec tmp;
29<a name="l00012"></a>00012         <span class="keywordtype">int</span> len;
30<a name="l00013"></a>00013         Setting::Type T=S.getType();
31<a name="l00014"></a>00014         <span class="keywordflow">if</span>(T==Setting::TypeArray) {
32<a name="l00015"></a>00015                 len = S.getLength();
33<a name="l00016"></a>00016                 tmp.set_length(len);
34<a name="l00017"></a>00017                 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;len;i++){
35<a name="l00018"></a>00018                         <span class="keywordflow">switch</span> (S[i].getType()) {
36<a name="l00019"></a>00019                         <span class="keywordflow">case</span> Setting::TypeFloat :
37<a name="l00020"></a>00020                                 tmp[i]=double(S[i]);<span class="keywordflow">break</span>;
38<a name="l00021"></a>00021                         <span class="keywordflow">case</span> Setting::TypeInt :
39<a name="l00022"></a>00022                                 tmp[i]=int(S[i]);<span class="keywordflow">break</span>;
40<a name="l00023"></a>00023                         <span class="keywordflow">case</span> Setting::TypeBoolean :
41<a name="l00024"></a>00024                                 tmp[i]=bool(S[i]);<span class="keywordflow">break</span>;
42<a name="l00025"></a>00025                         }
43<a name="l00026"></a>00026                 }
44<a name="l00027"></a>00027         }
45<a name="l00028"></a>00028         <span class="keywordflow">return</span> tmp;
46<a name="l00029"></a>00029 }
47<a name="l00030"></a>00030
48<a name="l00031"></a>00031 vec xxx(){<span class="keywordflow">return</span> vec_1(3.2);}
49<a name="l00032"></a>00032
50<a name="l00033"></a>00033 <span class="preprocessor">#endif ITPPCONF</span>
51</pre></div></div>
52<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jan 27 16:29:52 2009 for mixpp by&nbsp;
53<a href="http://www.doxygen.org/index.html">
54<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
55</body>
56</html>
Note: See TracBrowser for help on using the browser.