1 /* "CodeWorker":	a scripting language for parsing and generating text.
2 
3 Copyright (C) 1996-1997, 1999-2005 C�dric Lemaire
4 
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9 
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 Lesser General Public License for more details.
14 
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18 
19 To contact the author: codeworker@free.fr
20 */
21 
22 #include "ScpStream.h"
23 
24 #include "CGRuntime.h"
25 #include "ExprScriptVariable.h"
26 #include "GrfBlock.h"
27 #include "DtaScript.h"
28 
29 #include "JNI-utils.h"
30 #include "JNIRuntime.h"
31 
32 
Java_org_codeworker_jni_Runtime_registerScript(JNIEnv * pEnv,jclass,jstring jKey,jobject jScript)33 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_registerScript(JNIEnv *pEnv, jclass, jstring jKey, jobject jScript) {
34 	GET_STRING(Key);
35 	GET_CWOBJECT_HANDLE(Script, EXECUTE_FUNCTION);
36 	CodeWorker::CGRuntime::registerScript(tcKey, pScriptInstance);
37 	RELEASE_STRING(Key);
38 }
39 
Java_org_codeworker_jni_Runtime_entryPoint(JNIEnv * pEnv,jclass,jobjectArray jArgs,jobject jScript)40 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_entryPoint(JNIEnv *pEnv, jclass, jobjectArray jArgs, jobject jScript) {
41 #define CW_FINALLY \
42 					for (int j = 0; j < iSize; j++) {\
43 						jstring pText = (jstring) pEnv->GetObjectArrayElement(jArgs, j);\
44 						pEnv->ReleaseStringUTFChars(pText, tsArgs[j]);\
45 					}\
46 					delete [] tsArgs
47 	int iResult;
48 	int iSize = pEnv->GetArrayLength(jArgs);
49 	char** tsArgs = new char*[iSize];
50 	for (int i = 0; i < iSize; i++) {
51 		jstring pText = (jstring) pEnv->GetObjectArrayElement(jArgs, i);
52 		tsArgs[i] = (char*) pEnv->GetStringUTFChars(pText, 0);
53 	}
54 	GET_CWOBJECT_HANDLE(Script, EXECUTE_FUNCTION);
55 	try {
56 		iResult = CodeWorker::CGRuntime::entryPoint(iSize, tsArgs, pScriptInstance);
57 		CW_FINALLY;
58 	} catch(std::exception& except) {
59 		CW_FINALLY;
60 		pEnv->ThrowNew(pEnv->FindClass("org/codeworker/Exception"), except.what());
61 	}
62 #undef CW_FINALLY
63 	return iResult;
64 }
65 
Java_org_codeworker_jni_Runtime_parseAsBNF(JNIEnv * pEnv,jclass,jobject jScript,jobject jContext,jstring jInputFile)66 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_parseAsBNF(JNIEnv *pEnv, jclass, jobject jScript, jobject jContext, jstring jInputFile) {
67 	GET_CWOBJECT_HANDLE(Script, EXECUTE_FUNCTION);
68 	GET_PARSETREE_HANDLE(Context);
69 	GET_STRING(InputFile);
70 	std::string sInputFile = tcInputFile;
71 	RELEASE_STRING(InputFile);
72 	try {
73 		CodeWorker::CGRuntime::parseAsBNF(pScriptInstance, pContextInstance, sInputFile);
74 	} catch(std::exception& except) {
75 		pEnv->ThrowNew(pEnv->FindClass("org/codeworker/Exception"), except.what());
76 	}
77 }
78 
Java_org_codeworker_jni_Runtime_getThisTree(JNIEnv * pEnv,jclass)79 JNIEXPORT jobject JNICALL Java_org_codeworker_jni_Runtime_getThisTree(JNIEnv *pEnv, jclass) {
80 	jclass pClass = pEnv->FindClass("Lorg/codeworker/jni/ParseTree;");
81 	return createWrapper(pEnv, pClass, &CodeWorker::CGRuntime::getThisInternalNode());
82 }
83 
Java_org_codeworker_jni_Runtime_throwBNFExecutionError(JNIEnv * pEnv,jclass,jstring jMessage)84 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_throwBNFExecutionError(JNIEnv *pEnv, jclass, jstring jMessage) {
85 	GET_STRING(Message);
86 	std::string sMessage = tcMessage;
87 	RELEASE_STRING(Message);
88 	try {
89 		CodeWorker::CGRuntime::throwBNFExecutionError(sMessage);
90 	} catch(std::exception& except) {
91 		pEnv->ThrowNew(pEnv->FindClass("org/codeworker/Exception"), except.what());
92 	}
93 }
94 
95 //##markup##"functions"
96 //##begin##"functions"
Java_org_codeworker_jni_Runtime_appendFile(JNIEnv * pEnv,jclass,jstring jFilename,jstring jContent)97 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_appendFile(JNIEnv *pEnv, jclass, jstring jFilename, jstring jContent) {
98 	std::string sFilename;
99 	GET_STRING(Filename);
100 	sFilename = tcFilename;
101 	std::string sContent;
102 	GET_STRING(Content);
103 	sContent = tcContent;
104 	CodeWorker::CGRuntime::appendFile(sFilename, sContent);
105 	RELEASE_STRING(Content);
106 	RELEASE_STRING(Filename);
107 }
108 
Java_org_codeworker_jni_Runtime_clearVariable(JNIEnv * pEnv,jclass,jobject jNode)109 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_clearVariable(JNIEnv *pEnv, jclass, jobject jNode) {
110 	CodeWorker::DtaScriptVariable* pNode;
111 	GET_PARSETREE_HANDLE(Node);
112 	pNode = pNodeInstance;
113 	CodeWorker::CGRuntime::clearVariable(pNode);
114 }
115 
Java_org_codeworker_jni_Runtime_compileToCpp(JNIEnv * pEnv,jclass,jstring jScriptFileName,jstring jProjectDirectory,jstring jCodeWorkerDirectory)116 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_compileToCpp(JNIEnv *pEnv, jclass, jstring jScriptFileName, jstring jProjectDirectory, jstring jCodeWorkerDirectory) {
117 	std::string sScriptFileName;
118 	GET_STRING(ScriptFileName);
119 	sScriptFileName = tcScriptFileName;
120 	std::string sProjectDirectory;
121 	GET_STRING(ProjectDirectory);
122 	sProjectDirectory = tcProjectDirectory;
123 	std::string sCodeWorkerDirectory;
124 	GET_STRING(CodeWorkerDirectory);
125 	sCodeWorkerDirectory = tcCodeWorkerDirectory;
126 	CodeWorker::CGRuntime::compileToCpp(sScriptFileName, sProjectDirectory, sCodeWorkerDirectory);
127 	RELEASE_STRING(CodeWorkerDirectory);
128 	RELEASE_STRING(ProjectDirectory);
129 	RELEASE_STRING(ScriptFileName);
130 }
131 
Java_org_codeworker_jni_Runtime_copyFile(JNIEnv * pEnv,jclass,jstring jSourceFileName,jstring jDestinationFileName)132 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_copyFile(JNIEnv *pEnv, jclass, jstring jSourceFileName, jstring jDestinationFileName) {
133 	std::string sSourceFileName;
134 	GET_STRING(SourceFileName);
135 	sSourceFileName = tcSourceFileName;
136 	std::string sDestinationFileName;
137 	GET_STRING(DestinationFileName);
138 	sDestinationFileName = tcDestinationFileName;
139 	CodeWorker::CGRuntime::copyFile(sSourceFileName, sDestinationFileName);
140 	RELEASE_STRING(DestinationFileName);
141 	RELEASE_STRING(SourceFileName);
142 }
143 
Java_org_codeworker_jni_Runtime_copyGenerableFile(JNIEnv * pEnv,jclass,jstring jSourceFileName,jstring jDestinationFileName)144 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_copyGenerableFile(JNIEnv *pEnv, jclass, jstring jSourceFileName, jstring jDestinationFileName) {
145 	std::string sSourceFileName;
146 	GET_STRING(SourceFileName);
147 	sSourceFileName = tcSourceFileName;
148 	std::string sDestinationFileName;
149 	GET_STRING(DestinationFileName);
150 	sDestinationFileName = tcDestinationFileName;
151 	CodeWorker::CGRuntime::copyGenerableFile(sSourceFileName, sDestinationFileName);
152 	RELEASE_STRING(DestinationFileName);
153 	RELEASE_STRING(SourceFileName);
154 }
155 
Java_org_codeworker_jni_Runtime_copySmartDirectory(JNIEnv * pEnv,jclass,jstring jSourceDirectory,jstring jDestinationPath)156 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_copySmartDirectory(JNIEnv *pEnv, jclass, jstring jSourceDirectory, jstring jDestinationPath) {
157 	std::string sSourceDirectory;
158 	GET_STRING(SourceDirectory);
159 	sSourceDirectory = tcSourceDirectory;
160 	std::string sDestinationPath;
161 	GET_STRING(DestinationPath);
162 	sDestinationPath = tcDestinationPath;
163 	CodeWorker::CGRuntime::copySmartDirectory(sSourceDirectory, sDestinationPath);
164 	RELEASE_STRING(DestinationPath);
165 	RELEASE_STRING(SourceDirectory);
166 }
167 
Java_org_codeworker_jni_Runtime_cutString(JNIEnv * pEnv,jclass,jstring jText,jstring jSeparator,jobject jList)168 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_cutString(JNIEnv *pEnv, jclass, jstring jText, jstring jSeparator, jobject jList) {
169 	std::string sText;
170 	GET_STRING(Text);
171 	sText = tcText;
172 	std::string sSeparator;
173 	GET_STRING(Separator);
174 	sSeparator = tcSeparator;
175 	std::list<std::string> slList;
176 	// NOT HANDLED YET!
177 	CodeWorker::CGRuntime::cutString(sText, sSeparator, slList);
178 	RELEASE_STRING(Separator);
179 	RELEASE_STRING(Text);
180 }
181 
Java_org_codeworker_jni_Runtime_environTable(JNIEnv * pEnv,jclass,jobject jTable)182 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_environTable(JNIEnv *pEnv, jclass, jobject jTable) {
183 	CodeWorker::DtaScriptVariable* pTable;
184 	GET_PARSETREE_HANDLE(Table);
185 	pTable = pTableInstance;
186 	CodeWorker::CGRuntime::environTable(pTable);
187 }
188 
Java_org_codeworker_jni_Runtime_extendExecutedScript(JNIEnv * pEnv,jclass,jstring jScriptContent)189 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_extendExecutedScript(JNIEnv *pEnv, jclass, jstring jScriptContent) {
190 	std::string sScriptContent;
191 	GET_STRING(ScriptContent);
192 	sScriptContent = tcScriptContent;
193 	CodeWorker::CGRuntime::extendExecutedScript(sScriptContent);
194 	RELEASE_STRING(ScriptContent);
195 }
196 
Java_org_codeworker_jni_Runtime_insertElementAt(JNIEnv * pEnv,jclass,jobject jList,jstring jKey,jint jPosition)197 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_insertElementAt(JNIEnv *pEnv, jclass, jobject jList, jstring jKey, jint jPosition) {
198 	CodeWorker::DtaScriptVariable* pList;
199 	GET_PARSETREE_HANDLE(List);
200 	pList = pListInstance;
201 	std::string sKey;
202 	GET_STRING(Key);
203 	sKey = tcKey;
204 	int iPosition;
205 	iPosition = jPosition;
206 	CodeWorker::CGRuntime::insertElementAt(pList, sKey, iPosition);
207 	RELEASE_STRING(Key);
208 }
209 
Java_org_codeworker_jni_Runtime_invertArray(JNIEnv * pEnv,jclass,jobject jArray)210 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_invertArray(JNIEnv *pEnv, jclass, jobject jArray) {
211 	CodeWorker::DtaScriptVariable* pArray;
212 	GET_PARSETREE_HANDLE(Array);
213 	pArray = pArrayInstance;
214 	CodeWorker::CGRuntime::invertArray(pArray);
215 }
216 
Java_org_codeworker_jni_Runtime_listAllGeneratedFiles(JNIEnv * pEnv,jclass,jobject jFiles)217 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_listAllGeneratedFiles(JNIEnv *pEnv, jclass, jobject jFiles) {
218 	CodeWorker::DtaScriptVariable* pFiles;
219 	GET_PARSETREE_HANDLE(Files);
220 	pFiles = pFilesInstance;
221 	CodeWorker::CGRuntime::listAllGeneratedFiles(pFiles);
222 }
223 
Java_org_codeworker_jni_Runtime_loadProject(JNIEnv * pEnv,jclass,jstring jXMLorTXTFileName,jobject jNodeToLoad)224 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_loadProject(JNIEnv *pEnv, jclass, jstring jXMLorTXTFileName, jobject jNodeToLoad) {
225 	std::string sXMLorTXTFileName;
226 	GET_STRING(XMLorTXTFileName);
227 	sXMLorTXTFileName = tcXMLorTXTFileName;
228 	CodeWorker::DtaScriptVariable* pNodeToLoad;
229 	GET_PARSETREE_HANDLE(NodeToLoad);
230 	pNodeToLoad = pNodeToLoadInstance;
231 	CodeWorker::CGRuntime::loadProject(sXMLorTXTFileName, pNodeToLoad);
232 	RELEASE_STRING(XMLorTXTFileName);
233 }
234 
Java_org_codeworker_jni_Runtime_openLogFile(JNIEnv * pEnv,jclass,jstring jFilename)235 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_openLogFile(JNIEnv *pEnv, jclass, jstring jFilename) {
236 	std::string sFilename;
237 	GET_STRING(Filename);
238 	sFilename = tcFilename;
239 	CodeWorker::CGRuntime::openLogFile(sFilename);
240 	RELEASE_STRING(Filename);
241 }
242 
Java_org_codeworker_jni_Runtime_produceHTML(JNIEnv * pEnv,jclass,jstring jScriptFileName,jstring jHTMLFileName)243 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_produceHTML(JNIEnv *pEnv, jclass, jstring jScriptFileName, jstring jHTMLFileName) {
244 	std::string sScriptFileName;
245 	GET_STRING(ScriptFileName);
246 	sScriptFileName = tcScriptFileName;
247 	std::string sHTMLFileName;
248 	GET_STRING(HTMLFileName);
249 	sHTMLFileName = tcHTMLFileName;
250 	CodeWorker::CGRuntime::produceHTML(sScriptFileName, sHTMLFileName);
251 	RELEASE_STRING(HTMLFileName);
252 	RELEASE_STRING(ScriptFileName);
253 }
254 
Java_org_codeworker_jni_Runtime_putEnv(JNIEnv * pEnv,jclass,jstring jName,jstring jValue)255 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_putEnv(JNIEnv *pEnv, jclass, jstring jName, jstring jValue) {
256 	std::string sName;
257 	GET_STRING(Name);
258 	sName = tcName;
259 	std::string sValue;
260 	GET_STRING(Value);
261 	sValue = tcValue;
262 	CodeWorker::CGRuntime::putEnv(sName, sValue);
263 	RELEASE_STRING(Value);
264 	RELEASE_STRING(Name);
265 }
266 
Java_org_codeworker_jni_Runtime_randomSeed(JNIEnv * pEnv,jclass,jint jSeed)267 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_randomSeed(JNIEnv *pEnv, jclass, jint jSeed) {
268 	int iSeed;
269 	iSeed = jSeed;
270 	CodeWorker::CGRuntime::randomSeed(iSeed);
271 }
272 
Java_org_codeworker_jni_Runtime_removeAllElements(JNIEnv * pEnv,jclass,jobject jVariable)273 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_removeAllElements(JNIEnv *pEnv, jclass, jobject jVariable) {
274 	CodeWorker::DtaScriptVariable* pVariable;
275 	GET_PARSETREE_HANDLE(Variable);
276 	pVariable = pVariableInstance;
277 	CodeWorker::CGRuntime::removeAllElements(pVariable);
278 }
279 
Java_org_codeworker_jni_Runtime_removeElement(JNIEnv * pEnv,jclass,jobject jVariable,jstring jKey)280 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_removeElement(JNIEnv *pEnv, jclass, jobject jVariable, jstring jKey) {
281 	CodeWorker::DtaScriptVariable* pVariable;
282 	GET_PARSETREE_HANDLE(Variable);
283 	pVariable = pVariableInstance;
284 	std::string sKey;
285 	GET_STRING(Key);
286 	sKey = tcKey;
287 	CodeWorker::CGRuntime::removeElement(pVariable, sKey);
288 	RELEASE_STRING(Key);
289 }
290 
Java_org_codeworker_jni_Runtime_removeFirstElement(JNIEnv * pEnv,jclass,jobject jList)291 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_removeFirstElement(JNIEnv *pEnv, jclass, jobject jList) {
292 	CodeWorker::DtaScriptVariable* pList;
293 	GET_PARSETREE_HANDLE(List);
294 	pList = pListInstance;
295 	CodeWorker::CGRuntime::removeFirstElement(pList);
296 }
297 
Java_org_codeworker_jni_Runtime_removeLastElement(JNIEnv * pEnv,jclass,jobject jList)298 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_removeLastElement(JNIEnv *pEnv, jclass, jobject jList) {
299 	CodeWorker::DtaScriptVariable* pList;
300 	GET_PARSETREE_HANDLE(List);
301 	pList = pListInstance;
302 	CodeWorker::CGRuntime::removeLastElement(pList);
303 }
304 
Java_org_codeworker_jni_Runtime_removeRecursive(JNIEnv * pEnv,jclass,jobject jVariable,jstring jAttribute)305 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_removeRecursive(JNIEnv *pEnv, jclass, jobject jVariable, jstring jAttribute) {
306 	CodeWorker::DtaScriptVariable* pVariable;
307 	GET_PARSETREE_HANDLE(Variable);
308 	pVariable = pVariableInstance;
309 	std::string sAttribute;
310 	GET_STRING(Attribute);
311 	sAttribute = tcAttribute;
312 	CodeWorker::CGRuntime::removeRecursive(pVariable, sAttribute);
313 	RELEASE_STRING(Attribute);
314 }
315 
Java_org_codeworker_jni_Runtime_removeVariable(JNIEnv * pEnv,jclass,jobject jNode)316 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_removeVariable(JNIEnv *pEnv, jclass, jobject jNode) {
317 	CodeWorker::DtaScriptVariable* pNode;
318 	GET_PARSETREE_HANDLE(Node);
319 	pNode = pNodeInstance;
320 	CodeWorker::CGRuntime::removeVariable(pNode);
321 }
322 
Java_org_codeworker_jni_Runtime_saveBinaryToFile(JNIEnv * pEnv,jclass,jstring jFilename,jstring jContent)323 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_saveBinaryToFile(JNIEnv *pEnv, jclass, jstring jFilename, jstring jContent) {
324 	std::string sFilename;
325 	GET_STRING(Filename);
326 	sFilename = tcFilename;
327 	std::string sContent;
328 	GET_STRING(Content);
329 	sContent = tcContent;
330 	CodeWorker::CGRuntime::saveBinaryToFile(sFilename, sContent);
331 	RELEASE_STRING(Content);
332 	RELEASE_STRING(Filename);
333 }
334 
Java_org_codeworker_jni_Runtime_saveProject(JNIEnv * pEnv,jclass,jstring jXMLorTXTFileName,jobject jNodeToSave)335 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_saveProject(JNIEnv *pEnv, jclass, jstring jXMLorTXTFileName, jobject jNodeToSave) {
336 	std::string sXMLorTXTFileName;
337 	GET_STRING(XMLorTXTFileName);
338 	sXMLorTXTFileName = tcXMLorTXTFileName;
339 	CodeWorker::DtaScriptVariable* pNodeToSave;
340 	GET_PARSETREE_HANDLE(NodeToSave);
341 	pNodeToSave = pNodeToSaveInstance;
342 	CodeWorker::CGRuntime::saveProject(sXMLorTXTFileName, pNodeToSave);
343 	RELEASE_STRING(XMLorTXTFileName);
344 }
345 
Java_org_codeworker_jni_Runtime_saveProjectTypes(JNIEnv * pEnv,jclass,jstring jXMLFileName)346 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_saveProjectTypes(JNIEnv *pEnv, jclass, jstring jXMLFileName) {
347 	std::string sXMLFileName;
348 	GET_STRING(XMLFileName);
349 	sXMLFileName = tcXMLFileName;
350 	CodeWorker::CGRuntime::saveProjectTypes(sXMLFileName);
351 	RELEASE_STRING(XMLFileName);
352 }
353 
Java_org_codeworker_jni_Runtime_saveToFile(JNIEnv * pEnv,jclass,jstring jFilename,jstring jContent)354 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_saveToFile(JNIEnv *pEnv, jclass, jstring jFilename, jstring jContent) {
355 	std::string sFilename;
356 	GET_STRING(Filename);
357 	sFilename = tcFilename;
358 	std::string sContent;
359 	GET_STRING(Content);
360 	sContent = tcContent;
361 	CodeWorker::CGRuntime::saveToFile(sFilename, sContent);
362 	RELEASE_STRING(Content);
363 	RELEASE_STRING(Filename);
364 }
365 
Java_org_codeworker_jni_Runtime_setCommentBegin(JNIEnv * pEnv,jclass,jstring jCommentBegin)366 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_setCommentBegin(JNIEnv *pEnv, jclass, jstring jCommentBegin) {
367 	std::string sCommentBegin;
368 	GET_STRING(CommentBegin);
369 	sCommentBegin = tcCommentBegin;
370 	CodeWorker::CGRuntime::setCommentBegin(sCommentBegin);
371 	RELEASE_STRING(CommentBegin);
372 }
373 
Java_org_codeworker_jni_Runtime_setCommentEnd(JNIEnv * pEnv,jclass,jstring jCommentEnd)374 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_setCommentEnd(JNIEnv *pEnv, jclass, jstring jCommentEnd) {
375 	std::string sCommentEnd;
376 	GET_STRING(CommentEnd);
377 	sCommentEnd = tcCommentEnd;
378 	CodeWorker::CGRuntime::setCommentEnd(sCommentEnd);
379 	RELEASE_STRING(CommentEnd);
380 }
381 
Java_org_codeworker_jni_Runtime_setGenerationHeader(JNIEnv * pEnv,jclass,jstring jComment)382 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_setGenerationHeader(JNIEnv *pEnv, jclass, jstring jComment) {
383 	std::string sComment;
384 	GET_STRING(Comment);
385 	sComment = tcComment;
386 	CodeWorker::CGRuntime::setGenerationHeader(sComment);
387 	RELEASE_STRING(Comment);
388 }
389 
Java_org_codeworker_jni_Runtime_setIncludePath(JNIEnv * pEnv,jclass,jstring jPath)390 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_setIncludePath(JNIEnv *pEnv, jclass, jstring jPath) {
391 	std::string sPath;
392 	GET_STRING(Path);
393 	sPath = tcPath;
394 	CodeWorker::CGRuntime::setIncludePath(sPath);
395 	RELEASE_STRING(Path);
396 }
397 
Java_org_codeworker_jni_Runtime_setNow(JNIEnv * pEnv,jclass,jstring jConstantDateTime)398 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_setNow(JNIEnv *pEnv, jclass, jstring jConstantDateTime) {
399 	std::string sConstantDateTime;
400 	GET_STRING(ConstantDateTime);
401 	sConstantDateTime = tcConstantDateTime;
402 	CodeWorker::CGRuntime::setNow(sConstantDateTime);
403 	RELEASE_STRING(ConstantDateTime);
404 }
405 
Java_org_codeworker_jni_Runtime_setProperty(JNIEnv * pEnv,jclass,jstring jDefine,jstring jValue)406 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_setProperty(JNIEnv *pEnv, jclass, jstring jDefine, jstring jValue) {
407 	std::string sDefine;
408 	GET_STRING(Define);
409 	sDefine = tcDefine;
410 	std::string sValue;
411 	GET_STRING(Value);
412 	sValue = tcValue;
413 	CodeWorker::CGRuntime::setProperty(sDefine, sValue);
414 	RELEASE_STRING(Value);
415 	RELEASE_STRING(Define);
416 }
417 
Java_org_codeworker_jni_Runtime_setTextMode(JNIEnv * pEnv,jclass,jstring jTextMode)418 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_setTextMode(JNIEnv *pEnv, jclass, jstring jTextMode) {
419 	std::string sTextMode;
420 	GET_STRING(TextMode);
421 	sTextMode = tcTextMode;
422 	CodeWorker::CGRuntime::setTextMode(sTextMode);
423 	RELEASE_STRING(TextMode);
424 }
425 
Java_org_codeworker_jni_Runtime_setVersion(JNIEnv * pEnv,jclass,jstring jVersion)426 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_setVersion(JNIEnv *pEnv, jclass, jstring jVersion) {
427 	std::string sVersion;
428 	GET_STRING(Version);
429 	sVersion = tcVersion;
430 	CodeWorker::CGRuntime::setVersion(sVersion);
431 	RELEASE_STRING(Version);
432 }
433 
Java_org_codeworker_jni_Runtime_setWriteMode(JNIEnv * pEnv,jclass,jstring jMode)434 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_setWriteMode(JNIEnv *pEnv, jclass, jstring jMode) {
435 	std::string sMode;
436 	GET_STRING(Mode);
437 	sMode = tcMode;
438 	CodeWorker::CGRuntime::setWriteMode(sMode);
439 	RELEASE_STRING(Mode);
440 }
441 
Java_org_codeworker_jni_Runtime_setWorkingPath(JNIEnv * pEnv,jclass,jstring jPath)442 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_setWorkingPath(JNIEnv *pEnv, jclass, jstring jPath) {
443 	std::string sPath;
444 	GET_STRING(Path);
445 	sPath = tcPath;
446 	CodeWorker::CGRuntime::setWorkingPath(sPath);
447 	RELEASE_STRING(Path);
448 }
449 
Java_org_codeworker_jni_Runtime_sleep(JNIEnv * pEnv,jclass,jint jMillis)450 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_sleep(JNIEnv *pEnv, jclass, jint jMillis) {
451 	int iMillis;
452 	iMillis = jMillis;
453 	CodeWorker::CGRuntime::sleep(iMillis);
454 }
455 
Java_org_codeworker_jni_Runtime_slideNodeContent(JNIEnv * pEnv,jclass,jobject jOrgNode,jstring jDestNode)456 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_slideNodeContent(JNIEnv *pEnv, jclass, jobject jOrgNode, jstring jDestNode) {
457 	CodeWorker::DtaScriptVariable* pOrgNode;
458 	GET_PARSETREE_HANDLE(OrgNode);
459 	pOrgNode = pOrgNodeInstance;
460 	CodeWorker::ExprScriptVariable* exprdestNode;
461 	{
462 		GET_STRING(DestNode);
463 		CodeWorker::DtaScript theEmptyScript(NULL);
464 		CodeWorker::GrfBlock* pBlock = NULL;
465 		CodeWorker::GrfBlock& myNullBlock = *pBlock;
466 		CodeWorker::ScpStream myStream(tcDestNode);
467 		exprdestNode = theEmptyScript.parseVariableExpression(myNullBlock, myStream);
468 		RELEASE_STRING(DestNode);
469 	}
470 	std::auto_ptr<CodeWorker::ExprScriptVariable> treexprdestNode(exprdestNode);
471 	CodeWorker::ExprScriptVariable& xDestNode = *treexprdestNode;
472 	CodeWorker::CGRuntime::slideNodeContent(pOrgNode, xDestNode);
473 }
474 
Java_org_codeworker_jni_Runtime_sortArray(JNIEnv * pEnv,jclass,jobject jArray)475 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_sortArray(JNIEnv *pEnv, jclass, jobject jArray) {
476 	CodeWorker::DtaScriptVariable* pArray;
477 	GET_PARSETREE_HANDLE(Array);
478 	pArray = pArrayInstance;
479 	CodeWorker::CGRuntime::sortArray(pArray);
480 }
481 
Java_org_codeworker_jni_Runtime_traceEngine(JNIEnv * pEnv,jclass)482 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_traceEngine(JNIEnv *pEnv, jclass) {
483 	CodeWorker::CGRuntime::traceEngine();
484 }
485 
Java_org_codeworker_jni_Runtime_traceLine(JNIEnv * pEnv,jclass,jstring jLine)486 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_traceLine(JNIEnv *pEnv, jclass, jstring jLine) {
487 	std::string sLine;
488 	GET_STRING(Line);
489 	sLine = tcLine;
490 	CodeWorker::CGRuntime::traceLine(sLine);
491 	RELEASE_STRING(Line);
492 }
493 
Java_org_codeworker_jni_Runtime_traceObject(JNIEnv * pEnv,jclass,jobject jObject,jint jDepth)494 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_traceObject(JNIEnv *pEnv, jclass, jobject jObject, jint jDepth) {
495 	CodeWorker::DtaScriptVariable* pObject;
496 	GET_PARSETREE_HANDLE(Object);
497 	pObject = pObjectInstance;
498 	int iDepth;
499 	iDepth = jDepth;
500 	CodeWorker::CGRuntime::traceObject(pObject, iDepth);
501 }
502 
Java_org_codeworker_jni_Runtime_traceText(JNIEnv * pEnv,jclass,jstring jText)503 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_traceText(JNIEnv *pEnv, jclass, jstring jText) {
504 	std::string sText;
505 	GET_STRING(Text);
506 	sText = tcText;
507 	CodeWorker::CGRuntime::traceText(sText);
508 	RELEASE_STRING(Text);
509 }
510 
Java_org_codeworker_jni_Runtime_attachInputToSocket(JNIEnv * pEnv,jclass,jint jSocket)511 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_attachInputToSocket(JNIEnv *pEnv, jclass, jint jSocket) {
512 	int iSocket;
513 	iSocket = jSocket;
514 	CodeWorker::CGRuntime::attachInputToSocket(iSocket);
515 }
516 
Java_org_codeworker_jni_Runtime_detachInputFromSocket(JNIEnv * pEnv,jclass,jint jSocket)517 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_detachInputFromSocket(JNIEnv *pEnv, jclass, jint jSocket) {
518 	int iSocket;
519 	iSocket = jSocket;
520 	CodeWorker::CGRuntime::detachInputFromSocket(iSocket);
521 }
522 
Java_org_codeworker_jni_Runtime_goBack(JNIEnv * pEnv,jclass)523 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_goBack(JNIEnv *pEnv, jclass) {
524 	CodeWorker::CGRuntime::goBack();
525 }
526 
Java_org_codeworker_jni_Runtime_setInputLocation(JNIEnv * pEnv,jclass,jint jLocation)527 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_setInputLocation(JNIEnv *pEnv, jclass, jint jLocation) {
528 	int iLocation;
529 	iLocation = jLocation;
530 	CodeWorker::CGRuntime::setInputLocation(iLocation);
531 }
532 
Java_org_codeworker_jni_Runtime_allFloatingLocations(JNIEnv * pEnv,jclass,jobject jList)533 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_allFloatingLocations(JNIEnv *pEnv, jclass, jobject jList) {
534 	CodeWorker::DtaScriptVariable* pList;
535 	GET_PARSETREE_HANDLE(List);
536 	pList = pListInstance;
537 	CodeWorker::CGRuntime::allFloatingLocations(pList);
538 }
539 
Java_org_codeworker_jni_Runtime_attachOutputToSocket(JNIEnv * pEnv,jclass,jint jSocket)540 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_attachOutputToSocket(JNIEnv *pEnv, jclass, jint jSocket) {
541 	int iSocket;
542 	iSocket = jSocket;
543 	CodeWorker::CGRuntime::attachOutputToSocket(iSocket);
544 }
545 
Java_org_codeworker_jni_Runtime_detachOutputFromSocket(JNIEnv * pEnv,jclass,jint jSocket)546 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_detachOutputFromSocket(JNIEnv *pEnv, jclass, jint jSocket) {
547 	int iSocket;
548 	iSocket = jSocket;
549 	CodeWorker::CGRuntime::detachOutputFromSocket(iSocket);
550 }
551 
Java_org_codeworker_jni_Runtime_incrementIndentLevel(JNIEnv * pEnv,jclass,jint jLevel)552 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_incrementIndentLevel(JNIEnv *pEnv, jclass, jint jLevel) {
553 	int iLevel;
554 	iLevel = jLevel;
555 	CodeWorker::CGRuntime::incrementIndentLevel(iLevel);
556 }
557 
Java_org_codeworker_jni_Runtime_insertText(JNIEnv * pEnv,jclass,jint jLocation,jstring jText)558 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_insertText(JNIEnv *pEnv, jclass, jint jLocation, jstring jText) {
559 	int iLocation;
560 	iLocation = jLocation;
561 	std::string sText;
562 	GET_STRING(Text);
563 	sText = tcText;
564 	CodeWorker::CGRuntime::insertText(iLocation, sText);
565 	RELEASE_STRING(Text);
566 }
567 
Java_org_codeworker_jni_Runtime_insertTextOnce(JNIEnv * pEnv,jclass,jint jLocation,jstring jText)568 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_insertTextOnce(JNIEnv *pEnv, jclass, jint jLocation, jstring jText) {
569 	int iLocation;
570 	iLocation = jLocation;
571 	std::string sText;
572 	GET_STRING(Text);
573 	sText = tcText;
574 	CodeWorker::CGRuntime::insertTextOnce(iLocation, sText);
575 	RELEASE_STRING(Text);
576 }
577 
Java_org_codeworker_jni_Runtime_insertTextToFloatingLocation(JNIEnv * pEnv,jclass,jstring jLocation,jstring jText)578 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_insertTextToFloatingLocation(JNIEnv *pEnv, jclass, jstring jLocation, jstring jText) {
579 	std::string sLocation;
580 	GET_STRING(Location);
581 	sLocation = tcLocation;
582 	std::string sText;
583 	GET_STRING(Text);
584 	sText = tcText;
585 	CodeWorker::CGRuntime::insertTextToFloatingLocation(sLocation, sText);
586 	RELEASE_STRING(Text);
587 	RELEASE_STRING(Location);
588 }
589 
Java_org_codeworker_jni_Runtime_insertTextOnceToFloatingLocation(JNIEnv * pEnv,jclass,jstring jLocation,jstring jText)590 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_insertTextOnceToFloatingLocation(JNIEnv *pEnv, jclass, jstring jLocation, jstring jText) {
591 	std::string sLocation;
592 	GET_STRING(Location);
593 	sLocation = tcLocation;
594 	std::string sText;
595 	GET_STRING(Text);
596 	sText = tcText;
597 	CodeWorker::CGRuntime::insertTextOnceToFloatingLocation(sLocation, sText);
598 	RELEASE_STRING(Text);
599 	RELEASE_STRING(Location);
600 }
601 
Java_org_codeworker_jni_Runtime_overwritePortion(JNIEnv * pEnv,jclass,jint jLocation,jstring jText,jint jSize)602 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_overwritePortion(JNIEnv *pEnv, jclass, jint jLocation, jstring jText, jint jSize) {
603 	int iLocation;
604 	iLocation = jLocation;
605 	std::string sText;
606 	GET_STRING(Text);
607 	sText = tcText;
608 	int iSize;
609 	iSize = jSize;
610 	CodeWorker::CGRuntime::overwritePortion(iLocation, sText, iSize);
611 	RELEASE_STRING(Text);
612 }
613 
Java_org_codeworker_jni_Runtime_populateProtectedArea(JNIEnv * pEnv,jclass,jstring jProtectedAreaName,jstring jContent)614 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_populateProtectedArea(JNIEnv *pEnv, jclass, jstring jProtectedAreaName, jstring jContent) {
615 	std::string sProtectedAreaName;
616 	GET_STRING(ProtectedAreaName);
617 	sProtectedAreaName = tcProtectedAreaName;
618 	std::string sContent;
619 	GET_STRING(Content);
620 	sContent = tcContent;
621 	CodeWorker::CGRuntime::populateProtectedArea(sProtectedAreaName, sContent);
622 	RELEASE_STRING(Content);
623 	RELEASE_STRING(ProtectedAreaName);
624 }
625 
Java_org_codeworker_jni_Runtime_resizeOutputStream(JNIEnv * pEnv,jclass,jint jNewSize)626 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_resizeOutputStream(JNIEnv *pEnv, jclass, jint jNewSize) {
627 	int iNewSize;
628 	iNewSize = jNewSize;
629 	CodeWorker::CGRuntime::resizeOutputStream(iNewSize);
630 }
631 
Java_org_codeworker_jni_Runtime_setFloatingLocation(JNIEnv * pEnv,jclass,jstring jKey,jint jLocation)632 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_setFloatingLocation(JNIEnv *pEnv, jclass, jstring jKey, jint jLocation) {
633 	std::string sKey;
634 	GET_STRING(Key);
635 	sKey = tcKey;
636 	int iLocation;
637 	iLocation = jLocation;
638 	CodeWorker::CGRuntime::setFloatingLocation(sKey, iLocation);
639 	RELEASE_STRING(Key);
640 }
641 
Java_org_codeworker_jni_Runtime_setOutputLocation(JNIEnv * pEnv,jclass,jint jLocation)642 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_setOutputLocation(JNIEnv *pEnv, jclass, jint jLocation) {
643 	int iLocation;
644 	iLocation = jLocation;
645 	CodeWorker::CGRuntime::setOutputLocation(iLocation);
646 }
647 
Java_org_codeworker_jni_Runtime_setProtectedArea(JNIEnv * pEnv,jclass,jstring jProtectedAreaName)648 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_setProtectedArea(JNIEnv *pEnv, jclass, jstring jProtectedAreaName) {
649 	std::string sProtectedAreaName;
650 	GET_STRING(ProtectedAreaName);
651 	sProtectedAreaName = tcProtectedAreaName;
652 	CodeWorker::CGRuntime::setProtectedArea(sProtectedAreaName);
653 	RELEASE_STRING(ProtectedAreaName);
654 }
655 
Java_org_codeworker_jni_Runtime_writeBytes(JNIEnv * pEnv,jclass,jstring jBytes)656 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_writeBytes(JNIEnv *pEnv, jclass, jstring jBytes) {
657 	std::string sBytes;
658 	GET_STRING(Bytes);
659 	sBytes = tcBytes;
660 	CodeWorker::CGRuntime::writeBytes(sBytes);
661 	RELEASE_STRING(Bytes);
662 }
663 
Java_org_codeworker_jni_Runtime_writeText(JNIEnv * pEnv,jclass,jstring jText)664 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_writeText(JNIEnv *pEnv, jclass, jstring jText) {
665 	std::string sText;
666 	GET_STRING(Text);
667 	sText = tcText;
668 	CodeWorker::CGRuntime::writeText(sText);
669 	RELEASE_STRING(Text);
670 }
671 
Java_org_codeworker_jni_Runtime_writeTextOnce(JNIEnv * pEnv,jclass,jstring jText)672 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_writeTextOnce(JNIEnv *pEnv, jclass, jstring jText) {
673 	std::string sText;
674 	GET_STRING(Text);
675 	sText = tcText;
676 	CodeWorker::CGRuntime::writeTextOnce(sText);
677 	RELEASE_STRING(Text);
678 }
679 
Java_org_codeworker_jni_Runtime_closeSocket(JNIEnv * pEnv,jclass,jint jSocket)680 JNIEXPORT void JNICALL Java_org_codeworker_jni_Runtime_closeSocket(JNIEnv *pEnv, jclass, jint jSocket) {
681 	int iSocket;
682 	iSocket = jSocket;
683 	CodeWorker::CGRuntime::closeSocket(iSocket);
684 }
685 
Java_org_codeworker_jni_Runtime_flushOutputToSocket(JNIEnv * pEnv,jclass,jint jSocket)686 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_flushOutputToSocket(JNIEnv *pEnv, jclass, jint jSocket) {
687 	jboolean result;
688 	int iSocket;
689 	iSocket = jSocket;
690 	bool cppResult = CodeWorker::CGRuntime::flushOutputToSocket(iSocket);
691 	result = cppResult;
692 	return result;
693 }
694 
Java_org_codeworker_jni_Runtime_acceptSocket(JNIEnv * pEnv,jclass,jint jServerSocket)695 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_acceptSocket(JNIEnv *pEnv, jclass, jint jServerSocket) {
696 	jint result;
697 	int iServerSocket;
698 	iServerSocket = jServerSocket;
699 	int cppResult = CodeWorker::CGRuntime::acceptSocket(iServerSocket);
700 	result = cppResult;
701 	return result;
702 }
703 
Java_org_codeworker_jni_Runtime_add(JNIEnv * pEnv,jclass,jdouble jLeft,jdouble jRight)704 JNIEXPORT jdouble JNICALL Java_org_codeworker_jni_Runtime_add(JNIEnv *pEnv, jclass, jdouble jLeft, jdouble jRight) {
705 	jdouble result;
706 	double dLeft;
707 	dLeft = jLeft;
708 	double dRight;
709 	dRight = jRight;
710 	double cppResult = CodeWorker::CGRuntime::add(dLeft, dRight);
711 	result = cppResult;
712 	return result;
713 }
714 
Java_org_codeworker_jni_Runtime_addToDate(JNIEnv * pEnv,jclass,jstring jDate,jstring jFormat,jstring jShifting)715 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_addToDate(JNIEnv *pEnv, jclass, jstring jDate, jstring jFormat, jstring jShifting) {
716 	jstring result;
717 	std::string sDate;
718 	GET_STRING(Date);
719 	sDate = tcDate;
720 	std::string sFormat;
721 	GET_STRING(Format);
722 	sFormat = tcFormat;
723 	std::string sShifting;
724 	GET_STRING(Shifting);
725 	sShifting = tcShifting;
726 	std::string cppResult = CodeWorker::CGRuntime::addToDate(sDate, sFormat, sShifting);
727 	result = pEnv->NewStringUTF(cppResult.c_str());
728 	RELEASE_STRING(Shifting);
729 	RELEASE_STRING(Format);
730 	RELEASE_STRING(Date);
731 	return result;
732 }
733 
Java_org_codeworker_jni_Runtime_byteToChar(JNIEnv * pEnv,jclass,jstring jByte)734 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_byteToChar(JNIEnv *pEnv, jclass, jstring jByte) {
735 	jstring result;
736 	std::string sByte;
737 	GET_STRING(Byte);
738 	sByte = tcByte;
739 	std::string cppResult = CodeWorker::CGRuntime::byteToChar(sByte);
740 	result = pEnv->NewStringUTF(cppResult.c_str());
741 	RELEASE_STRING(Byte);
742 	return result;
743 }
744 
Java_org_codeworker_jni_Runtime_bytesToLong(JNIEnv * pEnv,jclass,jstring jBytes)745 JNIEXPORT jlong JNICALL Java_org_codeworker_jni_Runtime_bytesToLong(JNIEnv *pEnv, jclass, jstring jBytes) {
746 	jlong result;
747 	std::string sBytes;
748 	GET_STRING(Bytes);
749 	sBytes = tcBytes;
750 	unsigned long cppResult = CodeWorker::CGRuntime::bytesToLong(sBytes);
751 	result = (jlong) cppResult;
752 	RELEASE_STRING(Bytes);
753 	return result;
754 }
755 
Java_org_codeworker_jni_Runtime_bytesToShort(JNIEnv * pEnv,jclass,jstring jBytes)756 JNIEXPORT jshort JNICALL Java_org_codeworker_jni_Runtime_bytesToShort(JNIEnv *pEnv, jclass, jstring jBytes) {
757 	jshort result;
758 	std::string sBytes;
759 	GET_STRING(Bytes);
760 	sBytes = tcBytes;
761 	unsigned short cppResult = CodeWorker::CGRuntime::bytesToShort(sBytes);
762 	result = (jshort) cppResult;
763 	RELEASE_STRING(Bytes);
764 	return result;
765 }
766 
Java_org_codeworker_jni_Runtime_canonizePath(JNIEnv * pEnv,jclass,jstring jPath)767 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_canonizePath(JNIEnv *pEnv, jclass, jstring jPath) {
768 	jstring result;
769 	std::string sPath;
770 	GET_STRING(Path);
771 	sPath = tcPath;
772 	std::string cppResult = CodeWorker::CGRuntime::canonizePath(sPath);
773 	result = pEnv->NewStringUTF(cppResult.c_str());
774 	RELEASE_STRING(Path);
775 	return result;
776 }
777 
Java_org_codeworker_jni_Runtime_changeDirectory(JNIEnv * pEnv,jclass,jstring jPath)778 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_changeDirectory(JNIEnv *pEnv, jclass, jstring jPath) {
779 	jboolean result;
780 	std::string sPath;
781 	GET_STRING(Path);
782 	sPath = tcPath;
783 	bool cppResult = CodeWorker::CGRuntime::changeDirectory(sPath);
784 	result = cppResult;
785 	RELEASE_STRING(Path);
786 	return result;
787 }
788 
Java_org_codeworker_jni_Runtime_changeFileTime(JNIEnv * pEnv,jclass,jstring jFilename,jstring jAccessTime,jstring jModificationTime)789 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_changeFileTime(JNIEnv *pEnv, jclass, jstring jFilename, jstring jAccessTime, jstring jModificationTime) {
790 	jint result;
791 	std::string sFilename;
792 	GET_STRING(Filename);
793 	sFilename = tcFilename;
794 	std::string sAccessTime;
795 	GET_STRING(AccessTime);
796 	sAccessTime = tcAccessTime;
797 	std::string sModificationTime;
798 	GET_STRING(ModificationTime);
799 	sModificationTime = tcModificationTime;
800 	int cppResult = CodeWorker::CGRuntime::changeFileTime(sFilename, sAccessTime, sModificationTime);
801 	result = cppResult;
802 	RELEASE_STRING(ModificationTime);
803 	RELEASE_STRING(AccessTime);
804 	RELEASE_STRING(Filename);
805 	return result;
806 }
807 
Java_org_codeworker_jni_Runtime_charAt(JNIEnv * pEnv,jclass,jstring jText,jint jIndex)808 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_charAt(JNIEnv *pEnv, jclass, jstring jText, jint jIndex) {
809 	jstring result;
810 	std::string sText;
811 	GET_STRING(Text);
812 	sText = tcText;
813 	int iIndex;
814 	iIndex = jIndex;
815 	std::string cppResult = CodeWorker::CGRuntime::charAt(sText, iIndex);
816 	result = pEnv->NewStringUTF(cppResult.c_str());
817 	RELEASE_STRING(Text);
818 	return result;
819 }
820 
Java_org_codeworker_jni_Runtime_charToByte(JNIEnv * pEnv,jclass,jstring jChar)821 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_charToByte(JNIEnv *pEnv, jclass, jstring jChar) {
822 	jstring result;
823 	std::string sChar;
824 	GET_STRING(Char);
825 	sChar = tcChar;
826 	std::string cppResult = CodeWorker::CGRuntime::charToByte(sChar);
827 	result = pEnv->NewStringUTF(cppResult.c_str());
828 	RELEASE_STRING(Char);
829 	return result;
830 }
831 
Java_org_codeworker_jni_Runtime_charToInt(JNIEnv * pEnv,jclass,jstring jChar)832 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_charToInt(JNIEnv *pEnv, jclass, jstring jChar) {
833 	jint result;
834 	std::string sChar;
835 	GET_STRING(Char);
836 	sChar = tcChar;
837 	int cppResult = CodeWorker::CGRuntime::charToInt(sChar);
838 	result = cppResult;
839 	RELEASE_STRING(Char);
840 	return result;
841 }
842 
Java_org_codeworker_jni_Runtime_chmod(JNIEnv * pEnv,jclass,jstring jFilename,jstring jMode)843 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_chmod(JNIEnv *pEnv, jclass, jstring jFilename, jstring jMode) {
844 	jboolean result;
845 	std::string sFilename;
846 	GET_STRING(Filename);
847 	sFilename = tcFilename;
848 	std::string sMode;
849 	GET_STRING(Mode);
850 	sMode = tcMode;
851 	bool cppResult = CodeWorker::CGRuntime::chmod(sFilename, sMode);
852 	result = cppResult;
853 	RELEASE_STRING(Mode);
854 	RELEASE_STRING(Filename);
855 	return result;
856 }
857 
Java_org_codeworker_jni_Runtime_ceil(JNIEnv * pEnv,jclass,jdouble jNumber)858 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_ceil(JNIEnv *pEnv, jclass, jdouble jNumber) {
859 	jint result;
860 	double dNumber;
861 	dNumber = jNumber;
862 	int cppResult = CodeWorker::CGRuntime::ceil(dNumber);
863 	result = cppResult;
864 	return result;
865 }
866 
Java_org_codeworker_jni_Runtime_compareDate(JNIEnv * pEnv,jclass,jstring jDate1,jstring jDate2)867 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_compareDate(JNIEnv *pEnv, jclass, jstring jDate1, jstring jDate2) {
868 	jint result;
869 	std::string sDate1;
870 	GET_STRING(Date1);
871 	sDate1 = tcDate1;
872 	std::string sDate2;
873 	GET_STRING(Date2);
874 	sDate2 = tcDate2;
875 	int cppResult = CodeWorker::CGRuntime::compareDate(sDate1, sDate2);
876 	result = cppResult;
877 	RELEASE_STRING(Date2);
878 	RELEASE_STRING(Date1);
879 	return result;
880 }
881 
Java_org_codeworker_jni_Runtime_completeDate(JNIEnv * pEnv,jclass,jstring jDate,jstring jFormat)882 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_completeDate(JNIEnv *pEnv, jclass, jstring jDate, jstring jFormat) {
883 	jstring result;
884 	std::string sDate;
885 	GET_STRING(Date);
886 	sDate = tcDate;
887 	std::string sFormat;
888 	GET_STRING(Format);
889 	sFormat = tcFormat;
890 	std::string cppResult = CodeWorker::CGRuntime::completeDate(sDate, sFormat);
891 	result = pEnv->NewStringUTF(cppResult.c_str());
892 	RELEASE_STRING(Format);
893 	RELEASE_STRING(Date);
894 	return result;
895 }
896 
Java_org_codeworker_jni_Runtime_completeLeftSpaces(JNIEnv * pEnv,jclass,jstring jText,jint jLength)897 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_completeLeftSpaces(JNIEnv *pEnv, jclass, jstring jText, jint jLength) {
898 	jstring result;
899 	std::string sText;
900 	GET_STRING(Text);
901 	sText = tcText;
902 	int iLength;
903 	iLength = jLength;
904 	std::string cppResult = CodeWorker::CGRuntime::completeLeftSpaces(sText, iLength);
905 	result = pEnv->NewStringUTF(cppResult.c_str());
906 	RELEASE_STRING(Text);
907 	return result;
908 }
909 
Java_org_codeworker_jni_Runtime_completeRightSpaces(JNIEnv * pEnv,jclass,jstring jText,jint jLength)910 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_completeRightSpaces(JNIEnv *pEnv, jclass, jstring jText, jint jLength) {
911 	jstring result;
912 	std::string sText;
913 	GET_STRING(Text);
914 	sText = tcText;
915 	int iLength;
916 	iLength = jLength;
917 	std::string cppResult = CodeWorker::CGRuntime::completeRightSpaces(sText, iLength);
918 	result = pEnv->NewStringUTF(cppResult.c_str());
919 	RELEASE_STRING(Text);
920 	return result;
921 }
922 
Java_org_codeworker_jni_Runtime_composeAdaLikeString(JNIEnv * pEnv,jclass,jstring jText)923 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_composeAdaLikeString(JNIEnv *pEnv, jclass, jstring jText) {
924 	jstring result;
925 	std::string sText;
926 	GET_STRING(Text);
927 	sText = tcText;
928 	std::string cppResult = CodeWorker::CGRuntime::composeAdaLikeString(sText);
929 	result = pEnv->NewStringUTF(cppResult.c_str());
930 	RELEASE_STRING(Text);
931 	return result;
932 }
933 
Java_org_codeworker_jni_Runtime_composeCLikeString(JNIEnv * pEnv,jclass,jstring jText)934 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_composeCLikeString(JNIEnv *pEnv, jclass, jstring jText) {
935 	jstring result;
936 	std::string sText;
937 	GET_STRING(Text);
938 	sText = tcText;
939 	std::string cppResult = CodeWorker::CGRuntime::composeCLikeString(sText);
940 	result = pEnv->NewStringUTF(cppResult.c_str());
941 	RELEASE_STRING(Text);
942 	return result;
943 }
944 
Java_org_codeworker_jni_Runtime_composeHTMLLikeString(JNIEnv * pEnv,jclass,jstring jText)945 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_composeHTMLLikeString(JNIEnv *pEnv, jclass, jstring jText) {
946 	jstring result;
947 	std::string sText;
948 	GET_STRING(Text);
949 	sText = tcText;
950 	std::string cppResult = CodeWorker::CGRuntime::composeHTMLLikeString(sText);
951 	result = pEnv->NewStringUTF(cppResult.c_str());
952 	RELEASE_STRING(Text);
953 	return result;
954 }
955 
Java_org_codeworker_jni_Runtime_composeSQLLikeString(JNIEnv * pEnv,jclass,jstring jText)956 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_composeSQLLikeString(JNIEnv *pEnv, jclass, jstring jText) {
957 	jstring result;
958 	std::string sText;
959 	GET_STRING(Text);
960 	sText = tcText;
961 	std::string cppResult = CodeWorker::CGRuntime::composeSQLLikeString(sText);
962 	result = pEnv->NewStringUTF(cppResult.c_str());
963 	RELEASE_STRING(Text);
964 	return result;
965 }
966 
Java_org_codeworker_jni_Runtime_computeMD5(JNIEnv * pEnv,jclass,jstring jText)967 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_computeMD5(JNIEnv *pEnv, jclass, jstring jText) {
968 	jstring result;
969 	std::string sText;
970 	GET_STRING(Text);
971 	sText = tcText;
972 	std::string cppResult = CodeWorker::CGRuntime::computeMD5(sText);
973 	result = pEnv->NewStringUTF(cppResult.c_str());
974 	RELEASE_STRING(Text);
975 	return result;
976 }
977 
Java_org_codeworker_jni_Runtime_copySmartFile(JNIEnv * pEnv,jclass,jstring jSourceFileName,jstring jDestinationFileName)978 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_copySmartFile(JNIEnv *pEnv, jclass, jstring jSourceFileName, jstring jDestinationFileName) {
979 	jboolean result;
980 	std::string sSourceFileName;
981 	GET_STRING(SourceFileName);
982 	sSourceFileName = tcSourceFileName;
983 	std::string sDestinationFileName;
984 	GET_STRING(DestinationFileName);
985 	sDestinationFileName = tcDestinationFileName;
986 	bool cppResult = CodeWorker::CGRuntime::copySmartFile(sSourceFileName, sDestinationFileName);
987 	result = cppResult;
988 	RELEASE_STRING(DestinationFileName);
989 	RELEASE_STRING(SourceFileName);
990 	return result;
991 }
992 
Java_org_codeworker_jni_Runtime_coreString(JNIEnv * pEnv,jclass,jstring jText,jint jPos,jint jLastRemoved)993 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_coreString(JNIEnv *pEnv, jclass, jstring jText, jint jPos, jint jLastRemoved) {
994 	jstring result;
995 	std::string sText;
996 	GET_STRING(Text);
997 	sText = tcText;
998 	int iPos;
999 	iPos = jPos;
1000 	int iLastRemoved;
1001 	iLastRemoved = jLastRemoved;
1002 	std::string cppResult = CodeWorker::CGRuntime::coreString(sText, iPos, iLastRemoved);
1003 	result = pEnv->NewStringUTF(cppResult.c_str());
1004 	RELEASE_STRING(Text);
1005 	return result;
1006 }
1007 
Java_org_codeworker_jni_Runtime_countStringOccurences(JNIEnv * pEnv,jclass,jstring jString,jstring jText)1008 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_countStringOccurences(JNIEnv *pEnv, jclass, jstring jString, jstring jText) {
1009 	jint result;
1010 	std::string sString;
1011 	GET_STRING(String);
1012 	sString = tcString;
1013 	std::string sText;
1014 	GET_STRING(Text);
1015 	sText = tcText;
1016 	int cppResult = CodeWorker::CGRuntime::countStringOccurences(sString, sText);
1017 	result = cppResult;
1018 	RELEASE_STRING(Text);
1019 	RELEASE_STRING(String);
1020 	return result;
1021 }
1022 
Java_org_codeworker_jni_Runtime_createDirectory(JNIEnv * pEnv,jclass,jstring jPath)1023 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_createDirectory(JNIEnv *pEnv, jclass, jstring jPath) {
1024 	jboolean result;
1025 	std::string sPath;
1026 	GET_STRING(Path);
1027 	sPath = tcPath;
1028 	bool cppResult = CodeWorker::CGRuntime::createDirectory(sPath);
1029 	result = cppResult;
1030 	RELEASE_STRING(Path);
1031 	return result;
1032 }
1033 
Java_org_codeworker_jni_Runtime_createINETClientSocket(JNIEnv * pEnv,jclass,jstring jRemoteAddress,jint jPort)1034 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_createINETClientSocket(JNIEnv *pEnv, jclass, jstring jRemoteAddress, jint jPort) {
1035 	jint result;
1036 	std::string sRemoteAddress;
1037 	GET_STRING(RemoteAddress);
1038 	sRemoteAddress = tcRemoteAddress;
1039 	int iPort;
1040 	iPort = jPort;
1041 	int cppResult = CodeWorker::CGRuntime::createINETClientSocket(sRemoteAddress, iPort);
1042 	result = cppResult;
1043 	RELEASE_STRING(RemoteAddress);
1044 	return result;
1045 }
1046 
Java_org_codeworker_jni_Runtime_createINETServerSocket(JNIEnv * pEnv,jclass,jint jPort,jint jBackLog)1047 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_createINETServerSocket(JNIEnv *pEnv, jclass, jint jPort, jint jBackLog) {
1048 	jint result;
1049 	int iPort;
1050 	iPort = jPort;
1051 	int iBackLog;
1052 	iBackLog = jBackLog;
1053 	int cppResult = CodeWorker::CGRuntime::createINETServerSocket(iPort, iBackLog);
1054 	result = cppResult;
1055 	return result;
1056 }
1057 
Java_org_codeworker_jni_Runtime_createIterator(JNIEnv * pEnv,jclass,jobject jI,jobject jList)1058 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_createIterator(JNIEnv *pEnv, jclass, jobject jI, jobject jList) {
1059 	jboolean result;
1060 	CodeWorker::DtaScriptVariable* pI;
1061 	GET_PARSETREE_HANDLE(I);
1062 	pI = pIInstance;
1063 	CodeWorker::DtaScriptVariable* pList;
1064 	GET_PARSETREE_HANDLE(List);
1065 	pList = pListInstance;
1066 	bool cppResult = CodeWorker::CGRuntime::createIterator(pI, pList);
1067 	result = cppResult;
1068 	return result;
1069 }
1070 
Java_org_codeworker_jni_Runtime_createReverseIterator(JNIEnv * pEnv,jclass,jobject jI,jobject jList)1071 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_createReverseIterator(JNIEnv *pEnv, jclass, jobject jI, jobject jList) {
1072 	jboolean result;
1073 	CodeWorker::DtaScriptVariable* pI;
1074 	GET_PARSETREE_HANDLE(I);
1075 	pI = pIInstance;
1076 	CodeWorker::DtaScriptVariable* pList;
1077 	GET_PARSETREE_HANDLE(List);
1078 	pList = pListInstance;
1079 	bool cppResult = CodeWorker::CGRuntime::createReverseIterator(pI, pList);
1080 	result = cppResult;
1081 	return result;
1082 }
1083 
Java_org_codeworker_jni_Runtime_createVirtualFile(JNIEnv * pEnv,jclass,jstring jHandle,jstring jContent)1084 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_createVirtualFile(JNIEnv *pEnv, jclass, jstring jHandle, jstring jContent) {
1085 	jboolean result;
1086 	std::string sHandle;
1087 	GET_STRING(Handle);
1088 	sHandle = tcHandle;
1089 	std::string sContent;
1090 	GET_STRING(Content);
1091 	sContent = tcContent;
1092 	bool cppResult = CodeWorker::CGRuntime::createVirtualFile(sHandle, sContent);
1093 	result = cppResult;
1094 	RELEASE_STRING(Content);
1095 	RELEASE_STRING(Handle);
1096 	return result;
1097 }
1098 
Java_org_codeworker_jni_Runtime_createVirtualTemporaryFile(JNIEnv * pEnv,jclass,jstring jContent)1099 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_createVirtualTemporaryFile(JNIEnv *pEnv, jclass, jstring jContent) {
1100 	jstring result;
1101 	std::string sContent;
1102 	GET_STRING(Content);
1103 	sContent = tcContent;
1104 	std::string cppResult = CodeWorker::CGRuntime::createVirtualTemporaryFile(sContent);
1105 	result = pEnv->NewStringUTF(cppResult.c_str());
1106 	RELEASE_STRING(Content);
1107 	return result;
1108 }
1109 
Java_org_codeworker_jni_Runtime_decodeURL(JNIEnv * pEnv,jclass,jstring jURL)1110 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_decodeURL(JNIEnv *pEnv, jclass, jstring jURL) {
1111 	jstring result;
1112 	std::string sURL;
1113 	GET_STRING(URL);
1114 	sURL = tcURL;
1115 	std::string cppResult = CodeWorker::CGRuntime::decodeURL(sURL);
1116 	result = pEnv->NewStringUTF(cppResult.c_str());
1117 	RELEASE_STRING(URL);
1118 	return result;
1119 }
1120 
Java_org_codeworker_jni_Runtime_decrement(JNIEnv * pEnv,jclass,jobject jNumber)1121 JNIEXPORT jdouble JNICALL Java_org_codeworker_jni_Runtime_decrement(JNIEnv *pEnv, jclass, jobject jNumber) {
1122 	jdouble result;
1123 	double dNumber;
1124 	// NOT HANDLED YET!
1125 	double cppResult = CodeWorker::CGRuntime::decrement(dNumber);
1126 	result = cppResult;
1127 	return result;
1128 }
1129 
Java_org_codeworker_jni_Runtime_deleteFile(JNIEnv * pEnv,jclass,jstring jFilename)1130 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_deleteFile(JNIEnv *pEnv, jclass, jstring jFilename) {
1131 	jboolean result;
1132 	std::string sFilename;
1133 	GET_STRING(Filename);
1134 	sFilename = tcFilename;
1135 	bool cppResult = CodeWorker::CGRuntime::deleteFile(sFilename);
1136 	result = cppResult;
1137 	RELEASE_STRING(Filename);
1138 	return result;
1139 }
1140 
Java_org_codeworker_jni_Runtime_deleteVirtualFile(JNIEnv * pEnv,jclass,jstring jHandle)1141 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_deleteVirtualFile(JNIEnv *pEnv, jclass, jstring jHandle) {
1142 	jboolean result;
1143 	std::string sHandle;
1144 	GET_STRING(Handle);
1145 	sHandle = tcHandle;
1146 	bool cppResult = CodeWorker::CGRuntime::deleteVirtualFile(sHandle);
1147 	result = cppResult;
1148 	RELEASE_STRING(Handle);
1149 	return result;
1150 }
1151 
Java_org_codeworker_jni_Runtime_div(JNIEnv * pEnv,jclass,jdouble jDividend,jdouble jDivisor)1152 JNIEXPORT jdouble JNICALL Java_org_codeworker_jni_Runtime_div(JNIEnv *pEnv, jclass, jdouble jDividend, jdouble jDivisor) {
1153 	jdouble result;
1154 	double dDividend;
1155 	dDividend = jDividend;
1156 	double dDivisor;
1157 	dDivisor = jDivisor;
1158 	double cppResult = CodeWorker::CGRuntime::div(dDividend, dDivisor);
1159 	result = cppResult;
1160 	return result;
1161 }
1162 
Java_org_codeworker_jni_Runtime_duplicateIterator(JNIEnv * pEnv,jclass,jobject jOldIt,jobject jNewIt)1163 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_duplicateIterator(JNIEnv *pEnv, jclass, jobject jOldIt, jobject jNewIt) {
1164 	jboolean result;
1165 	CodeWorker::DtaScriptVariable* pOldIt;
1166 	GET_PARSETREE_HANDLE(OldIt);
1167 	pOldIt = pOldItInstance;
1168 	CodeWorker::DtaScriptVariable* pNewIt;
1169 	GET_PARSETREE_HANDLE(NewIt);
1170 	pNewIt = pNewItInstance;
1171 	bool cppResult = CodeWorker::CGRuntime::duplicateIterator(pOldIt, pNewIt);
1172 	result = cppResult;
1173 	return result;
1174 }
1175 
Java_org_codeworker_jni_Runtime_encodeURL(JNIEnv * pEnv,jclass,jstring jURL)1176 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_encodeURL(JNIEnv *pEnv, jclass, jstring jURL) {
1177 	jstring result;
1178 	std::string sURL;
1179 	GET_STRING(URL);
1180 	sURL = tcURL;
1181 	std::string cppResult = CodeWorker::CGRuntime::encodeURL(sURL);
1182 	result = pEnv->NewStringUTF(cppResult.c_str());
1183 	RELEASE_STRING(URL);
1184 	return result;
1185 }
1186 
Java_org_codeworker_jni_Runtime_endl(JNIEnv * pEnv,jclass)1187 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_endl(JNIEnv *pEnv, jclass) {
1188 	jstring result;
1189 	std::string cppResult = CodeWorker::CGRuntime::endl();
1190 	result = pEnv->NewStringUTF(cppResult.c_str());
1191 	return result;
1192 }
1193 
Java_org_codeworker_jni_Runtime_endString(JNIEnv * pEnv,jclass,jstring jText,jstring jEnd)1194 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_endString(JNIEnv *pEnv, jclass, jstring jText, jstring jEnd) {
1195 	jboolean result;
1196 	std::string sText;
1197 	GET_STRING(Text);
1198 	sText = tcText;
1199 	std::string sEnd;
1200 	GET_STRING(End);
1201 	sEnd = tcEnd;
1202 	bool cppResult = CodeWorker::CGRuntime::endString(sText, sEnd);
1203 	result = cppResult;
1204 	RELEASE_STRING(End);
1205 	RELEASE_STRING(Text);
1206 	return result;
1207 }
1208 
Java_org_codeworker_jni_Runtime_equal(JNIEnv * pEnv,jclass,jdouble jLeft,jdouble jRight)1209 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_equal(JNIEnv *pEnv, jclass, jdouble jLeft, jdouble jRight) {
1210 	jboolean result;
1211 	double dLeft;
1212 	dLeft = jLeft;
1213 	double dRight;
1214 	dRight = jRight;
1215 	bool cppResult = CodeWorker::CGRuntime::equal(dLeft, dRight);
1216 	result = cppResult;
1217 	return result;
1218 }
1219 
Java_org_codeworker_jni_Runtime_equalsIgnoreCase(JNIEnv * pEnv,jclass,jstring jLeft,jstring jRight)1220 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_equalsIgnoreCase(JNIEnv *pEnv, jclass, jstring jLeft, jstring jRight) {
1221 	jboolean result;
1222 	std::string sLeft;
1223 	GET_STRING(Left);
1224 	sLeft = tcLeft;
1225 	std::string sRight;
1226 	GET_STRING(Right);
1227 	sRight = tcRight;
1228 	bool cppResult = CodeWorker::CGRuntime::equalsIgnoreCase(sLeft, sRight);
1229 	result = cppResult;
1230 	RELEASE_STRING(Right);
1231 	RELEASE_STRING(Left);
1232 	return result;
1233 }
1234 
Java_org_codeworker_jni_Runtime_equalTrees(JNIEnv * pEnv,jclass,jobject jFirstTree,jobject jSecondTree)1235 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_equalTrees(JNIEnv *pEnv, jclass, jobject jFirstTree, jobject jSecondTree) {
1236 	jboolean result;
1237 	CodeWorker::DtaScriptVariable* pFirstTree;
1238 	GET_PARSETREE_HANDLE(FirstTree);
1239 	pFirstTree = pFirstTreeInstance;
1240 	CodeWorker::DtaScriptVariable* pSecondTree;
1241 	GET_PARSETREE_HANDLE(SecondTree);
1242 	pSecondTree = pSecondTreeInstance;
1243 	bool cppResult = CodeWorker::CGRuntime::equalTrees(pFirstTree, pSecondTree);
1244 	result = cppResult;
1245 	return result;
1246 }
1247 
Java_org_codeworker_jni_Runtime_executeStringQuiet(JNIEnv * pEnv,jclass,jobject jThis,jstring jCommand)1248 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_executeStringQuiet(JNIEnv *pEnv, jclass, jobject jThis, jstring jCommand) {
1249 	jstring result;
1250 	CodeWorker::DtaScriptVariable* pThis;
1251 	GET_PARSETREE_HANDLE(This);
1252 	pThis = pThisInstance;
1253 	std::string sCommand;
1254 	GET_STRING(Command);
1255 	sCommand = tcCommand;
1256 	std::string cppResult = CodeWorker::CGRuntime::executeStringQuiet(pThis, sCommand);
1257 	result = pEnv->NewStringUTF(cppResult.c_str());
1258 	RELEASE_STRING(Command);
1259 	return result;
1260 }
1261 
Java_org_codeworker_jni_Runtime_existDirectory(JNIEnv * pEnv,jclass,jstring jPath)1262 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_existDirectory(JNIEnv *pEnv, jclass, jstring jPath) {
1263 	jboolean result;
1264 	std::string sPath;
1265 	GET_STRING(Path);
1266 	sPath = tcPath;
1267 	bool cppResult = CodeWorker::CGRuntime::existDirectory(sPath);
1268 	result = cppResult;
1269 	RELEASE_STRING(Path);
1270 	return result;
1271 }
1272 
Java_org_codeworker_jni_Runtime_existEnv(JNIEnv * pEnv,jclass,jstring jVariable)1273 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_existEnv(JNIEnv *pEnv, jclass, jstring jVariable) {
1274 	jboolean result;
1275 	std::string sVariable;
1276 	GET_STRING(Variable);
1277 	sVariable = tcVariable;
1278 	bool cppResult = CodeWorker::CGRuntime::existEnv(sVariable);
1279 	result = cppResult;
1280 	RELEASE_STRING(Variable);
1281 	return result;
1282 }
1283 
Java_org_codeworker_jni_Runtime_existFile(JNIEnv * pEnv,jclass,jstring jFileName)1284 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_existFile(JNIEnv *pEnv, jclass, jstring jFileName) {
1285 	jboolean result;
1286 	std::string sFileName;
1287 	GET_STRING(FileName);
1288 	sFileName = tcFileName;
1289 	bool cppResult = CodeWorker::CGRuntime::existFile(sFileName);
1290 	result = cppResult;
1291 	RELEASE_STRING(FileName);
1292 	return result;
1293 }
1294 
Java_org_codeworker_jni_Runtime_existVirtualFile(JNIEnv * pEnv,jclass,jstring jHandle)1295 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_existVirtualFile(JNIEnv *pEnv, jclass, jstring jHandle) {
1296 	jboolean result;
1297 	std::string sHandle;
1298 	GET_STRING(Handle);
1299 	sHandle = tcHandle;
1300 	bool cppResult = CodeWorker::CGRuntime::existVirtualFile(sHandle);
1301 	result = cppResult;
1302 	RELEASE_STRING(Handle);
1303 	return result;
1304 }
1305 
Java_org_codeworker_jni_Runtime_existVariable(JNIEnv * pEnv,jclass,jobject jVariable)1306 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_existVariable(JNIEnv *pEnv, jclass, jobject jVariable) {
1307 	jboolean result;
1308 	CodeWorker::DtaScriptVariable* pVariable;
1309 	GET_PARSETREE_HANDLE(Variable);
1310 	pVariable = pVariableInstance;
1311 	bool cppResult = CodeWorker::CGRuntime::existVariable(pVariable);
1312 	result = cppResult;
1313 	return result;
1314 }
1315 
Java_org_codeworker_jni_Runtime_exp(JNIEnv * pEnv,jclass,jdouble jX)1316 JNIEXPORT jdouble JNICALL Java_org_codeworker_jni_Runtime_exp(JNIEnv *pEnv, jclass, jdouble jX) {
1317 	jdouble result;
1318 	double dX;
1319 	dX = jX;
1320 	double cppResult = CodeWorker::CGRuntime::exp(dX);
1321 	result = cppResult;
1322 	return result;
1323 }
1324 
Java_org_codeworker_jni_Runtime_exploreDirectory(JNIEnv * pEnv,jclass,jobject jDirectory,jstring jPath,jboolean jSubfolders)1325 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_exploreDirectory(JNIEnv *pEnv, jclass, jobject jDirectory, jstring jPath, jboolean jSubfolders) {
1326 	jboolean result;
1327 	CodeWorker::DtaScriptVariable* pDirectory;
1328 	GET_PARSETREE_HANDLE(Directory);
1329 	pDirectory = pDirectoryInstance;
1330 	std::string sPath;
1331 	GET_STRING(Path);
1332 	sPath = tcPath;
1333 	bool bSubfolders;
1334 	bSubfolders = (jSubfolders != '\0');
1335 	bool cppResult = CodeWorker::CGRuntime::exploreDirectory(pDirectory, sPath, bSubfolders);
1336 	result = cppResult;
1337 	RELEASE_STRING(Path);
1338 	return result;
1339 }
1340 
Java_org_codeworker_jni_Runtime_extractGenerationHeader(JNIEnv * pEnv,jclass,jstring jFilename,jobject jGenerator,jobject jVersion,jobject jDate)1341 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_extractGenerationHeader(JNIEnv *pEnv, jclass, jstring jFilename, jobject jGenerator, jobject jVersion, jobject jDate) {
1342 	jstring result;
1343 	std::string sFilename;
1344 	GET_STRING(Filename);
1345 	sFilename = tcFilename;
1346 	std::string sGenerator;
1347 	// NOT HANDLED YET!
1348 	std::string sVersion;
1349 	// NOT HANDLED YET!
1350 	std::string sDate;
1351 	// NOT HANDLED YET!
1352 	std::string cppResult = CodeWorker::CGRuntime::extractGenerationHeader(sFilename, sGenerator, sVersion, sDate);
1353 	result = pEnv->NewStringUTF(cppResult.c_str());
1354 	RELEASE_STRING(Filename);
1355 	return result;
1356 }
1357 
Java_org_codeworker_jni_Runtime_fileCreation(JNIEnv * pEnv,jclass,jstring jFilename)1358 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_fileCreation(JNIEnv *pEnv, jclass, jstring jFilename) {
1359 	jstring result;
1360 	std::string sFilename;
1361 	GET_STRING(Filename);
1362 	sFilename = tcFilename;
1363 	std::string cppResult = CodeWorker::CGRuntime::fileCreation(sFilename);
1364 	result = pEnv->NewStringUTF(cppResult.c_str());
1365 	RELEASE_STRING(Filename);
1366 	return result;
1367 }
1368 
Java_org_codeworker_jni_Runtime_fileLastAccess(JNIEnv * pEnv,jclass,jstring jFilename)1369 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_fileLastAccess(JNIEnv *pEnv, jclass, jstring jFilename) {
1370 	jstring result;
1371 	std::string sFilename;
1372 	GET_STRING(Filename);
1373 	sFilename = tcFilename;
1374 	std::string cppResult = CodeWorker::CGRuntime::fileLastAccess(sFilename);
1375 	result = pEnv->NewStringUTF(cppResult.c_str());
1376 	RELEASE_STRING(Filename);
1377 	return result;
1378 }
1379 
Java_org_codeworker_jni_Runtime_fileLastModification(JNIEnv * pEnv,jclass,jstring jFilename)1380 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_fileLastModification(JNIEnv *pEnv, jclass, jstring jFilename) {
1381 	jstring result;
1382 	std::string sFilename;
1383 	GET_STRING(Filename);
1384 	sFilename = tcFilename;
1385 	std::string cppResult = CodeWorker::CGRuntime::fileLastModification(sFilename);
1386 	result = pEnv->NewStringUTF(cppResult.c_str());
1387 	RELEASE_STRING(Filename);
1388 	return result;
1389 }
1390 
Java_org_codeworker_jni_Runtime_fileLines(JNIEnv * pEnv,jclass,jstring jFilename)1391 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_fileLines(JNIEnv *pEnv, jclass, jstring jFilename) {
1392 	jint result;
1393 	std::string sFilename;
1394 	GET_STRING(Filename);
1395 	sFilename = tcFilename;
1396 	int cppResult = CodeWorker::CGRuntime::fileLines(sFilename);
1397 	result = cppResult;
1398 	RELEASE_STRING(Filename);
1399 	return result;
1400 }
1401 
Java_org_codeworker_jni_Runtime_fileMode(JNIEnv * pEnv,jclass,jstring jFilename)1402 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_fileMode(JNIEnv *pEnv, jclass, jstring jFilename) {
1403 	jstring result;
1404 	std::string sFilename;
1405 	GET_STRING(Filename);
1406 	sFilename = tcFilename;
1407 	std::string cppResult = CodeWorker::CGRuntime::fileMode(sFilename);
1408 	result = pEnv->NewStringUTF(cppResult.c_str());
1409 	RELEASE_STRING(Filename);
1410 	return result;
1411 }
1412 
Java_org_codeworker_jni_Runtime_fileSize(JNIEnv * pEnv,jclass,jstring jFilename)1413 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_fileSize(JNIEnv *pEnv, jclass, jstring jFilename) {
1414 	jint result;
1415 	std::string sFilename;
1416 	GET_STRING(Filename);
1417 	sFilename = tcFilename;
1418 	int cppResult = CodeWorker::CGRuntime::fileSize(sFilename);
1419 	result = cppResult;
1420 	RELEASE_STRING(Filename);
1421 	return result;
1422 }
1423 
Java_org_codeworker_jni_Runtime_findElement(JNIEnv * pEnv,jclass,jstring jValue,jobject jVariable)1424 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_findElement(JNIEnv *pEnv, jclass, jstring jValue, jobject jVariable) {
1425 	jboolean result;
1426 	std::string sValue;
1427 	GET_STRING(Value);
1428 	sValue = tcValue;
1429 	CodeWorker::DtaScriptVariable* pVariable;
1430 	GET_PARSETREE_HANDLE(Variable);
1431 	pVariable = pVariableInstance;
1432 	bool cppResult = CodeWorker::CGRuntime::findElement(sValue, pVariable);
1433 	result = cppResult;
1434 	RELEASE_STRING(Value);
1435 	return result;
1436 }
1437 
Java_org_codeworker_jni_Runtime_findFirstChar(JNIEnv * pEnv,jclass,jstring jText,jstring jSomeChars)1438 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_findFirstChar(JNIEnv *pEnv, jclass, jstring jText, jstring jSomeChars) {
1439 	jint result;
1440 	std::string sText;
1441 	GET_STRING(Text);
1442 	sText = tcText;
1443 	std::string sSomeChars;
1444 	GET_STRING(SomeChars);
1445 	sSomeChars = tcSomeChars;
1446 	int cppResult = CodeWorker::CGRuntime::findFirstChar(sText, sSomeChars);
1447 	result = cppResult;
1448 	RELEASE_STRING(SomeChars);
1449 	RELEASE_STRING(Text);
1450 	return result;
1451 }
1452 
Java_org_codeworker_jni_Runtime_findFirstSubstringIntoKeys(JNIEnv * pEnv,jclass,jstring jSubstring,jobject jArray)1453 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_findFirstSubstringIntoKeys(JNIEnv *pEnv, jclass, jstring jSubstring, jobject jArray) {
1454 	jint result;
1455 	std::string sSubstring;
1456 	GET_STRING(Substring);
1457 	sSubstring = tcSubstring;
1458 	CodeWorker::DtaScriptVariable* pArray;
1459 	GET_PARSETREE_HANDLE(Array);
1460 	pArray = pArrayInstance;
1461 	int cppResult = CodeWorker::CGRuntime::findFirstSubstringIntoKeys(sSubstring, pArray);
1462 	result = cppResult;
1463 	RELEASE_STRING(Substring);
1464 	return result;
1465 }
1466 
Java_org_codeworker_jni_Runtime_findLastString(JNIEnv * pEnv,jclass,jstring jText,jstring jFind)1467 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_findLastString(JNIEnv *pEnv, jclass, jstring jText, jstring jFind) {
1468 	jint result;
1469 	std::string sText;
1470 	GET_STRING(Text);
1471 	sText = tcText;
1472 	std::string sFind;
1473 	GET_STRING(Find);
1474 	sFind = tcFind;
1475 	int cppResult = CodeWorker::CGRuntime::findLastString(sText, sFind);
1476 	result = cppResult;
1477 	RELEASE_STRING(Find);
1478 	RELEASE_STRING(Text);
1479 	return result;
1480 }
1481 
Java_org_codeworker_jni_Runtime_findNextString(JNIEnv * pEnv,jclass,jstring jText,jstring jFind,jint jPosition)1482 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_findNextString(JNIEnv *pEnv, jclass, jstring jText, jstring jFind, jint jPosition) {
1483 	jint result;
1484 	std::string sText;
1485 	GET_STRING(Text);
1486 	sText = tcText;
1487 	std::string sFind;
1488 	GET_STRING(Find);
1489 	sFind = tcFind;
1490 	int iPosition;
1491 	iPosition = jPosition;
1492 	int cppResult = CodeWorker::CGRuntime::findNextString(sText, sFind, iPosition);
1493 	result = cppResult;
1494 	RELEASE_STRING(Find);
1495 	RELEASE_STRING(Text);
1496 	return result;
1497 }
1498 
Java_org_codeworker_jni_Runtime_findNextSubstringIntoKeys(JNIEnv * pEnv,jclass,jstring jSubstring,jobject jArray,jint jNext)1499 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_findNextSubstringIntoKeys(JNIEnv *pEnv, jclass, jstring jSubstring, jobject jArray, jint jNext) {
1500 	jint result;
1501 	std::string sSubstring;
1502 	GET_STRING(Substring);
1503 	sSubstring = tcSubstring;
1504 	CodeWorker::DtaScriptVariable* pArray;
1505 	GET_PARSETREE_HANDLE(Array);
1506 	pArray = pArrayInstance;
1507 	int iNext;
1508 	iNext = jNext;
1509 	int cppResult = CodeWorker::CGRuntime::findNextSubstringIntoKeys(sSubstring, pArray, iNext);
1510 	result = cppResult;
1511 	RELEASE_STRING(Substring);
1512 	return result;
1513 }
1514 
Java_org_codeworker_jni_Runtime_findString(JNIEnv * pEnv,jclass,jstring jText,jstring jFind)1515 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_findString(JNIEnv *pEnv, jclass, jstring jText, jstring jFind) {
1516 	jint result;
1517 	std::string sText;
1518 	GET_STRING(Text);
1519 	sText = tcText;
1520 	std::string sFind;
1521 	GET_STRING(Find);
1522 	sFind = tcFind;
1523 	int cppResult = CodeWorker::CGRuntime::findString(sText, sFind);
1524 	result = cppResult;
1525 	RELEASE_STRING(Find);
1526 	RELEASE_STRING(Text);
1527 	return result;
1528 }
1529 
Java_org_codeworker_jni_Runtime_floor(JNIEnv * pEnv,jclass,jdouble jNumber)1530 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_floor(JNIEnv *pEnv, jclass, jdouble jNumber) {
1531 	jint result;
1532 	double dNumber;
1533 	dNumber = jNumber;
1534 	int cppResult = CodeWorker::CGRuntime::floor(dNumber);
1535 	result = cppResult;
1536 	return result;
1537 }
1538 
Java_org_codeworker_jni_Runtime_formatDate(JNIEnv * pEnv,jclass,jstring jDate,jstring jFormat)1539 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_formatDate(JNIEnv *pEnv, jclass, jstring jDate, jstring jFormat) {
1540 	jstring result;
1541 	std::string sDate;
1542 	GET_STRING(Date);
1543 	sDate = tcDate;
1544 	std::string sFormat;
1545 	GET_STRING(Format);
1546 	sFormat = tcFormat;
1547 	std::string cppResult = CodeWorker::CGRuntime::formatDate(sDate, sFormat);
1548 	result = pEnv->NewStringUTF(cppResult.c_str());
1549 	RELEASE_STRING(Format);
1550 	RELEASE_STRING(Date);
1551 	return result;
1552 }
1553 
Java_org_codeworker_jni_Runtime_getArraySize(JNIEnv * pEnv,jclass,jobject jVariable)1554 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_getArraySize(JNIEnv *pEnv, jclass, jobject jVariable) {
1555 	jint result;
1556 	CodeWorker::DtaScriptVariable* pVariable;
1557 	GET_PARSETREE_HANDLE(Variable);
1558 	pVariable = pVariableInstance;
1559 	int cppResult = CodeWorker::CGRuntime::getArraySize(pVariable);
1560 	result = cppResult;
1561 	return result;
1562 }
1563 
Java_org_codeworker_jni_Runtime_getCommentBegin(JNIEnv * pEnv,jclass)1564 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getCommentBegin(JNIEnv *pEnv, jclass) {
1565 	jstring result;
1566 	std::string cppResult = CodeWorker::CGRuntime::getCommentBegin();
1567 	result = pEnv->NewStringUTF(cppResult.c_str());
1568 	return result;
1569 }
1570 
Java_org_codeworker_jni_Runtime_getCommentEnd(JNIEnv * pEnv,jclass)1571 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getCommentEnd(JNIEnv *pEnv, jclass) {
1572 	jstring result;
1573 	std::string cppResult = CodeWorker::CGRuntime::getCommentEnd();
1574 	result = pEnv->NewStringUTF(cppResult.c_str());
1575 	return result;
1576 }
1577 
Java_org_codeworker_jni_Runtime_getCurrentDirectory(JNIEnv * pEnv,jclass)1578 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getCurrentDirectory(JNIEnv *pEnv, jclass) {
1579 	jstring result;
1580 	std::string cppResult = CodeWorker::CGRuntime::getCurrentDirectory();
1581 	result = pEnv->NewStringUTF(cppResult.c_str());
1582 	return result;
1583 }
1584 
Java_org_codeworker_jni_Runtime_getEnv(JNIEnv * pEnv,jclass,jstring jVariable)1585 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getEnv(JNIEnv *pEnv, jclass, jstring jVariable) {
1586 	jstring result;
1587 	std::string sVariable;
1588 	GET_STRING(Variable);
1589 	sVariable = tcVariable;
1590 	std::string cppResult = CodeWorker::CGRuntime::getEnv(sVariable);
1591 	result = pEnv->NewStringUTF(cppResult.c_str());
1592 	RELEASE_STRING(Variable);
1593 	return result;
1594 }
1595 
Java_org_codeworker_jni_Runtime_getGenerationHeader(JNIEnv * pEnv,jclass)1596 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getGenerationHeader(JNIEnv *pEnv, jclass) {
1597 	jstring result;
1598 	std::string cppResult = CodeWorker::CGRuntime::getGenerationHeader();
1599 	result = pEnv->NewStringUTF(cppResult.c_str());
1600 	return result;
1601 }
1602 
Java_org_codeworker_jni_Runtime_getHTTPRequest(JNIEnv * pEnv,jclass,jstring jURL,jobject jHTTPSession,jobject jArguments)1603 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getHTTPRequest(JNIEnv *pEnv, jclass, jstring jURL, jobject jHTTPSession, jobject jArguments) {
1604 	jstring result;
1605 	std::string sURL;
1606 	GET_STRING(URL);
1607 	sURL = tcURL;
1608 	CodeWorker::DtaScriptVariable* pHTTPSession;
1609 	GET_PARSETREE_HANDLE(HTTPSession);
1610 	pHTTPSession = pHTTPSessionInstance;
1611 	CodeWorker::DtaScriptVariable* pArguments;
1612 	GET_PARSETREE_HANDLE(Arguments);
1613 	pArguments = pArgumentsInstance;
1614 	std::string cppResult = CodeWorker::CGRuntime::getHTTPRequest(sURL, pHTTPSession, pArguments);
1615 	result = pEnv->NewStringUTF(cppResult.c_str());
1616 	RELEASE_STRING(URL);
1617 	return result;
1618 }
1619 
Java_org_codeworker_jni_Runtime_getIncludePath(JNIEnv * pEnv,jclass)1620 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getIncludePath(JNIEnv *pEnv, jclass) {
1621 	jstring result;
1622 	std::string cppResult = CodeWorker::CGRuntime::getIncludePath();
1623 	result = pEnv->NewStringUTF(cppResult.c_str());
1624 	return result;
1625 }
1626 
Java_org_codeworker_jni_Runtime_getLastDelay(JNIEnv * pEnv,jclass)1627 JNIEXPORT jdouble JNICALL Java_org_codeworker_jni_Runtime_getLastDelay(JNIEnv *pEnv, jclass) {
1628 	jdouble result;
1629 	double cppResult = CodeWorker::CGRuntime::getLastDelay();
1630 	result = cppResult;
1631 	return result;
1632 }
1633 
Java_org_codeworker_jni_Runtime_getNow(JNIEnv * pEnv,jclass)1634 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getNow(JNIEnv *pEnv, jclass) {
1635 	jstring result;
1636 	std::string cppResult = CodeWorker::CGRuntime::getNow();
1637 	result = pEnv->NewStringUTF(cppResult.c_str());
1638 	return result;
1639 }
1640 
Java_org_codeworker_jni_Runtime_getProperty(JNIEnv * pEnv,jclass,jstring jDefine)1641 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getProperty(JNIEnv *pEnv, jclass, jstring jDefine) {
1642 	jstring result;
1643 	std::string sDefine;
1644 	GET_STRING(Define);
1645 	sDefine = tcDefine;
1646 	std::string cppResult = CodeWorker::CGRuntime::getProperty(sDefine);
1647 	result = pEnv->NewStringUTF(cppResult.c_str());
1648 	RELEASE_STRING(Define);
1649 	return result;
1650 }
1651 
Java_org_codeworker_jni_Runtime_getShortFilename(JNIEnv * pEnv,jclass,jstring jPathFilename)1652 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getShortFilename(JNIEnv *pEnv, jclass, jstring jPathFilename) {
1653 	jstring result;
1654 	std::string sPathFilename;
1655 	GET_STRING(PathFilename);
1656 	sPathFilename = tcPathFilename;
1657 	std::string cppResult = CodeWorker::CGRuntime::getShortFilename(sPathFilename);
1658 	result = pEnv->NewStringUTF(cppResult.c_str());
1659 	RELEASE_STRING(PathFilename);
1660 	return result;
1661 }
1662 
Java_org_codeworker_jni_Runtime_getTextMode(JNIEnv * pEnv,jclass)1663 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getTextMode(JNIEnv *pEnv, jclass) {
1664 	jstring result;
1665 	std::string cppResult = CodeWorker::CGRuntime::getTextMode();
1666 	result = pEnv->NewStringUTF(cppResult.c_str());
1667 	return result;
1668 }
1669 
Java_org_codeworker_jni_Runtime_getVariableAttributes(JNIEnv * pEnv,jclass,jobject jVariable,jobject jList)1670 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_getVariableAttributes(JNIEnv *pEnv, jclass, jobject jVariable, jobject jList) {
1671 	jint result;
1672 	CodeWorker::DtaScriptVariable* pVariable;
1673 	GET_PARSETREE_HANDLE(Variable);
1674 	pVariable = pVariableInstance;
1675 	CodeWorker::DtaScriptVariable* pList;
1676 	GET_PARSETREE_HANDLE(List);
1677 	pList = pListInstance;
1678 	int cppResult = CodeWorker::CGRuntime::getVariableAttributes(pVariable, pList);
1679 	result = cppResult;
1680 	return result;
1681 }
1682 
Java_org_codeworker_jni_Runtime_getVersion(JNIEnv * pEnv,jclass)1683 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getVersion(JNIEnv *pEnv, jclass) {
1684 	jstring result;
1685 	std::string cppResult = CodeWorker::CGRuntime::getVersion();
1686 	result = pEnv->NewStringUTF(cppResult.c_str());
1687 	return result;
1688 }
1689 
Java_org_codeworker_jni_Runtime_getWorkingPath(JNIEnv * pEnv,jclass)1690 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getWorkingPath(JNIEnv *pEnv, jclass) {
1691 	jstring result;
1692 	std::string cppResult = CodeWorker::CGRuntime::getWorkingPath();
1693 	result = pEnv->NewStringUTF(cppResult.c_str());
1694 	return result;
1695 }
1696 
Java_org_codeworker_jni_Runtime_getWriteMode(JNIEnv * pEnv,jclass)1697 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getWriteMode(JNIEnv *pEnv, jclass) {
1698 	jstring result;
1699 	std::string cppResult = CodeWorker::CGRuntime::getWriteMode();
1700 	result = pEnv->NewStringUTF(cppResult.c_str());
1701 	return result;
1702 }
1703 
Java_org_codeworker_jni_Runtime_hexaToDecimal(JNIEnv * pEnv,jclass,jstring jHexaNumber)1704 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_hexaToDecimal(JNIEnv *pEnv, jclass, jstring jHexaNumber) {
1705 	jint result;
1706 	std::string sHexaNumber;
1707 	GET_STRING(HexaNumber);
1708 	sHexaNumber = tcHexaNumber;
1709 	int cppResult = CodeWorker::CGRuntime::hexaToDecimal(sHexaNumber);
1710 	result = cppResult;
1711 	RELEASE_STRING(HexaNumber);
1712 	return result;
1713 }
1714 
Java_org_codeworker_jni_Runtime_hostToNetworkLong(JNIEnv * pEnv,jclass,jstring jBytes)1715 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_hostToNetworkLong(JNIEnv *pEnv, jclass, jstring jBytes) {
1716 	jstring result;
1717 	std::string sBytes;
1718 	GET_STRING(Bytes);
1719 	sBytes = tcBytes;
1720 	std::string cppResult = CodeWorker::CGRuntime::hostToNetworkLong(sBytes);
1721 	result = pEnv->NewStringUTF(cppResult.c_str());
1722 	RELEASE_STRING(Bytes);
1723 	return result;
1724 }
1725 
Java_org_codeworker_jni_Runtime_hostToNetworkShort(JNIEnv * pEnv,jclass,jstring jBytes)1726 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_hostToNetworkShort(JNIEnv *pEnv, jclass, jstring jBytes) {
1727 	jstring result;
1728 	std::string sBytes;
1729 	GET_STRING(Bytes);
1730 	sBytes = tcBytes;
1731 	std::string cppResult = CodeWorker::CGRuntime::hostToNetworkShort(sBytes);
1732 	result = pEnv->NewStringUTF(cppResult.c_str());
1733 	RELEASE_STRING(Bytes);
1734 	return result;
1735 }
1736 
Java_org_codeworker_jni_Runtime_increment(JNIEnv * pEnv,jclass,jobject jNumber)1737 JNIEXPORT jdouble JNICALL Java_org_codeworker_jni_Runtime_increment(JNIEnv *pEnv, jclass, jobject jNumber) {
1738 	jdouble result;
1739 	double dNumber;
1740 	// NOT HANDLED YET!
1741 	double cppResult = CodeWorker::CGRuntime::increment(dNumber);
1742 	result = cppResult;
1743 	return result;
1744 }
1745 
Java_org_codeworker_jni_Runtime_indentFile(JNIEnv * pEnv,jclass,jstring jFile,jstring jMode)1746 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_indentFile(JNIEnv *pEnv, jclass, jstring jFile, jstring jMode) {
1747 	jboolean result;
1748 	std::string sFile;
1749 	GET_STRING(File);
1750 	sFile = tcFile;
1751 	std::string sMode;
1752 	GET_STRING(Mode);
1753 	sMode = tcMode;
1754 	bool cppResult = CodeWorker::CGRuntime::indentFile(sFile, sMode);
1755 	result = cppResult;
1756 	RELEASE_STRING(Mode);
1757 	RELEASE_STRING(File);
1758 	return result;
1759 }
1760 
Java_org_codeworker_jni_Runtime_inf(JNIEnv * pEnv,jclass,jdouble jLeft,jdouble jRight)1761 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_inf(JNIEnv *pEnv, jclass, jdouble jLeft, jdouble jRight) {
1762 	jboolean result;
1763 	double dLeft;
1764 	dLeft = jLeft;
1765 	double dRight;
1766 	dRight = jRight;
1767 	bool cppResult = CodeWorker::CGRuntime::inf(dLeft, dRight);
1768 	result = cppResult;
1769 	return result;
1770 }
1771 
Java_org_codeworker_jni_Runtime_inputKey(JNIEnv * pEnv,jclass,jboolean jEcho)1772 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_inputKey(JNIEnv *pEnv, jclass, jboolean jEcho) {
1773 	jstring result;
1774 	bool bEcho;
1775 	bEcho = (jEcho != '\0');
1776 	std::string cppResult = CodeWorker::CGRuntime::inputKey(bEcho);
1777 	result = pEnv->NewStringUTF(cppResult.c_str());
1778 	return result;
1779 }
1780 
Java_org_codeworker_jni_Runtime_inputLine(JNIEnv * pEnv,jclass,jboolean jEcho,jstring jPrompt)1781 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_inputLine(JNIEnv *pEnv, jclass, jboolean jEcho, jstring jPrompt) {
1782 	jstring result;
1783 	bool bEcho;
1784 	bEcho = (jEcho != '\0');
1785 	std::string sPrompt;
1786 	GET_STRING(Prompt);
1787 	sPrompt = tcPrompt;
1788 	std::string cppResult = CodeWorker::CGRuntime::inputLine(bEcho, sPrompt);
1789 	result = pEnv->NewStringUTF(cppResult.c_str());
1790 	RELEASE_STRING(Prompt);
1791 	return result;
1792 }
1793 
Java_org_codeworker_jni_Runtime_isEmpty(JNIEnv * pEnv,jclass,jobject jArray)1794 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_isEmpty(JNIEnv *pEnv, jclass, jobject jArray) {
1795 	jboolean result;
1796 	CodeWorker::DtaScriptVariable* pArray;
1797 	GET_PARSETREE_HANDLE(Array);
1798 	pArray = pArrayInstance;
1799 	bool cppResult = CodeWorker::CGRuntime::isEmpty(pArray);
1800 	result = cppResult;
1801 	return result;
1802 }
1803 
Java_org_codeworker_jni_Runtime_isIdentifier(JNIEnv * pEnv,jclass,jstring jIdentifier)1804 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_isIdentifier(JNIEnv *pEnv, jclass, jstring jIdentifier) {
1805 	jboolean result;
1806 	std::string sIdentifier;
1807 	GET_STRING(Identifier);
1808 	sIdentifier = tcIdentifier;
1809 	bool cppResult = CodeWorker::CGRuntime::isIdentifier(sIdentifier);
1810 	result = cppResult;
1811 	RELEASE_STRING(Identifier);
1812 	return result;
1813 }
1814 
Java_org_codeworker_jni_Runtime_isNegative(JNIEnv * pEnv,jclass,jdouble jNumber)1815 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_isNegative(JNIEnv *pEnv, jclass, jdouble jNumber) {
1816 	jboolean result;
1817 	double dNumber;
1818 	dNumber = jNumber;
1819 	bool cppResult = CodeWorker::CGRuntime::isNegative(dNumber);
1820 	result = cppResult;
1821 	return result;
1822 }
1823 
Java_org_codeworker_jni_Runtime_isNumeric(JNIEnv * pEnv,jclass,jstring jNumber)1824 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_isNumeric(JNIEnv *pEnv, jclass, jstring jNumber) {
1825 	jboolean result;
1826 	std::string sNumber;
1827 	GET_STRING(Number);
1828 	sNumber = tcNumber;
1829 	bool cppResult = CodeWorker::CGRuntime::isNumeric(sNumber);
1830 	result = cppResult;
1831 	RELEASE_STRING(Number);
1832 	return result;
1833 }
1834 
Java_org_codeworker_jni_Runtime_isPositive(JNIEnv * pEnv,jclass,jdouble jNumber)1835 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_isPositive(JNIEnv *pEnv, jclass, jdouble jNumber) {
1836 	jboolean result;
1837 	double dNumber;
1838 	dNumber = jNumber;
1839 	bool cppResult = CodeWorker::CGRuntime::isPositive(dNumber);
1840 	result = cppResult;
1841 	return result;
1842 }
1843 
Java_org_codeworker_jni_Runtime_joinStrings(JNIEnv * pEnv,jclass,jobject jList,jstring jSeparator)1844 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_joinStrings(JNIEnv *pEnv, jclass, jobject jList, jstring jSeparator) {
1845 	jstring result;
1846 	CodeWorker::DtaScriptVariable* pList;
1847 	GET_PARSETREE_HANDLE(List);
1848 	pList = pListInstance;
1849 	std::string sSeparator;
1850 	GET_STRING(Separator);
1851 	sSeparator = tcSeparator;
1852 	std::string cppResult = CodeWorker::CGRuntime::joinStrings(pList, sSeparator);
1853 	result = pEnv->NewStringUTF(cppResult.c_str());
1854 	RELEASE_STRING(Separator);
1855 	return result;
1856 }
1857 
Java_org_codeworker_jni_Runtime_leftString(JNIEnv * pEnv,jclass,jstring jText,jint jLength)1858 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_leftString(JNIEnv *pEnv, jclass, jstring jText, jint jLength) {
1859 	jstring result;
1860 	std::string sText;
1861 	GET_STRING(Text);
1862 	sText = tcText;
1863 	int iLength;
1864 	iLength = jLength;
1865 	std::string cppResult = CodeWorker::CGRuntime::leftString(sText, iLength);
1866 	result = pEnv->NewStringUTF(cppResult.c_str());
1867 	RELEASE_STRING(Text);
1868 	return result;
1869 }
1870 
Java_org_codeworker_jni_Runtime_lengthString(JNIEnv * pEnv,jclass,jstring jText)1871 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_lengthString(JNIEnv *pEnv, jclass, jstring jText) {
1872 	jint result;
1873 	std::string sText;
1874 	GET_STRING(Text);
1875 	sText = tcText;
1876 	int cppResult = CodeWorker::CGRuntime::lengthString(sText);
1877 	result = cppResult;
1878 	RELEASE_STRING(Text);
1879 	return result;
1880 }
1881 
Java_org_codeworker_jni_Runtime_loadBinaryFile(JNIEnv * pEnv,jclass,jstring jFile,jint jLength)1882 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_loadBinaryFile(JNIEnv *pEnv, jclass, jstring jFile, jint jLength) {
1883 	jstring result;
1884 	std::string sFile;
1885 	GET_STRING(File);
1886 	sFile = tcFile;
1887 	int iLength;
1888 	iLength = jLength;
1889 	std::string cppResult = CodeWorker::CGRuntime::loadBinaryFile(sFile, iLength);
1890 	result = pEnv->NewStringUTF(cppResult.c_str());
1891 	RELEASE_STRING(File);
1892 	return result;
1893 }
1894 
Java_org_codeworker_jni_Runtime_loadFile(JNIEnv * pEnv,jclass,jstring jFile,jint jLength)1895 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_loadFile(JNIEnv *pEnv, jclass, jstring jFile, jint jLength) {
1896 	jstring result;
1897 	std::string sFile;
1898 	GET_STRING(File);
1899 	sFile = tcFile;
1900 	int iLength;
1901 	iLength = jLength;
1902 	std::string cppResult = CodeWorker::CGRuntime::loadFile(sFile, iLength);
1903 	result = pEnv->NewStringUTF(cppResult.c_str());
1904 	RELEASE_STRING(File);
1905 	return result;
1906 }
1907 
Java_org_codeworker_jni_Runtime_loadVirtualFile(JNIEnv * pEnv,jclass,jstring jHandle)1908 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_loadVirtualFile(JNIEnv *pEnv, jclass, jstring jHandle) {
1909 	jstring result;
1910 	std::string sHandle;
1911 	GET_STRING(Handle);
1912 	sHandle = tcHandle;
1913 	std::string cppResult = CodeWorker::CGRuntime::loadVirtualFile(sHandle);
1914 	result = pEnv->NewStringUTF(cppResult.c_str());
1915 	RELEASE_STRING(Handle);
1916 	return result;
1917 }
1918 
Java_org_codeworker_jni_Runtime_log(JNIEnv * pEnv,jclass,jdouble jX)1919 JNIEXPORT jdouble JNICALL Java_org_codeworker_jni_Runtime_log(JNIEnv *pEnv, jclass, jdouble jX) {
1920 	jdouble result;
1921 	double dX;
1922 	dX = jX;
1923 	double cppResult = CodeWorker::CGRuntime::log(dX);
1924 	result = cppResult;
1925 	return result;
1926 }
1927 
Java_org_codeworker_jni_Runtime_longToBytes(JNIEnv * pEnv,jclass,jlong jLong)1928 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_longToBytes(JNIEnv *pEnv, jclass, jlong jLong) {
1929 	jstring result;
1930 	unsigned long ulLong;
1931 	ulLong = (unsigned long) jLong;
1932 	std::string cppResult = CodeWorker::CGRuntime::longToBytes(ulLong);
1933 	result = pEnv->NewStringUTF(cppResult.c_str());
1934 	return result;
1935 }
1936 
Java_org_codeworker_jni_Runtime_midString(JNIEnv * pEnv,jclass,jstring jText,jint jPos,jint jLength)1937 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_midString(JNIEnv *pEnv, jclass, jstring jText, jint jPos, jint jLength) {
1938 	jstring result;
1939 	std::string sText;
1940 	GET_STRING(Text);
1941 	sText = tcText;
1942 	int iPos;
1943 	iPos = jPos;
1944 	int iLength;
1945 	iLength = jLength;
1946 	std::string cppResult = CodeWorker::CGRuntime::midString(sText, iPos, iLength);
1947 	result = pEnv->NewStringUTF(cppResult.c_str());
1948 	RELEASE_STRING(Text);
1949 	return result;
1950 }
1951 
Java_org_codeworker_jni_Runtime_mod(JNIEnv * pEnv,jclass,jint jDividend,jint jDivisor)1952 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_mod(JNIEnv *pEnv, jclass, jint jDividend, jint jDivisor) {
1953 	jint result;
1954 	int iDividend;
1955 	iDividend = jDividend;
1956 	int iDivisor;
1957 	iDivisor = jDivisor;
1958 	int cppResult = CodeWorker::CGRuntime::mod(iDividend, iDivisor);
1959 	result = cppResult;
1960 	return result;
1961 }
1962 
Java_org_codeworker_jni_Runtime_mult(JNIEnv * pEnv,jclass,jdouble jLeft,jdouble jRight)1963 JNIEXPORT jdouble JNICALL Java_org_codeworker_jni_Runtime_mult(JNIEnv *pEnv, jclass, jdouble jLeft, jdouble jRight) {
1964 	jdouble result;
1965 	double dLeft;
1966 	dLeft = jLeft;
1967 	double dRight;
1968 	dRight = jRight;
1969 	double cppResult = CodeWorker::CGRuntime::mult(dLeft, dRight);
1970 	result = cppResult;
1971 	return result;
1972 }
1973 
Java_org_codeworker_jni_Runtime_networkLongToHost(JNIEnv * pEnv,jclass,jstring jBytes)1974 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_networkLongToHost(JNIEnv *pEnv, jclass, jstring jBytes) {
1975 	jstring result;
1976 	std::string sBytes;
1977 	GET_STRING(Bytes);
1978 	sBytes = tcBytes;
1979 	std::string cppResult = CodeWorker::CGRuntime::networkLongToHost(sBytes);
1980 	result = pEnv->NewStringUTF(cppResult.c_str());
1981 	RELEASE_STRING(Bytes);
1982 	return result;
1983 }
1984 
Java_org_codeworker_jni_Runtime_networkShortToHost(JNIEnv * pEnv,jclass,jstring jBytes)1985 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_networkShortToHost(JNIEnv *pEnv, jclass, jstring jBytes) {
1986 	jstring result;
1987 	std::string sBytes;
1988 	GET_STRING(Bytes);
1989 	sBytes = tcBytes;
1990 	std::string cppResult = CodeWorker::CGRuntime::networkShortToHost(sBytes);
1991 	result = pEnv->NewStringUTF(cppResult.c_str());
1992 	RELEASE_STRING(Bytes);
1993 	return result;
1994 }
1995 
Java_org_codeworker_jni_Runtime_octalToDecimal(JNIEnv * pEnv,jclass,jstring jOctalNumber)1996 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_octalToDecimal(JNIEnv *pEnv, jclass, jstring jOctalNumber) {
1997 	jint result;
1998 	std::string sOctalNumber;
1999 	GET_STRING(OctalNumber);
2000 	sOctalNumber = tcOctalNumber;
2001 	int cppResult = CodeWorker::CGRuntime::octalToDecimal(sOctalNumber);
2002 	result = cppResult;
2003 	RELEASE_STRING(OctalNumber);
2004 	return result;
2005 }
2006 
Java_org_codeworker_jni_Runtime_pathFromPackage(JNIEnv * pEnv,jclass,jstring jPackage)2007 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_pathFromPackage(JNIEnv *pEnv, jclass, jstring jPackage) {
2008 	jstring result;
2009 	std::string sPackage;
2010 	GET_STRING(Package);
2011 	sPackage = tcPackage;
2012 	std::string cppResult = CodeWorker::CGRuntime::pathFromPackage(sPackage);
2013 	result = pEnv->NewStringUTF(cppResult.c_str());
2014 	RELEASE_STRING(Package);
2015 	return result;
2016 }
2017 
Java_org_codeworker_jni_Runtime_postHTTPRequest(JNIEnv * pEnv,jclass,jstring jURL,jobject jHTTPSession,jobject jArguments)2018 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_postHTTPRequest(JNIEnv *pEnv, jclass, jstring jURL, jobject jHTTPSession, jobject jArguments) {
2019 	jstring result;
2020 	std::string sURL;
2021 	GET_STRING(URL);
2022 	sURL = tcURL;
2023 	CodeWorker::DtaScriptVariable* pHTTPSession;
2024 	GET_PARSETREE_HANDLE(HTTPSession);
2025 	pHTTPSession = pHTTPSessionInstance;
2026 	CodeWorker::DtaScriptVariable* pArguments;
2027 	GET_PARSETREE_HANDLE(Arguments);
2028 	pArguments = pArgumentsInstance;
2029 	std::string cppResult = CodeWorker::CGRuntime::postHTTPRequest(sURL, pHTTPSession, pArguments);
2030 	result = pEnv->NewStringUTF(cppResult.c_str());
2031 	RELEASE_STRING(URL);
2032 	return result;
2033 }
2034 
Java_org_codeworker_jni_Runtime_pow(JNIEnv * pEnv,jclass,jdouble jX,jdouble jY)2035 JNIEXPORT jdouble JNICALL Java_org_codeworker_jni_Runtime_pow(JNIEnv *pEnv, jclass, jdouble jX, jdouble jY) {
2036 	jdouble result;
2037 	double dX;
2038 	dX = jX;
2039 	double dY;
2040 	dY = jY;
2041 	double cppResult = CodeWorker::CGRuntime::pow(dX, dY);
2042 	result = cppResult;
2043 	return result;
2044 }
2045 
Java_org_codeworker_jni_Runtime_randomInteger(JNIEnv * pEnv,jclass)2046 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_randomInteger(JNIEnv *pEnv, jclass) {
2047 	jint result;
2048 	int cppResult = CodeWorker::CGRuntime::randomInteger();
2049 	result = cppResult;
2050 	return result;
2051 }
2052 
Java_org_codeworker_jni_Runtime_receiveBinaryFromSocket(JNIEnv * pEnv,jclass,jint jSocket,jint jLength)2053 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_receiveBinaryFromSocket(JNIEnv *pEnv, jclass, jint jSocket, jint jLength) {
2054 	jstring result;
2055 	int iSocket;
2056 	iSocket = jSocket;
2057 	int iLength;
2058 	iLength = jLength;
2059 	std::string cppResult = CodeWorker::CGRuntime::receiveBinaryFromSocket(iSocket, iLength);
2060 	result = pEnv->NewStringUTF(cppResult.c_str());
2061 	return result;
2062 }
2063 
Java_org_codeworker_jni_Runtime_receiveFromSocket(JNIEnv * pEnv,jclass,jint jSocket,jobject jIsText)2064 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_receiveFromSocket(JNIEnv *pEnv, jclass, jint jSocket, jobject jIsText) {
2065 	jstring result;
2066 	int iSocket;
2067 	iSocket = jSocket;
2068 	bool bIsText;
2069 	// NOT HANDLED YET!
2070 	std::string cppResult = CodeWorker::CGRuntime::receiveFromSocket(iSocket, bIsText);
2071 	result = pEnv->NewStringUTF(cppResult.c_str());
2072 	return result;
2073 }
2074 
Java_org_codeworker_jni_Runtime_receiveTextFromSocket(JNIEnv * pEnv,jclass,jint jSocket,jint jLength)2075 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_receiveTextFromSocket(JNIEnv *pEnv, jclass, jint jSocket, jint jLength) {
2076 	jstring result;
2077 	int iSocket;
2078 	iSocket = jSocket;
2079 	int iLength;
2080 	iLength = jLength;
2081 	std::string cppResult = CodeWorker::CGRuntime::receiveTextFromSocket(iSocket, iLength);
2082 	result = pEnv->NewStringUTF(cppResult.c_str());
2083 	return result;
2084 }
2085 
Java_org_codeworker_jni_Runtime_relativePath(JNIEnv * pEnv,jclass,jstring jPath,jstring jReference)2086 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_relativePath(JNIEnv *pEnv, jclass, jstring jPath, jstring jReference) {
2087 	jstring result;
2088 	std::string sPath;
2089 	GET_STRING(Path);
2090 	sPath = tcPath;
2091 	std::string sReference;
2092 	GET_STRING(Reference);
2093 	sReference = tcReference;
2094 	std::string cppResult = CodeWorker::CGRuntime::relativePath(sPath, sReference);
2095 	result = pEnv->NewStringUTF(cppResult.c_str());
2096 	RELEASE_STRING(Reference);
2097 	RELEASE_STRING(Path);
2098 	return result;
2099 }
2100 
Java_org_codeworker_jni_Runtime_removeDirectory(JNIEnv * pEnv,jclass,jstring jPath)2101 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_removeDirectory(JNIEnv *pEnv, jclass, jstring jPath) {
2102 	jboolean result;
2103 	std::string sPath;
2104 	GET_STRING(Path);
2105 	sPath = tcPath;
2106 	bool cppResult = CodeWorker::CGRuntime::removeDirectory(sPath);
2107 	result = cppResult;
2108 	RELEASE_STRING(Path);
2109 	return result;
2110 }
2111 
Java_org_codeworker_jni_Runtime_removeGenerationTagsHandler(JNIEnv * pEnv,jclass,jstring jKey)2112 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_removeGenerationTagsHandler(JNIEnv *pEnv, jclass, jstring jKey) {
2113 	jboolean result;
2114 	std::string sKey;
2115 	GET_STRING(Key);
2116 	sKey = tcKey;
2117 	bool cppResult = CodeWorker::CGRuntime::removeGenerationTagsHandler(sKey);
2118 	result = cppResult;
2119 	RELEASE_STRING(Key);
2120 	return result;
2121 }
2122 
Java_org_codeworker_jni_Runtime_repeatString(JNIEnv * pEnv,jclass,jstring jText,jint jOccurrences)2123 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_repeatString(JNIEnv *pEnv, jclass, jstring jText, jint jOccurrences) {
2124 	jstring result;
2125 	std::string sText;
2126 	GET_STRING(Text);
2127 	sText = tcText;
2128 	int iOccurrences;
2129 	iOccurrences = jOccurrences;
2130 	std::string cppResult = CodeWorker::CGRuntime::repeatString(sText, iOccurrences);
2131 	result = pEnv->NewStringUTF(cppResult.c_str());
2132 	RELEASE_STRING(Text);
2133 	return result;
2134 }
2135 
Java_org_codeworker_jni_Runtime_replaceString(JNIEnv * pEnv,jclass,jstring jOld,jstring jNew,jstring jText)2136 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_replaceString(JNIEnv *pEnv, jclass, jstring jOld, jstring jNew, jstring jText) {
2137 	jstring result;
2138 	std::string sOld;
2139 	GET_STRING(Old);
2140 	sOld = tcOld;
2141 	std::string sNew;
2142 	GET_STRING(New);
2143 	sNew = tcNew;
2144 	std::string sText;
2145 	GET_STRING(Text);
2146 	sText = tcText;
2147 	std::string cppResult = CodeWorker::CGRuntime::replaceString(sOld, sNew, sText);
2148 	result = pEnv->NewStringUTF(cppResult.c_str());
2149 	RELEASE_STRING(Text);
2150 	RELEASE_STRING(New);
2151 	RELEASE_STRING(Old);
2152 	return result;
2153 }
2154 
Java_org_codeworker_jni_Runtime_replaceTabulations(JNIEnv * pEnv,jclass,jstring jText,jint jTab)2155 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_replaceTabulations(JNIEnv *pEnv, jclass, jstring jText, jint jTab) {
2156 	jstring result;
2157 	std::string sText;
2158 	GET_STRING(Text);
2159 	sText = tcText;
2160 	int iTab;
2161 	iTab = jTab;
2162 	std::string cppResult = CodeWorker::CGRuntime::replaceTabulations(sText, iTab);
2163 	result = pEnv->NewStringUTF(cppResult.c_str());
2164 	RELEASE_STRING(Text);
2165 	return result;
2166 }
2167 
Java_org_codeworker_jni_Runtime_resolveFilePath(JNIEnv * pEnv,jclass,jstring jFilename)2168 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_resolveFilePath(JNIEnv *pEnv, jclass, jstring jFilename) {
2169 	jstring result;
2170 	std::string sFilename;
2171 	GET_STRING(Filename);
2172 	sFilename = tcFilename;
2173 	std::string cppResult = CodeWorker::CGRuntime::resolveFilePath(sFilename);
2174 	result = pEnv->NewStringUTF(cppResult.c_str());
2175 	RELEASE_STRING(Filename);
2176 	return result;
2177 }
2178 
Java_org_codeworker_jni_Runtime_rightString(JNIEnv * pEnv,jclass,jstring jText,jint jLength)2179 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_rightString(JNIEnv *pEnv, jclass, jstring jText, jint jLength) {
2180 	jstring result;
2181 	std::string sText;
2182 	GET_STRING(Text);
2183 	sText = tcText;
2184 	int iLength;
2185 	iLength = jLength;
2186 	std::string cppResult = CodeWorker::CGRuntime::rightString(sText, iLength);
2187 	result = pEnv->NewStringUTF(cppResult.c_str());
2188 	RELEASE_STRING(Text);
2189 	return result;
2190 }
2191 
Java_org_codeworker_jni_Runtime_rsubString(JNIEnv * pEnv,jclass,jstring jText,jint jPos)2192 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_rsubString(JNIEnv *pEnv, jclass, jstring jText, jint jPos) {
2193 	jstring result;
2194 	std::string sText;
2195 	GET_STRING(Text);
2196 	sText = tcText;
2197 	int iPos;
2198 	iPos = jPos;
2199 	std::string cppResult = CodeWorker::CGRuntime::rsubString(sText, iPos);
2200 	result = pEnv->NewStringUTF(cppResult.c_str());
2201 	RELEASE_STRING(Text);
2202 	return result;
2203 }
2204 
Java_org_codeworker_jni_Runtime_scanDirectories(JNIEnv * pEnv,jclass,jobject jDirectory,jstring jPath,jstring jPattern)2205 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_scanDirectories(JNIEnv *pEnv, jclass, jobject jDirectory, jstring jPath, jstring jPattern) {
2206 	jboolean result;
2207 	CodeWorker::DtaScriptVariable* pDirectory;
2208 	GET_PARSETREE_HANDLE(Directory);
2209 	pDirectory = pDirectoryInstance;
2210 	std::string sPath;
2211 	GET_STRING(Path);
2212 	sPath = tcPath;
2213 	std::string sPattern;
2214 	GET_STRING(Pattern);
2215 	sPattern = tcPattern;
2216 	bool cppResult = CodeWorker::CGRuntime::scanDirectories(pDirectory, sPath, sPattern);
2217 	result = cppResult;
2218 	RELEASE_STRING(Pattern);
2219 	RELEASE_STRING(Path);
2220 	return result;
2221 }
2222 
Java_org_codeworker_jni_Runtime_scanFiles(JNIEnv * pEnv,jclass,jobject jFiles,jstring jPath,jstring jPattern,jboolean jSubfolders)2223 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_scanFiles(JNIEnv *pEnv, jclass, jobject jFiles, jstring jPath, jstring jPattern, jboolean jSubfolders) {
2224 	jboolean result;
2225 	CodeWorker::DtaScriptVariable* pFiles;
2226 	GET_PARSETREE_HANDLE(Files);
2227 	pFiles = pFilesInstance;
2228 	std::string sPath;
2229 	GET_STRING(Path);
2230 	sPath = tcPath;
2231 	std::string sPattern;
2232 	GET_STRING(Pattern);
2233 	sPattern = tcPattern;
2234 	bool bSubfolders;
2235 	bSubfolders = (jSubfolders != '\0');
2236 	bool cppResult = CodeWorker::CGRuntime::scanFiles(pFiles, sPath, sPattern, bSubfolders);
2237 	result = cppResult;
2238 	RELEASE_STRING(Pattern);
2239 	RELEASE_STRING(Path);
2240 	return result;
2241 }
2242 
Java_org_codeworker_jni_Runtime_sendBinaryToSocket(JNIEnv * pEnv,jclass,jint jSocket,jstring jBytes)2243 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_sendBinaryToSocket(JNIEnv *pEnv, jclass, jint jSocket, jstring jBytes) {
2244 	jboolean result;
2245 	int iSocket;
2246 	iSocket = jSocket;
2247 	std::string sBytes;
2248 	GET_STRING(Bytes);
2249 	sBytes = tcBytes;
2250 	bool cppResult = CodeWorker::CGRuntime::sendBinaryToSocket(iSocket, sBytes);
2251 	result = cppResult;
2252 	RELEASE_STRING(Bytes);
2253 	return result;
2254 }
2255 
Java_org_codeworker_jni_Runtime_sendHTTPRequest(JNIEnv * pEnv,jclass,jstring jURL,jobject jHTTPSession)2256 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_sendHTTPRequest(JNIEnv *pEnv, jclass, jstring jURL, jobject jHTTPSession) {
2257 	jstring result;
2258 	std::string sURL;
2259 	GET_STRING(URL);
2260 	sURL = tcURL;
2261 	CodeWorker::DtaScriptVariable* pHTTPSession;
2262 	GET_PARSETREE_HANDLE(HTTPSession);
2263 	pHTTPSession = pHTTPSessionInstance;
2264 	std::string cppResult = CodeWorker::CGRuntime::sendHTTPRequest(sURL, pHTTPSession);
2265 	result = pEnv->NewStringUTF(cppResult.c_str());
2266 	RELEASE_STRING(URL);
2267 	return result;
2268 }
2269 
Java_org_codeworker_jni_Runtime_sendTextToSocket(JNIEnv * pEnv,jclass,jint jSocket,jstring jText)2270 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_sendTextToSocket(JNIEnv *pEnv, jclass, jint jSocket, jstring jText) {
2271 	jboolean result;
2272 	int iSocket;
2273 	iSocket = jSocket;
2274 	std::string sText;
2275 	GET_STRING(Text);
2276 	sText = tcText;
2277 	bool cppResult = CodeWorker::CGRuntime::sendTextToSocket(iSocket, sText);
2278 	result = cppResult;
2279 	RELEASE_STRING(Text);
2280 	return result;
2281 }
2282 
Java_org_codeworker_jni_Runtime_selectGenerationTagsHandler(JNIEnv * pEnv,jclass,jstring jKey)2283 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_selectGenerationTagsHandler(JNIEnv *pEnv, jclass, jstring jKey) {
2284 	jboolean result;
2285 	std::string sKey;
2286 	GET_STRING(Key);
2287 	sKey = tcKey;
2288 	bool cppResult = CodeWorker::CGRuntime::selectGenerationTagsHandler(sKey);
2289 	result = cppResult;
2290 	RELEASE_STRING(Key);
2291 	return result;
2292 }
2293 
Java_org_codeworker_jni_Runtime_shortToBytes(JNIEnv * pEnv,jclass,jshort jShort)2294 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_shortToBytes(JNIEnv *pEnv, jclass, jshort jShort) {
2295 	jstring result;
2296 	unsigned short ulShort;
2297 	ulShort = (unsigned short) jShort;
2298 	std::string cppResult = CodeWorker::CGRuntime::shortToBytes(ulShort);
2299 	result = pEnv->NewStringUTF(cppResult.c_str());
2300 	return result;
2301 }
2302 
Java_org_codeworker_jni_Runtime_sqrt(JNIEnv * pEnv,jclass,jdouble jX)2303 JNIEXPORT jdouble JNICALL Java_org_codeworker_jni_Runtime_sqrt(JNIEnv *pEnv, jclass, jdouble jX) {
2304 	jdouble result;
2305 	double dX;
2306 	dX = jX;
2307 	double cppResult = CodeWorker::CGRuntime::sqrt(dX);
2308 	result = cppResult;
2309 	return result;
2310 }
2311 
Java_org_codeworker_jni_Runtime_startString(JNIEnv * pEnv,jclass,jstring jText,jstring jStart)2312 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_startString(JNIEnv *pEnv, jclass, jstring jText, jstring jStart) {
2313 	jboolean result;
2314 	std::string sText;
2315 	GET_STRING(Text);
2316 	sText = tcText;
2317 	std::string sStart;
2318 	GET_STRING(Start);
2319 	sStart = tcStart;
2320 	bool cppResult = CodeWorker::CGRuntime::startString(sText, sStart);
2321 	result = cppResult;
2322 	RELEASE_STRING(Start);
2323 	RELEASE_STRING(Text);
2324 	return result;
2325 }
2326 
Java_org_codeworker_jni_Runtime_sub(JNIEnv * pEnv,jclass,jdouble jLeft,jdouble jRight)2327 JNIEXPORT jdouble JNICALL Java_org_codeworker_jni_Runtime_sub(JNIEnv *pEnv, jclass, jdouble jLeft, jdouble jRight) {
2328 	jdouble result;
2329 	double dLeft;
2330 	dLeft = jLeft;
2331 	double dRight;
2332 	dRight = jRight;
2333 	double cppResult = CodeWorker::CGRuntime::sub(dLeft, dRight);
2334 	result = cppResult;
2335 	return result;
2336 }
2337 
Java_org_codeworker_jni_Runtime_subString(JNIEnv * pEnv,jclass,jstring jText,jint jPos)2338 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_subString(JNIEnv *pEnv, jclass, jstring jText, jint jPos) {
2339 	jstring result;
2340 	std::string sText;
2341 	GET_STRING(Text);
2342 	sText = tcText;
2343 	int iPos;
2344 	iPos = jPos;
2345 	std::string cppResult = CodeWorker::CGRuntime::subString(sText, iPos);
2346 	result = pEnv->NewStringUTF(cppResult.c_str());
2347 	RELEASE_STRING(Text);
2348 	return result;
2349 }
2350 
Java_org_codeworker_jni_Runtime_sup(JNIEnv * pEnv,jclass,jdouble jLeft,jdouble jRight)2351 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_sup(JNIEnv *pEnv, jclass, jdouble jLeft, jdouble jRight) {
2352 	jboolean result;
2353 	double dLeft;
2354 	dLeft = jLeft;
2355 	double dRight;
2356 	dRight = jRight;
2357 	bool cppResult = CodeWorker::CGRuntime::sup(dLeft, dRight);
2358 	result = cppResult;
2359 	return result;
2360 }
2361 
Java_org_codeworker_jni_Runtime_system(JNIEnv * pEnv,jclass,jstring jCommand)2362 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_system(JNIEnv *pEnv, jclass, jstring jCommand) {
2363 	jstring result;
2364 	std::string sCommand;
2365 	GET_STRING(Command);
2366 	sCommand = tcCommand;
2367 	std::string cppResult = CodeWorker::CGRuntime::system(sCommand);
2368 	result = pEnv->NewStringUTF(cppResult.c_str());
2369 	RELEASE_STRING(Command);
2370 	return result;
2371 }
2372 
Java_org_codeworker_jni_Runtime_toLowerString(JNIEnv * pEnv,jclass,jstring jText)2373 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_toLowerString(JNIEnv *pEnv, jclass, jstring jText) {
2374 	jstring result;
2375 	std::string sText;
2376 	GET_STRING(Text);
2377 	sText = tcText;
2378 	std::string cppResult = CodeWorker::CGRuntime::toLowerString(sText);
2379 	result = pEnv->NewStringUTF(cppResult.c_str());
2380 	RELEASE_STRING(Text);
2381 	return result;
2382 }
2383 
Java_org_codeworker_jni_Runtime_toUpperString(JNIEnv * pEnv,jclass,jstring jText)2384 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_toUpperString(JNIEnv *pEnv, jclass, jstring jText) {
2385 	jstring result;
2386 	std::string sText;
2387 	GET_STRING(Text);
2388 	sText = tcText;
2389 	std::string cppResult = CodeWorker::CGRuntime::toUpperString(sText);
2390 	result = pEnv->NewStringUTF(cppResult.c_str());
2391 	RELEASE_STRING(Text);
2392 	return result;
2393 }
2394 
Java_org_codeworker_jni_Runtime_trimLeft(JNIEnv * pEnv,jclass,jobject jString)2395 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_trimLeft(JNIEnv *pEnv, jclass, jobject jString) {
2396 	jint result;
2397 	std::string sString;
2398 	// NOT HANDLED YET!
2399 	int cppResult = CodeWorker::CGRuntime::trimLeft(sString);
2400 	result = cppResult;
2401 	return result;
2402 }
2403 
Java_org_codeworker_jni_Runtime_trimRight(JNIEnv * pEnv,jclass,jobject jString)2404 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_trimRight(JNIEnv *pEnv, jclass, jobject jString) {
2405 	jint result;
2406 	std::string sString;
2407 	// NOT HANDLED YET!
2408 	int cppResult = CodeWorker::CGRuntime::trimRight(sString);
2409 	result = cppResult;
2410 	return result;
2411 }
2412 
Java_org_codeworker_jni_Runtime_trim(JNIEnv * pEnv,jclass,jobject jString)2413 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_trim(JNIEnv *pEnv, jclass, jobject jString) {
2414 	jint result;
2415 	std::string sString;
2416 	// NOT HANDLED YET!
2417 	int cppResult = CodeWorker::CGRuntime::trim(sString);
2418 	result = cppResult;
2419 	return result;
2420 }
2421 
Java_org_codeworker_jni_Runtime_truncateAfterString(JNIEnv * pEnv,jclass,jobject jVariable,jstring jText)2422 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_truncateAfterString(JNIEnv *pEnv, jclass, jobject jVariable, jstring jText) {
2423 	jstring result;
2424 	CodeWorker::DtaScriptVariable* pVariable;
2425 	GET_PARSETREE_HANDLE(Variable);
2426 	pVariable = pVariableInstance;
2427 	std::string sText;
2428 	GET_STRING(Text);
2429 	sText = tcText;
2430 	std::string cppResult = CodeWorker::CGRuntime::truncateAfterString(pVariable, sText);
2431 	result = pEnv->NewStringUTF(cppResult.c_str());
2432 	RELEASE_STRING(Text);
2433 	return result;
2434 }
2435 
Java_org_codeworker_jni_Runtime_truncateBeforeString(JNIEnv * pEnv,jclass,jobject jVariable,jstring jText)2436 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_truncateBeforeString(JNIEnv *pEnv, jclass, jobject jVariable, jstring jText) {
2437 	jstring result;
2438 	CodeWorker::DtaScriptVariable* pVariable;
2439 	GET_PARSETREE_HANDLE(Variable);
2440 	pVariable = pVariableInstance;
2441 	std::string sText;
2442 	GET_STRING(Text);
2443 	sText = tcText;
2444 	std::string cppResult = CodeWorker::CGRuntime::truncateBeforeString(pVariable, sText);
2445 	result = pEnv->NewStringUTF(cppResult.c_str());
2446 	RELEASE_STRING(Text);
2447 	return result;
2448 }
2449 
Java_org_codeworker_jni_Runtime_UUID(JNIEnv * pEnv,jclass)2450 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_UUID(JNIEnv *pEnv, jclass) {
2451 	jstring result;
2452 	std::string cppResult = CodeWorker::CGRuntime::UUID();
2453 	result = pEnv->NewStringUTF(cppResult.c_str());
2454 	return result;
2455 }
2456 
Java_org_codeworker_jni_Runtime_countInputCols(JNIEnv * pEnv,jclass)2457 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_countInputCols(JNIEnv *pEnv, jclass) {
2458 	jint result;
2459 	int cppResult = CodeWorker::CGRuntime::countInputCols();
2460 	result = cppResult;
2461 	return result;
2462 }
2463 
Java_org_codeworker_jni_Runtime_countInputLines(JNIEnv * pEnv,jclass)2464 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_countInputLines(JNIEnv *pEnv, jclass) {
2465 	jint result;
2466 	int cppResult = CodeWorker::CGRuntime::countInputLines();
2467 	result = cppResult;
2468 	return result;
2469 }
2470 
Java_org_codeworker_jni_Runtime_getInputFilename(JNIEnv * pEnv,jclass)2471 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getInputFilename(JNIEnv *pEnv, jclass) {
2472 	jstring result;
2473 	std::string cppResult = CodeWorker::CGRuntime::getInputFilename();
2474 	result = pEnv->NewStringUTF(cppResult.c_str());
2475 	return result;
2476 }
2477 
Java_org_codeworker_jni_Runtime_getLastReadChars(JNIEnv * pEnv,jclass,jint jLength)2478 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getLastReadChars(JNIEnv *pEnv, jclass, jint jLength) {
2479 	jstring result;
2480 	int iLength;
2481 	iLength = jLength;
2482 	std::string cppResult = CodeWorker::CGRuntime::getLastReadChars(iLength);
2483 	result = pEnv->NewStringUTF(cppResult.c_str());
2484 	return result;
2485 }
2486 
Java_org_codeworker_jni_Runtime_getInputLocation(JNIEnv * pEnv,jclass)2487 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_getInputLocation(JNIEnv *pEnv, jclass) {
2488 	jint result;
2489 	int cppResult = CodeWorker::CGRuntime::getInputLocation();
2490 	result = cppResult;
2491 	return result;
2492 }
2493 
Java_org_codeworker_jni_Runtime_lookAhead(JNIEnv * pEnv,jclass,jstring jText)2494 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_lookAhead(JNIEnv *pEnv, jclass, jstring jText) {
2495 	jboolean result;
2496 	std::string sText;
2497 	GET_STRING(Text);
2498 	sText = tcText;
2499 	bool cppResult = CodeWorker::CGRuntime::lookAhead(sText);
2500 	result = cppResult;
2501 	RELEASE_STRING(Text);
2502 	return result;
2503 }
2504 
Java_org_codeworker_jni_Runtime_peekChar(JNIEnv * pEnv,jclass)2505 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_peekChar(JNIEnv *pEnv, jclass) {
2506 	jstring result;
2507 	std::string cppResult = CodeWorker::CGRuntime::peekChar();
2508 	result = pEnv->NewStringUTF(cppResult.c_str());
2509 	return result;
2510 }
2511 
Java_org_codeworker_jni_Runtime_readAdaString(JNIEnv * pEnv,jclass,jobject jText)2512 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_readAdaString(JNIEnv *pEnv, jclass, jobject jText) {
2513 	jboolean result;
2514 	std::string sText;
2515 	// NOT HANDLED YET!
2516 	bool cppResult = CodeWorker::CGRuntime::readAdaString(sText);
2517 	result = cppResult;
2518 	return result;
2519 }
2520 
Java_org_codeworker_jni_Runtime_readByte(JNIEnv * pEnv,jclass)2521 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_readByte(JNIEnv *pEnv, jclass) {
2522 	jstring result;
2523 	std::string cppResult = CodeWorker::CGRuntime::readByte();
2524 	result = pEnv->NewStringUTF(cppResult.c_str());
2525 	return result;
2526 }
2527 
Java_org_codeworker_jni_Runtime_readBytes(JNIEnv * pEnv,jclass,jint jLength)2528 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_readBytes(JNIEnv *pEnv, jclass, jint jLength) {
2529 	jstring result;
2530 	int iLength;
2531 	iLength = jLength;
2532 	std::string cppResult = CodeWorker::CGRuntime::readBytes(iLength);
2533 	result = pEnv->NewStringUTF(cppResult.c_str());
2534 	return result;
2535 }
2536 
Java_org_codeworker_jni_Runtime_readCChar(JNIEnv * pEnv,jclass)2537 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_readCChar(JNIEnv *pEnv, jclass) {
2538 	jstring result;
2539 	std::string cppResult = CodeWorker::CGRuntime::readCChar();
2540 	result = pEnv->NewStringUTF(cppResult.c_str());
2541 	return result;
2542 }
2543 
Java_org_codeworker_jni_Runtime_readChar(JNIEnv * pEnv,jclass)2544 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_readChar(JNIEnv *pEnv, jclass) {
2545 	jstring result;
2546 	std::string cppResult = CodeWorker::CGRuntime::readChar();
2547 	result = pEnv->NewStringUTF(cppResult.c_str());
2548 	return result;
2549 }
2550 
Java_org_codeworker_jni_Runtime_readCharAsInt(JNIEnv * pEnv,jclass)2551 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_readCharAsInt(JNIEnv *pEnv, jclass) {
2552 	jint result;
2553 	int cppResult = CodeWorker::CGRuntime::readCharAsInt();
2554 	result = cppResult;
2555 	return result;
2556 }
2557 
Java_org_codeworker_jni_Runtime_readChars(JNIEnv * pEnv,jclass,jint jLength)2558 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_readChars(JNIEnv *pEnv, jclass, jint jLength) {
2559 	jstring result;
2560 	int iLength;
2561 	iLength = jLength;
2562 	std::string cppResult = CodeWorker::CGRuntime::readChars(iLength);
2563 	result = pEnv->NewStringUTF(cppResult.c_str());
2564 	return result;
2565 }
2566 
Java_org_codeworker_jni_Runtime_readIdentifier(JNIEnv * pEnv,jclass)2567 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_readIdentifier(JNIEnv *pEnv, jclass) {
2568 	jstring result;
2569 	std::string cppResult = CodeWorker::CGRuntime::readIdentifier();
2570 	result = pEnv->NewStringUTF(cppResult.c_str());
2571 	return result;
2572 }
2573 
Java_org_codeworker_jni_Runtime_readIfEqualTo(JNIEnv * pEnv,jclass,jstring jText)2574 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_readIfEqualTo(JNIEnv *pEnv, jclass, jstring jText) {
2575 	jboolean result;
2576 	std::string sText;
2577 	GET_STRING(Text);
2578 	sText = tcText;
2579 	bool cppResult = CodeWorker::CGRuntime::readIfEqualTo(sText);
2580 	result = cppResult;
2581 	RELEASE_STRING(Text);
2582 	return result;
2583 }
2584 
Java_org_codeworker_jni_Runtime_readIfEqualToIgnoreCase(JNIEnv * pEnv,jclass,jstring jText)2585 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_readIfEqualToIgnoreCase(JNIEnv *pEnv, jclass, jstring jText) {
2586 	jboolean result;
2587 	std::string sText;
2588 	GET_STRING(Text);
2589 	sText = tcText;
2590 	bool cppResult = CodeWorker::CGRuntime::readIfEqualToIgnoreCase(sText);
2591 	result = cppResult;
2592 	RELEASE_STRING(Text);
2593 	return result;
2594 }
2595 
Java_org_codeworker_jni_Runtime_readIfEqualToIdentifier(JNIEnv * pEnv,jclass,jstring jIdentifier)2596 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_readIfEqualToIdentifier(JNIEnv *pEnv, jclass, jstring jIdentifier) {
2597 	jboolean result;
2598 	std::string sIdentifier;
2599 	GET_STRING(Identifier);
2600 	sIdentifier = tcIdentifier;
2601 	bool cppResult = CodeWorker::CGRuntime::readIfEqualToIdentifier(sIdentifier);
2602 	result = cppResult;
2603 	RELEASE_STRING(Identifier);
2604 	return result;
2605 }
2606 
Java_org_codeworker_jni_Runtime_readLine(JNIEnv * pEnv,jclass,jobject jText)2607 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_readLine(JNIEnv *pEnv, jclass, jobject jText) {
2608 	jboolean result;
2609 	std::string sText;
2610 	// NOT HANDLED YET!
2611 	bool cppResult = CodeWorker::CGRuntime::readLine(sText);
2612 	result = cppResult;
2613 	return result;
2614 }
2615 
Java_org_codeworker_jni_Runtime_readNextText(JNIEnv * pEnv,jclass,jstring jText)2616 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_readNextText(JNIEnv *pEnv, jclass, jstring jText) {
2617 	jboolean result;
2618 	std::string sText;
2619 	GET_STRING(Text);
2620 	sText = tcText;
2621 	bool cppResult = CodeWorker::CGRuntime::readNextText(sText);
2622 	result = cppResult;
2623 	RELEASE_STRING(Text);
2624 	return result;
2625 }
2626 
Java_org_codeworker_jni_Runtime_readNumber(JNIEnv * pEnv,jclass,jobject jNumber)2627 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_readNumber(JNIEnv *pEnv, jclass, jobject jNumber) {
2628 	jboolean result;
2629 	double dNumber;
2630 	// NOT HANDLED YET!
2631 	bool cppResult = CodeWorker::CGRuntime::readNumber(dNumber);
2632 	result = cppResult;
2633 	return result;
2634 }
2635 
Java_org_codeworker_jni_Runtime_readPythonString(JNIEnv * pEnv,jclass,jobject jText)2636 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_readPythonString(JNIEnv *pEnv, jclass, jobject jText) {
2637 	jboolean result;
2638 	std::string sText;
2639 	// NOT HANDLED YET!
2640 	bool cppResult = CodeWorker::CGRuntime::readPythonString(sText);
2641 	result = cppResult;
2642 	return result;
2643 }
2644 
Java_org_codeworker_jni_Runtime_readString(JNIEnv * pEnv,jclass,jobject jText)2645 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_readString(JNIEnv *pEnv, jclass, jobject jText) {
2646 	jboolean result;
2647 	std::string sText;
2648 	// NOT HANDLED YET!
2649 	bool cppResult = CodeWorker::CGRuntime::readString(sText);
2650 	result = cppResult;
2651 	return result;
2652 }
2653 
Java_org_codeworker_jni_Runtime_readUptoJustOneChar(JNIEnv * pEnv,jclass,jstring jOneAmongChars)2654 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_readUptoJustOneChar(JNIEnv *pEnv, jclass, jstring jOneAmongChars) {
2655 	jstring result;
2656 	std::string sOneAmongChars;
2657 	GET_STRING(OneAmongChars);
2658 	sOneAmongChars = tcOneAmongChars;
2659 	std::string cppResult = CodeWorker::CGRuntime::readUptoJustOneChar(sOneAmongChars);
2660 	result = pEnv->NewStringUTF(cppResult.c_str());
2661 	RELEASE_STRING(OneAmongChars);
2662 	return result;
2663 }
2664 
Java_org_codeworker_jni_Runtime_readWord(JNIEnv * pEnv,jclass)2665 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_readWord(JNIEnv *pEnv, jclass) {
2666 	jstring result;
2667 	std::string cppResult = CodeWorker::CGRuntime::readWord();
2668 	result = pEnv->NewStringUTF(cppResult.c_str());
2669 	return result;
2670 }
2671 
Java_org_codeworker_jni_Runtime_skipBlanks(JNIEnv * pEnv,jclass)2672 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_skipBlanks(JNIEnv *pEnv, jclass) {
2673 	jboolean result;
2674 	bool cppResult = CodeWorker::CGRuntime::skipBlanks();
2675 	result = cppResult;
2676 	return result;
2677 }
2678 
Java_org_codeworker_jni_Runtime_skipSpaces(JNIEnv * pEnv,jclass)2679 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_skipSpaces(JNIEnv *pEnv, jclass) {
2680 	jboolean result;
2681 	bool cppResult = CodeWorker::CGRuntime::skipSpaces();
2682 	result = cppResult;
2683 	return result;
2684 }
2685 
Java_org_codeworker_jni_Runtime_skipEmptyCpp(JNIEnv * pEnv,jclass)2686 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_skipEmptyCpp(JNIEnv *pEnv, jclass) {
2687 	jboolean result;
2688 	bool cppResult = CodeWorker::CGRuntime::skipEmptyCpp();
2689 	result = cppResult;
2690 	return result;
2691 }
2692 
Java_org_codeworker_jni_Runtime_skipEmptyCppExceptDoxygen(JNIEnv * pEnv,jclass)2693 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_skipEmptyCppExceptDoxygen(JNIEnv *pEnv, jclass) {
2694 	jboolean result;
2695 	bool cppResult = CodeWorker::CGRuntime::skipEmptyCppExceptDoxygen();
2696 	result = cppResult;
2697 	return result;
2698 }
2699 
Java_org_codeworker_jni_Runtime_skipEmptyHTML(JNIEnv * pEnv,jclass)2700 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_skipEmptyHTML(JNIEnv *pEnv, jclass) {
2701 	jboolean result;
2702 	bool cppResult = CodeWorker::CGRuntime::skipEmptyHTML();
2703 	result = cppResult;
2704 	return result;
2705 }
2706 
Java_org_codeworker_jni_Runtime_skipEmptyLaTeX(JNIEnv * pEnv,jclass)2707 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_skipEmptyLaTeX(JNIEnv *pEnv, jclass) {
2708 	jboolean result;
2709 	bool cppResult = CodeWorker::CGRuntime::skipEmptyLaTeX();
2710 	result = cppResult;
2711 	return result;
2712 }
2713 
Java_org_codeworker_jni_Runtime_countOutputCols(JNIEnv * pEnv,jclass)2714 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_countOutputCols(JNIEnv *pEnv, jclass) {
2715 	jint result;
2716 	int cppResult = CodeWorker::CGRuntime::countOutputCols();
2717 	result = cppResult;
2718 	return result;
2719 }
2720 
Java_org_codeworker_jni_Runtime_countOutputLines(JNIEnv * pEnv,jclass)2721 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_countOutputLines(JNIEnv *pEnv, jclass) {
2722 	jint result;
2723 	int cppResult = CodeWorker::CGRuntime::countOutputLines();
2724 	result = cppResult;
2725 	return result;
2726 }
2727 
Java_org_codeworker_jni_Runtime_decrementIndentLevel(JNIEnv * pEnv,jclass,jint jLevel)2728 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_decrementIndentLevel(JNIEnv *pEnv, jclass, jint jLevel) {
2729 	jboolean result;
2730 	int iLevel;
2731 	iLevel = jLevel;
2732 	bool cppResult = CodeWorker::CGRuntime::decrementIndentLevel(iLevel);
2733 	result = cppResult;
2734 	return result;
2735 }
2736 
Java_org_codeworker_jni_Runtime_equalLastWrittenChars(JNIEnv * pEnv,jclass,jstring jText)2737 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_equalLastWrittenChars(JNIEnv *pEnv, jclass, jstring jText) {
2738 	jboolean result;
2739 	std::string sText;
2740 	GET_STRING(Text);
2741 	sText = tcText;
2742 	bool cppResult = CodeWorker::CGRuntime::equalLastWrittenChars(sText);
2743 	result = cppResult;
2744 	RELEASE_STRING(Text);
2745 	return result;
2746 }
2747 
Java_org_codeworker_jni_Runtime_existFloatingLocation(JNIEnv * pEnv,jclass,jstring jKey,jboolean jParent)2748 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_existFloatingLocation(JNIEnv *pEnv, jclass, jstring jKey, jboolean jParent) {
2749 	jboolean result;
2750 	std::string sKey;
2751 	GET_STRING(Key);
2752 	sKey = tcKey;
2753 	bool bParent;
2754 	bParent = (jParent != '\0');
2755 	bool cppResult = CodeWorker::CGRuntime::existFloatingLocation(sKey, bParent);
2756 	result = cppResult;
2757 	RELEASE_STRING(Key);
2758 	return result;
2759 }
2760 
Java_org_codeworker_jni_Runtime_getFloatingLocation(JNIEnv * pEnv,jclass,jstring jKey)2761 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_getFloatingLocation(JNIEnv *pEnv, jclass, jstring jKey) {
2762 	jint result;
2763 	std::string sKey;
2764 	GET_STRING(Key);
2765 	sKey = tcKey;
2766 	int cppResult = CodeWorker::CGRuntime::getFloatingLocation(sKey);
2767 	result = cppResult;
2768 	RELEASE_STRING(Key);
2769 	return result;
2770 }
2771 
Java_org_codeworker_jni_Runtime_getLastWrittenChars(JNIEnv * pEnv,jclass,jint jNbChars)2772 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getLastWrittenChars(JNIEnv *pEnv, jclass, jint jNbChars) {
2773 	jstring result;
2774 	int iNbChars;
2775 	iNbChars = jNbChars;
2776 	std::string cppResult = CodeWorker::CGRuntime::getLastWrittenChars(iNbChars);
2777 	result = pEnv->NewStringUTF(cppResult.c_str());
2778 	return result;
2779 }
2780 
Java_org_codeworker_jni_Runtime_getMarkupKey(JNIEnv * pEnv,jclass)2781 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getMarkupKey(JNIEnv *pEnv, jclass) {
2782 	jstring result;
2783 	std::string cppResult = CodeWorker::CGRuntime::getMarkupKey();
2784 	result = pEnv->NewStringUTF(cppResult.c_str());
2785 	return result;
2786 }
2787 
Java_org_codeworker_jni_Runtime_getMarkupValue(JNIEnv * pEnv,jclass)2788 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getMarkupValue(JNIEnv *pEnv, jclass) {
2789 	jstring result;
2790 	std::string cppResult = CodeWorker::CGRuntime::getMarkupValue();
2791 	result = pEnv->NewStringUTF(cppResult.c_str());
2792 	return result;
2793 }
2794 
Java_org_codeworker_jni_Runtime_getOutputFilename(JNIEnv * pEnv,jclass)2795 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getOutputFilename(JNIEnv *pEnv, jclass) {
2796 	jstring result;
2797 	std::string cppResult = CodeWorker::CGRuntime::getOutputFilename();
2798 	result = pEnv->NewStringUTF(cppResult.c_str());
2799 	return result;
2800 }
2801 
Java_org_codeworker_jni_Runtime_getOutputLocation(JNIEnv * pEnv,jclass)2802 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_getOutputLocation(JNIEnv *pEnv, jclass) {
2803 	jint result;
2804 	int cppResult = CodeWorker::CGRuntime::getOutputLocation();
2805 	result = cppResult;
2806 	return result;
2807 }
2808 
Java_org_codeworker_jni_Runtime_getProtectedArea(JNIEnv * pEnv,jclass,jstring jProtection)2809 JNIEXPORT jstring JNICALL Java_org_codeworker_jni_Runtime_getProtectedArea(JNIEnv *pEnv, jclass, jstring jProtection) {
2810 	jstring result;
2811 	std::string sProtection;
2812 	GET_STRING(Protection);
2813 	sProtection = tcProtection;
2814 	std::string cppResult = CodeWorker::CGRuntime::getProtectedArea(sProtection);
2815 	result = pEnv->NewStringUTF(cppResult.c_str());
2816 	RELEASE_STRING(Protection);
2817 	return result;
2818 }
2819 
Java_org_codeworker_jni_Runtime_getProtectedAreaKeys(JNIEnv * pEnv,jclass,jobject jKeys)2820 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_getProtectedAreaKeys(JNIEnv *pEnv, jclass, jobject jKeys) {
2821 	jint result;
2822 	CodeWorker::DtaScriptVariable* pKeys;
2823 	GET_PARSETREE_HANDLE(Keys);
2824 	pKeys = pKeysInstance;
2825 	int cppResult = CodeWorker::CGRuntime::getProtectedAreaKeys(pKeys);
2826 	result = cppResult;
2827 	return result;
2828 }
2829 
Java_org_codeworker_jni_Runtime_indentText(JNIEnv * pEnv,jclass,jstring jMode)2830 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_indentText(JNIEnv *pEnv, jclass, jstring jMode) {
2831 	jboolean result;
2832 	std::string sMode;
2833 	GET_STRING(Mode);
2834 	sMode = tcMode;
2835 	bool cppResult = CodeWorker::CGRuntime::indentText(sMode);
2836 	result = cppResult;
2837 	RELEASE_STRING(Mode);
2838 	return result;
2839 }
2840 
Java_org_codeworker_jni_Runtime_newFloatingLocation(JNIEnv * pEnv,jclass,jstring jKey)2841 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_newFloatingLocation(JNIEnv *pEnv, jclass, jstring jKey) {
2842 	jboolean result;
2843 	std::string sKey;
2844 	GET_STRING(Key);
2845 	sKey = tcKey;
2846 	bool cppResult = CodeWorker::CGRuntime::newFloatingLocation(sKey);
2847 	result = cppResult;
2848 	RELEASE_STRING(Key);
2849 	return result;
2850 }
2851 
Java_org_codeworker_jni_Runtime_remainingProtectedAreas(JNIEnv * pEnv,jclass,jobject jKeys)2852 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_remainingProtectedAreas(JNIEnv *pEnv, jclass, jobject jKeys) {
2853 	jint result;
2854 	CodeWorker::DtaScriptVariable* pKeys;
2855 	GET_PARSETREE_HANDLE(Keys);
2856 	pKeys = pKeysInstance;
2857 	int cppResult = CodeWorker::CGRuntime::remainingProtectedAreas(pKeys);
2858 	result = cppResult;
2859 	return result;
2860 }
2861 
Java_org_codeworker_jni_Runtime_removeFloatingLocation(JNIEnv * pEnv,jclass,jstring jKey)2862 JNIEXPORT jint JNICALL Java_org_codeworker_jni_Runtime_removeFloatingLocation(JNIEnv *pEnv, jclass, jstring jKey) {
2863 	jint result;
2864 	std::string sKey;
2865 	GET_STRING(Key);
2866 	sKey = tcKey;
2867 	int cppResult = CodeWorker::CGRuntime::removeFloatingLocation(sKey);
2868 	result = cppResult;
2869 	RELEASE_STRING(Key);
2870 	return result;
2871 }
2872 
Java_org_codeworker_jni_Runtime_removeProtectedArea(JNIEnv * pEnv,jclass,jstring jProtectedAreaName)2873 JNIEXPORT jboolean JNICALL Java_org_codeworker_jni_Runtime_removeProtectedArea(JNIEnv *pEnv, jclass, jstring jProtectedAreaName) {
2874 	jboolean result;
2875 	std::string sProtectedAreaName;
2876 	GET_STRING(ProtectedAreaName);
2877 	sProtectedAreaName = tcProtectedAreaName;
2878 	bool cppResult = CodeWorker::CGRuntime::removeProtectedArea(sProtectedAreaName);
2879 	result = cppResult;
2880 	RELEASE_STRING(ProtectedAreaName);
2881 	return result;
2882 }
2883 
2884 //##end##"functions"
2885