summaryrefslogtreecommitdiff
path: root/doc/html/thirdparty_2linux_2include_2fun_8h_source.html
blob: 0c42ddc77e97d7678d23ceff0e8eaacaa5d0102f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FOSSEE Scilab Octave Toolbox: thirdparty/linux/include/fun.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Scilab_Logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">FOSSEE Scilab Octave Toolbox
   </div>
   <div id="projectbrief">This is a scilab toolbox to call octave functions. It requires octave to be installed on the system.</div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.svg"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('thirdparty_2linux_2include_2fun_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">fun.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="thirdparty_2linux_2include_2fun_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">// Copyright (C) 2019 - IIT Bombay - FOSSEE</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">// This file must be used under the terms of the CeCILL.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">// This source file is licensed as described in the file COPYING, which</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">// you should have received as part of this distribution.  The terms</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">// are also available at</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">// Author: Rupak Rokade</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">// Organization: FOSSEE, IIT Bombay</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">// Email: toolbox@scilab.in</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160; </div>
<div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="thirdparty_2linux_2include_2fun_8h.html#a2ca3f7142a7018d5861959828144a9e9">   12</a></span>&#160;<span class="preprocessor">#define fun_h__</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">//extern &quot;C&quot; int fun (double* answ, double* in1, int in1_row, std::string name, std::string opt);</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;{</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160; </div>
<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="thirdparty_2linux_2include_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134">   18</a></span>&#160;    <span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="thirdparty_2linux_2include_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134a019d94f7c571e36215cc1a41e825de0c">   19</a></span>&#160;        <a class="code" href="src_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134a019d94f7c571e36215cc1a41e825de0c">TYPE_DOUBLE</a>,</div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="thirdparty_2linux_2include_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134a93b716b9a66d34b56d36773e5337f3dc">   20</a></span>&#160;        <a class="code" href="src_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134a93b716b9a66d34b56d36773e5337f3dc">TYPE_COMPLEX</a>,</div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="thirdparty_2linux_2include_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134addb4be6b1cc25112defabef75f73427a">   21</a></span>&#160;        <a class="code" href="src_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134addb4be6b1cc25112defabef75f73427a">TYPE_STRING</a>,</div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="thirdparty_2linux_2include_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134a9001cd1bc103bb1d664228d46715f65c">   22</a></span>&#160;        <a class="code" href="src_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134a9001cd1bc103bb1d664228d46715f65c">TYPE_STRUCT</a>,</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    }<a class="code" href="src_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134">FUNCTYPE</a>;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        <a class="code" href="src_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134">FUNCTYPE</a> type;      <span class="comment">// type of value in struct&#39;s field</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        <span class="keywordtype">void</span>* key;          <span class="comment">// key of struct field</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        <span class="keywordtype">int</span> rows;           <span class="comment">// rows dimension of struct field&#39;s value</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        <span class="keywordtype">int</span> cols;           <span class="comment">// cols dimension of struct fields&#39; value</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        <span class="keywordtype">void</span>* dataReal;     <span class="comment">// Real data if struct field&#39;s value is real</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;        <span class="keywordtype">void</span>* dataImg;      <span class="comment">// Img data if struct field&#39;s value is complex</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;        <span class="keywordtype">void</span>* str;          <span class="comment">// string data if struct field&#39;s value is string</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    } <a class="code" href="struct_f_u_n_c_s_t_r_u_c_t.html">FUNCSTRUCT</a>;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <a class="code" href="src_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134">FUNCTYPE</a> type;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        <span class="keywordtype">int</span> n_in_rows;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        <span class="keywordtype">int</span> n_in_cols;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <span class="keywordtype">int</span> n_in_struct_len;    <span class="comment">// ip struct length</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        <span class="keywordtype">int</span> n_out_rows;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        <span class="keywordtype">int</span> n_out_cols;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        <span class="keywordtype">int</span> n_out_struct_len;   <span class="comment">// op struct length</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="keywordtype">int</span> is_in_cmplx;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <span class="keywordtype">int</span> is_out_cmplx;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <span class="keywordtype">int</span> is_out_string;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keywordtype">int</span> is_out_struct;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        <span class="keywordtype">void</span>* in_data_real;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        <span class="keywordtype">void</span>* in_data_img;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        <span class="keywordtype">void</span>* out_data_real;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <span class="keywordtype">void</span>* out_data_img;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <a class="code" href="struct_f_u_n_c_s_t_r_u_c_t.html">FUNCSTRUCT</a>* in_struct;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        <a class="code" href="struct_f_u_n_c_s_t_r_u_c_t.html">FUNCSTRUCT</a>* out_struct;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    } <a class="code" href="struct_f_u_n_c_a_r_g_s.html">FUNCARGS</a>;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <span class="keywordtype">int</span> n_in_arguments;     <span class="comment">// number of input arguments</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keywordtype">int</span> n_out_arguments;    <span class="comment">// number of output arguments</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <span class="keywordtype">int</span> n_out_user;         <span class="comment">// number of output arguments</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keywordtype">char</span> *err;              <span class="comment">// Name</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <span class="comment">//char *package;        //Name of octave package to be loaded</span></div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <a class="code" href="struct_f_u_n_c_a_r_g_s.html">FUNCARGS</a> *argument;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    } <a class="code" href="struct_f_u_n_c_c_a_l_l.html">FUNCCALL</a>;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="src_2fun_8h.html#adda0eaf7454844236de53495b494cdd4">fun</a>(<a class="code" href="struct_f_u_n_c_a_r_g_s.html">FUNCARGS</a> *arr, <a class="code" href="struct_f_u_n_c_c_a_l_l.html">FUNCCALL</a> *call);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;}</div>
<div class="ttc" id="asrc_2fun_8h_html_a160793ea95e0b5106580229a2a5f1134"><div class="ttname"><a href="src_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134">FUNCTYPE</a></div><div class="ttdeci">FUNCTYPE</div><div class="ttdoc">Enumeration for the data types suported.</div><div class="ttdef"><b>Definition:</b> fun.h:22</div></div>
<div class="ttc" id="asrc_2fun_8h_html_a160793ea95e0b5106580229a2a5f1134a019d94f7c571e36215cc1a41e825de0c"><div class="ttname"><a href="src_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134a019d94f7c571e36215cc1a41e825de0c">TYPE_DOUBLE</a></div><div class="ttdeci">@ TYPE_DOUBLE</div><div class="ttdef"><b>Definition:</b> fun.h:23</div></div>
<div class="ttc" id="asrc_2fun_8h_html_a160793ea95e0b5106580229a2a5f1134a9001cd1bc103bb1d664228d46715f65c"><div class="ttname"><a href="src_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134a9001cd1bc103bb1d664228d46715f65c">TYPE_STRUCT</a></div><div class="ttdeci">@ TYPE_STRUCT</div><div class="ttdef"><b>Definition:</b> fun.h:26</div></div>
<div class="ttc" id="asrc_2fun_8h_html_a160793ea95e0b5106580229a2a5f1134a93b716b9a66d34b56d36773e5337f3dc"><div class="ttname"><a href="src_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134a93b716b9a66d34b56d36773e5337f3dc">TYPE_COMPLEX</a></div><div class="ttdeci">@ TYPE_COMPLEX</div><div class="ttdef"><b>Definition:</b> fun.h:24</div></div>
<div class="ttc" id="asrc_2fun_8h_html_a160793ea95e0b5106580229a2a5f1134addb4be6b1cc25112defabef75f73427a"><div class="ttname"><a href="src_2fun_8h.html#a160793ea95e0b5106580229a2a5f1134addb4be6b1cc25112defabef75f73427a">TYPE_STRING</a></div><div class="ttdeci">@ TYPE_STRING</div><div class="ttdef"><b>Definition:</b> fun.h:25</div></div>
<div class="ttc" id="asrc_2fun_8h_html_adda0eaf7454844236de53495b494cdd4"><div class="ttname"><a href="src_2fun_8h.html#adda0eaf7454844236de53495b494cdd4">fun</a></div><div class="ttdeci">int fun(FUNCARGS *arr, FUNCCALL *call)</div><div class="ttdoc">API Function to call/receive and pass the data to fun API</div><div class="ttdef"><b>Definition:</b> fun.cpp:30</div></div>
<div class="ttc" id="astruct_f_u_n_c_a_r_g_s_html"><div class="ttname"><a href="struct_f_u_n_c_a_r_g_s.html">FUNCARGS</a></div><div class="ttdoc">Struct used to send/receive Scilab data to/from the gateway to fun.cpp API.</div><div class="ttdef"><b>Definition:</b> fun.h:51</div></div>
<div class="ttc" id="astruct_f_u_n_c_c_a_l_l_html"><div class="ttname"><a href="struct_f_u_n_c_c_a_l_l.html">FUNCCALL</a></div><div class="ttdoc">Struct used to call and pass the data to fun.cpp API.</div><div class="ttdef"><b>Definition:</b> fun.h:76</div></div>
<div class="ttc" id="astruct_f_u_n_c_s_t_r_u_c_t_html"><div class="ttname"><a href="struct_f_u_n_c_s_t_r_u_c_t.html">FUNCSTRUCT</a></div><div class="ttdoc">Struct used to pass structs to Octave from the fun library.</div><div class="ttdef"><b>Definition:</b> fun.h:35</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_7f51fab15f37f4c20c90b1af38889ac7.html">thirdparty</a></li><li class="navelem"><a class="el" href="dir_3367fc1c767e0df0b96d5ba63da8b19b.html">linux</a></li><li class="navelem"><a class="el" href="dir_2051be8f10baf40b9a7bbdabea01ba98.html">include</a></li><li class="navelem"><a class="el" href="thirdparty_2linux_2include_2fun_8h.html">fun.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>