1 | /* |
---|
2 | * @(#)engine.h generated by: makeheader 4.21 Tue Jul 26 22:56:49 2005 |
---|
3 | * |
---|
4 | * built from: ../../src/include/copyright.h |
---|
5 | * ../../src/include/pragma_interface.h |
---|
6 | * ./engapi.cpp |
---|
7 | * ./engapiv4.cpp |
---|
8 | * ./engapiv5.cpp |
---|
9 | * ./fengapi.cpp |
---|
10 | * ./fengapiv5.cpp |
---|
11 | */ |
---|
12 | |
---|
13 | #ifndef engine_h |
---|
14 | #define engine_h |
---|
15 | |
---|
16 | |
---|
17 | /* |
---|
18 | * Copyright 1984-2003 The MathWorks, Inc. |
---|
19 | * All Rights Reserved. |
---|
20 | */ |
---|
21 | |
---|
22 | |
---|
23 | |
---|
24 | /* Copyright 2003-2004 The MathWorks, Inc. */ |
---|
25 | |
---|
26 | /* |
---|
27 | * Prevent g++ from making copies of vtable and typeinfo data |
---|
28 | * in every compilation unit. By allowing for only one, we can |
---|
29 | * save space and prevent some situations where the linker fails |
---|
30 | * to coalesce them properly into a single entry. |
---|
31 | * |
---|
32 | * References: |
---|
33 | * http://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html#Vague%20Linkage |
---|
34 | * http://gcc.gnu.org/onlinedocs/gcc/C---Interface.html |
---|
35 | */ |
---|
36 | |
---|
37 | #ifdef __cplusplus |
---|
38 | # ifdef __linux__ |
---|
39 | # pragma interface |
---|
40 | # endif |
---|
41 | #endif |
---|
42 | |
---|
43 | |
---|
44 | |
---|
45 | #include "matrix.h" /* mx Routines used in module */ |
---|
46 | |
---|
47 | |
---|
48 | typedef struct engine Engine; /* Incomplete definition for Engine */ |
---|
49 | |
---|
50 | #ifdef __cplusplus |
---|
51 | extern "C" { |
---|
52 | #endif |
---|
53 | /* |
---|
54 | * Execute matlab statement |
---|
55 | */ |
---|
56 | extern int engEvalString( |
---|
57 | Engine *ep, /* engine pointer */ |
---|
58 | const char *string /* string for matlab t execute */ |
---|
59 | ); |
---|
60 | #ifdef __cplusplus |
---|
61 | } |
---|
62 | #endif |
---|
63 | |
---|
64 | #ifdef __cplusplus |
---|
65 | extern "C" { |
---|
66 | #endif |
---|
67 | /* |
---|
68 | * Start matlab process for single use. |
---|
69 | * Not currently supported on UNIX. |
---|
70 | */ |
---|
71 | extern Engine *engOpenSingleUse( |
---|
72 | const char *startcmd, /* exec command string used to start matlab */ |
---|
73 | void *reserved, /* reserved for future use, must be NULL */ |
---|
74 | int *retstatus /* return status */ |
---|
75 | ); |
---|
76 | #ifdef __cplusplus |
---|
77 | } |
---|
78 | #endif |
---|
79 | |
---|
80 | #ifdef __cplusplus |
---|
81 | extern "C" { |
---|
82 | #endif |
---|
83 | /* |
---|
84 | * SetVisible, do nothing since this function is only for NT |
---|
85 | */ |
---|
86 | extern int engSetVisible( |
---|
87 | Engine *ep, /* engine pointer */ |
---|
88 | bool newVal |
---|
89 | ); |
---|
90 | #ifdef __cplusplus |
---|
91 | } |
---|
92 | #endif |
---|
93 | |
---|
94 | #ifdef __cplusplus |
---|
95 | extern "C" { |
---|
96 | #endif |
---|
97 | /* |
---|
98 | * GetVisible, do nothing since this function is only for NT |
---|
99 | */ |
---|
100 | extern int engGetVisible( |
---|
101 | Engine *ep, /* engine pointer */ |
---|
102 | bool* bVal |
---|
103 | ); |
---|
104 | #ifdef __cplusplus |
---|
105 | } |
---|
106 | #endif |
---|
107 | |
---|
108 | #ifdef __cplusplus |
---|
109 | extern "C" { |
---|
110 | #endif |
---|
111 | /* |
---|
112 | * Start matlab process |
---|
113 | */ |
---|
114 | extern Engine *engOpen( |
---|
115 | const char *startcmd /* exec command string used to start matlab */ |
---|
116 | ); |
---|
117 | #ifdef __cplusplus |
---|
118 | } |
---|
119 | #endif |
---|
120 | |
---|
121 | #ifdef __cplusplus |
---|
122 | extern "C" { |
---|
123 | #endif |
---|
124 | /* |
---|
125 | * Close down matlab server |
---|
126 | */ |
---|
127 | extern int engClose( |
---|
128 | Engine *ep /* engine pointer */ |
---|
129 | ); |
---|
130 | #ifdef __cplusplus |
---|
131 | } |
---|
132 | #endif |
---|
133 | |
---|
134 | #ifdef __cplusplus |
---|
135 | extern "C" { |
---|
136 | #endif |
---|
137 | /* |
---|
138 | * Get a variable with the specified name from MATLAB's workspace |
---|
139 | */ |
---|
140 | extern mxArray *engGetVariable( |
---|
141 | Engine *ep, /* engine pointer */ |
---|
142 | const char *name /* name of variable to get */ |
---|
143 | ); |
---|
144 | #ifdef __cplusplus |
---|
145 | } |
---|
146 | #endif |
---|
147 | |
---|
148 | #ifdef __cplusplus |
---|
149 | extern "C" { |
---|
150 | #endif |
---|
151 | /* |
---|
152 | * Put a variable into MATLAB's workspace with the specified name |
---|
153 | */ |
---|
154 | extern int engPutVariable( |
---|
155 | Engine *ep, /* engine pointer */ |
---|
156 | const char *var_name, |
---|
157 | const mxArray *ap /* array pointer */ |
---|
158 | ); |
---|
159 | #ifdef __cplusplus |
---|
160 | } |
---|
161 | #endif |
---|
162 | |
---|
163 | #ifdef __cplusplus |
---|
164 | extern "C" { |
---|
165 | #endif |
---|
166 | /* |
---|
167 | * register a buffer to hold matlab text output |
---|
168 | */ |
---|
169 | extern int engOutputBuffer( |
---|
170 | Engine *ep, /* engine pointer */ |
---|
171 | char *buffer, /* character array to hold output */ |
---|
172 | int buflen /* buffer array length */ |
---|
173 | ); |
---|
174 | #ifdef __cplusplus |
---|
175 | } |
---|
176 | #endif |
---|
177 | |
---|
178 | |
---|
179 | #define engOpenV4() cannot_call_engOpenV4 |
---|
180 | |
---|
181 | |
---|
182 | #define engGetFull() engGetFull_is_obsolete |
---|
183 | #define engPutFull() engPutFull_is_obsolete |
---|
184 | #define engGetMatrix() engGetMatrix_is_obsolete |
---|
185 | #define engPutMatrix() engPutMatrix_is_obsolete |
---|
186 | |
---|
187 | |
---|
188 | #if defined(V5_COMPAT) |
---|
189 | #define engPutArray(ep, ap) engPutVariable(ep, mxGetName(ap), ap) |
---|
190 | #define engGetArray(ep, name) engGetVariable(ep, name) |
---|
191 | #else |
---|
192 | #define engPutArray() engPutArray_is_obsolete |
---|
193 | #define engGetArray() engGetArray_is_obsolete |
---|
194 | #endif /* defined(V5_COMPAT) */ |
---|
195 | |
---|
196 | #endif /* engine_h */ |
---|