Integration of OCCT 6.5.0 from SVN
[occt.git] / samples / java / drv / SampleGeometryJni / SampleGeometryJni_SampleGeometryPackage_java.cxx
1 //
2 //                     Copyright (C) 1991 - 2000 by  
3 //                      Matra Datavision SA.  All rights reserved.
4 //  
5 //                     Copyright (C) 2001 - 2004 by
6 //                     Open CASCADE SA.  All rights reserved.
7 // 
8 // This file is part of the Open CASCADE Technology software.
9 //
10 // This software may be distributed and/or modified under the terms and
11 // conditions of the Open CASCADE Public License as defined by Open CASCADE SA
12 // and appearing in the file LICENSE included in the packaging of this file.
13 //  
14 // This software is distributed on an "AS IS" basis, without warranty of any
15 // kind, and Open CASCADE SA hereby disclaims all such warranties,
16 // including without limitation, any warranties of merchantability, fitness
17 // for a particular purpose or non-infringement. Please see the License for
18 // the specific terms and conditions governing rights and limitations under the
19 // License.
20
21
22 #include <SampleGeometryJni_SampleGeometryPackage.h>
23 #include <SampleGeometryPackage.hxx>
24 #include <jcas.hxx>
25 #include <stdlib.h>
26 #include <Standard_ErrorHandler.hxx>
27 #include <Standard_Failure.hxx>
28 #include <Standard_SStream.hxx>
29
30 #include <V3d_Viewer.hxx>
31 #include <Standard_ExtString.hxx>
32 #include <V3d_View.hxx>
33 #include <Standard_Integer.hxx>
34 #include <V2d_Viewer.hxx>
35 #include <V2d_View.hxx>
36 #include <AIS_InteractiveContext.hxx>
37 #include <TCollection_AsciiString.hxx>
38 #include <ISession2D_InteractiveContext.hxx>
39 #include <Standard_Boolean.hxx>
40 #include <Standard_CString.hxx>
41
42
43 extern "C" {
44
45
46 JNIEXPORT jobject JNICALL Java_SampleGeometryJni_SampleGeometryPackage_CreateViewer3d (JNIEnv *env, jclass, jstring aName)
47 {
48 jobject thejret;
49
50 jcas_Locking alock(env);
51 {
52 try {
53 Standard_ExtString the_aName = jcas_ConvertToExtString(env,aName);
54 Handle(V3d_Viewer)* theret = new Handle(V3d_Viewer);
55 *theret = SampleGeometryPackage::CreateViewer3d(the_aName);
56 thejret = jcas_CreateObject(env,"CASCADESamplesJni/V3d_Viewer",theret);
57
58 }
59 catch (Standard_Failure) {
60   Standard_SStream Err;
61   Err <<   Standard_Failure::Caught(); 
62   Err << (char) 0;
63   jcas_ThrowException(env,Err.str().c_str());
64 }
65 }
66 alock.Release();
67 return thejret;
68 }
69
70
71
72 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_SetWindow3d (JNIEnv *env, jclass, jobject aView, jint hiwin, jint lowin)
73 {
74
75 jcas_Locking alock(env);
76 {
77 try {
78  Handle( V3d_View ) the_aView;
79  void*                ptr_aView = jcas_GetHandle(env,aView);
80  
81  if ( ptr_aView != NULL ) the_aView = *(   (  Handle( V3d_View )*  )ptr_aView   );
82
83 SampleGeometryPackage::SetWindow3d(the_aView,(Standard_Integer) hiwin,(Standard_Integer) lowin);
84
85 }
86 catch (Standard_Failure) {
87   Standard_SStream Err;
88   Err <<   Standard_Failure::Caught(); 
89   Err << (char) 0;
90   jcas_ThrowException(env,Err.str().c_str());
91 }
92 }
93 alock.Release();
94
95 }
96
97
98
99 JNIEXPORT jobject JNICALL Java_SampleGeometryJni_SampleGeometryPackage_CreateViewer2d (JNIEnv *env, jclass, jstring aName)
100 {
101 jobject thejret;
102
103 jcas_Locking alock(env);
104 {
105 try {
106 Standard_ExtString the_aName = jcas_ConvertToExtString(env,aName);
107 Handle(V2d_Viewer)* theret = new Handle(V2d_Viewer);
108 *theret = SampleGeometryPackage::CreateViewer2d(the_aName);
109 thejret = jcas_CreateObject(env,"CASCADESamplesJni/V2d_Viewer",theret);
110
111 }
112 catch (Standard_Failure) {
113   Standard_SStream Err;
114   Err <<   Standard_Failure::Caught(); 
115   Err << (char) 0;
116   jcas_ThrowException(env,Err.str().c_str());
117 }
118 }
119 alock.Release();
120 return thejret;
121 }
122
123
124
125 JNIEXPORT jobject JNICALL Java_SampleGeometryJni_SampleGeometryPackage_CreateView2d (JNIEnv *env, jclass, jobject aViewer, jint hiwin, jint lowin)
126 {
127 jobject thejret;
128
129 jcas_Locking alock(env);
130 {
131 try {
132  Handle( V2d_Viewer ) the_aViewer;
133  void*                ptr_aViewer = jcas_GetHandle(env,aViewer);
134  
135  if ( ptr_aViewer != NULL ) the_aViewer = *(   (  Handle( V2d_Viewer )*  )ptr_aViewer   );
136
137 Handle(V2d_View)* theret = new Handle(V2d_View);
138 *theret = SampleGeometryPackage::CreateView2d(the_aViewer,(Standard_Integer) hiwin,(Standard_Integer) lowin);
139 thejret = jcas_CreateObject(env,"CASCADESamplesJni/V2d_View",theret);
140
141 }
142 catch (Standard_Failure) {
143   Standard_SStream Err;
144   Err <<   Standard_Failure::Caught(); 
145   Err << (char) 0;
146   jcas_ThrowException(env,Err.str().c_str());
147 }
148 }
149 alock.Release();
150 return thejret;
151 }
152
153
154
155 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest1 (JNIEnv *env, jclass, jobject aContext, jobject Message)
156 {
157
158 jcas_Locking alock(env);
159 {
160 try {
161  Handle( AIS_InteractiveContext ) the_aContext;
162  void*                ptr_aContext = jcas_GetHandle(env,aContext);
163  
164  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
165
166 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
167 if ( the_Message == NULL ) {
168
169  // The following assumes availability of the default constructor (what may not
170  // always be the case). Therefore explicit exception is thrown if the null
171  // object has been passed.
172  // the_Message = new TCollection_AsciiString ();
173  // jcas_SetHandle ( env, Message, the_Message );
174  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
175
176 }  // end if
177 SampleGeometryPackage::gpTest1(the_aContext,*the_Message);
178
179 }
180 catch (Standard_Failure) {
181   Standard_SStream Err;
182   Err <<   Standard_Failure::Caught(); 
183   Err << (char) 0;
184   jcas_ThrowException(env,Err.str().c_str());
185 }
186 }
187 alock.Release();
188
189 }
190
191
192
193 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest2 (JNIEnv *env, jclass, jobject aContext, jobject Message)
194 {
195
196 jcas_Locking alock(env);
197 {
198 try {
199  Handle( AIS_InteractiveContext ) the_aContext;
200  void*                ptr_aContext = jcas_GetHandle(env,aContext);
201  
202  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
203
204 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
205 if ( the_Message == NULL ) {
206
207  // The following assumes availability of the default constructor (what may not
208  // always be the case). Therefore explicit exception is thrown if the null
209  // object has been passed.
210  // the_Message = new TCollection_AsciiString ();
211  // jcas_SetHandle ( env, Message, the_Message );
212  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
213
214 }  // end if
215 SampleGeometryPackage::gpTest2(the_aContext,*the_Message);
216
217 }
218 catch (Standard_Failure) {
219   Standard_SStream Err;
220   Err <<   Standard_Failure::Caught(); 
221   Err << (char) 0;
222   jcas_ThrowException(env,Err.str().c_str());
223 }
224 }
225 alock.Release();
226
227 }
228
229
230
231 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest3 (JNIEnv *env, jclass, jobject aContext, jobject Message)
232 {
233
234 jcas_Locking alock(env);
235 {
236 try {
237  Handle( AIS_InteractiveContext ) the_aContext;
238  void*                ptr_aContext = jcas_GetHandle(env,aContext);
239  
240  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
241
242 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
243 if ( the_Message == NULL ) {
244
245  // The following assumes availability of the default constructor (what may not
246  // always be the case). Therefore explicit exception is thrown if the null
247  // object has been passed.
248  // the_Message = new TCollection_AsciiString ();
249  // jcas_SetHandle ( env, Message, the_Message );
250  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
251
252 }  // end if
253 SampleGeometryPackage::gpTest3(the_aContext,*the_Message);
254
255 }
256 catch (Standard_Failure) {
257   Standard_SStream Err;
258   Err <<   Standard_Failure::Caught(); 
259   Err << (char) 0;
260   jcas_ThrowException(env,Err.str().c_str());
261 }
262 }
263 alock.Release();
264
265 }
266
267
268
269 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest4 (JNIEnv *env, jclass, jobject aContext, jobject Message)
270 {
271
272 jcas_Locking alock(env);
273 {
274 try {
275  Handle( AIS_InteractiveContext ) the_aContext;
276  void*                ptr_aContext = jcas_GetHandle(env,aContext);
277  
278  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
279
280 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
281 if ( the_Message == NULL ) {
282
283  // The following assumes availability of the default constructor (what may not
284  // always be the case). Therefore explicit exception is thrown if the null
285  // object has been passed.
286  // the_Message = new TCollection_AsciiString ();
287  // jcas_SetHandle ( env, Message, the_Message );
288  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
289
290 }  // end if
291 SampleGeometryPackage::gpTest4(the_aContext,*the_Message);
292
293 }
294 catch (Standard_Failure) {
295   Standard_SStream Err;
296   Err <<   Standard_Failure::Caught(); 
297   Err << (char) 0;
298   jcas_ThrowException(env,Err.str().c_str());
299 }
300 }
301 alock.Release();
302
303 }
304
305
306
307 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest5 (JNIEnv *env, jclass, jobject aContext, jobject Message)
308 {
309
310 jcas_Locking alock(env);
311 {
312 try {
313  Handle( AIS_InteractiveContext ) the_aContext;
314  void*                ptr_aContext = jcas_GetHandle(env,aContext);
315  
316  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
317
318 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
319 if ( the_Message == NULL ) {
320
321  // The following assumes availability of the default constructor (what may not
322  // always be the case). Therefore explicit exception is thrown if the null
323  // object has been passed.
324  // the_Message = new TCollection_AsciiString ();
325  // jcas_SetHandle ( env, Message, the_Message );
326  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
327
328 }  // end if
329 SampleGeometryPackage::gpTest5(the_aContext,*the_Message);
330
331 }
332 catch (Standard_Failure) {
333   Standard_SStream Err;
334   Err <<   Standard_Failure::Caught(); 
335   Err << (char) 0;
336   jcas_ThrowException(env,Err.str().c_str());
337 }
338 }
339 alock.Release();
340
341 }
342
343
344
345 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest6 (JNIEnv *env, jclass, jobject aContext, jobject Message)
346 {
347
348 jcas_Locking alock(env);
349 {
350 try {
351  Handle( AIS_InteractiveContext ) the_aContext;
352  void*                ptr_aContext = jcas_GetHandle(env,aContext);
353  
354  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
355
356 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
357 if ( the_Message == NULL ) {
358
359  // The following assumes availability of the default constructor (what may not
360  // always be the case). Therefore explicit exception is thrown if the null
361  // object has been passed.
362  // the_Message = new TCollection_AsciiString ();
363  // jcas_SetHandle ( env, Message, the_Message );
364  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
365
366 }  // end if
367 SampleGeometryPackage::gpTest6(the_aContext,*the_Message);
368
369 }
370 catch (Standard_Failure) {
371   Standard_SStream Err;
372   Err <<   Standard_Failure::Caught(); 
373   Err << (char) 0;
374   jcas_ThrowException(env,Err.str().c_str());
375 }
376 }
377 alock.Release();
378
379 }
380
381
382
383 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest7 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
384 {
385
386 jcas_Locking alock(env);
387 {
388 try {
389  Handle( ISession2D_InteractiveContext ) the_aContext2D;
390  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
391  
392  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
393
394 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
395 if ( the_Message == NULL ) {
396
397  // The following assumes availability of the default constructor (what may not
398  // always be the case). Therefore explicit exception is thrown if the null
399  // object has been passed.
400  // the_Message = new TCollection_AsciiString ();
401  // jcas_SetHandle ( env, Message, the_Message );
402  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
403
404 }  // end if
405 SampleGeometryPackage::gpTest7(the_aContext2D,*the_Message);
406
407 }
408 catch (Standard_Failure) {
409   Standard_SStream Err;
410   Err <<   Standard_Failure::Caught(); 
411   Err << (char) 0;
412   jcas_ThrowException(env,Err.str().c_str());
413 }
414 }
415 alock.Release();
416
417 }
418
419
420
421 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest8 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
422 {
423
424 jcas_Locking alock(env);
425 {
426 try {
427  Handle( ISession2D_InteractiveContext ) the_aContext2D;
428  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
429  
430  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
431
432 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
433 if ( the_Message == NULL ) {
434
435  // The following assumes availability of the default constructor (what may not
436  // always be the case). Therefore explicit exception is thrown if the null
437  // object has been passed.
438  // the_Message = new TCollection_AsciiString ();
439  // jcas_SetHandle ( env, Message, the_Message );
440  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
441
442 }  // end if
443 SampleGeometryPackage::gpTest8(the_aContext2D,*the_Message);
444
445 }
446 catch (Standard_Failure) {
447   Standard_SStream Err;
448   Err <<   Standard_Failure::Caught(); 
449   Err << (char) 0;
450   jcas_ThrowException(env,Err.str().c_str());
451 }
452 }
453 alock.Release();
454
455 }
456
457
458
459 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest9 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
460 {
461
462 jcas_Locking alock(env);
463 {
464 try {
465  Handle( ISession2D_InteractiveContext ) the_aContext2D;
466  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
467  
468  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
469
470 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
471 if ( the_Message == NULL ) {
472
473  // The following assumes availability of the default constructor (what may not
474  // always be the case). Therefore explicit exception is thrown if the null
475  // object has been passed.
476  // the_Message = new TCollection_AsciiString ();
477  // jcas_SetHandle ( env, Message, the_Message );
478  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
479
480 }  // end if
481 SampleGeometryPackage::gpTest9(the_aContext2D,*the_Message);
482
483 }
484 catch (Standard_Failure) {
485   Standard_SStream Err;
486   Err <<   Standard_Failure::Caught(); 
487   Err << (char) 0;
488   jcas_ThrowException(env,Err.str().c_str());
489 }
490 }
491 alock.Release();
492
493 }
494
495
496
497 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest10 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
498 {
499
500 jcas_Locking alock(env);
501 {
502 try {
503  Handle( ISession2D_InteractiveContext ) the_aContext2D;
504  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
505  
506  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
507
508 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
509 if ( the_Message == NULL ) {
510
511  // The following assumes availability of the default constructor (what may not
512  // always be the case). Therefore explicit exception is thrown if the null
513  // object has been passed.
514  // the_Message = new TCollection_AsciiString ();
515  // jcas_SetHandle ( env, Message, the_Message );
516  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
517
518 }  // end if
519 SampleGeometryPackage::gpTest10(the_aContext2D,*the_Message);
520
521 }
522 catch (Standard_Failure) {
523   Standard_SStream Err;
524   Err <<   Standard_Failure::Caught(); 
525   Err << (char) 0;
526   jcas_ThrowException(env,Err.str().c_str());
527 }
528 }
529 alock.Release();
530
531 }
532
533
534
535 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest11 (JNIEnv *env, jclass, jobject aContext, jobject Message)
536 {
537
538 jcas_Locking alock(env);
539 {
540 try {
541  Handle( AIS_InteractiveContext ) the_aContext;
542  void*                ptr_aContext = jcas_GetHandle(env,aContext);
543  
544  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
545
546 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
547 if ( the_Message == NULL ) {
548
549  // The following assumes availability of the default constructor (what may not
550  // always be the case). Therefore explicit exception is thrown if the null
551  // object has been passed.
552  // the_Message = new TCollection_AsciiString ();
553  // jcas_SetHandle ( env, Message, the_Message );
554  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
555
556 }  // end if
557 SampleGeometryPackage::gpTest11(the_aContext,*the_Message);
558
559 }
560 catch (Standard_Failure) {
561   Standard_SStream Err;
562   Err <<   Standard_Failure::Caught(); 
563   Err << (char) 0;
564   jcas_ThrowException(env,Err.str().c_str());
565 }
566 }
567 alock.Release();
568
569 }
570
571
572
573 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest12 (JNIEnv *env, jclass, jobject aContext, jobject Message)
574 {
575
576 jcas_Locking alock(env);
577 {
578 try {
579  Handle( AIS_InteractiveContext ) the_aContext;
580  void*                ptr_aContext = jcas_GetHandle(env,aContext);
581  
582  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
583
584 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
585 if ( the_Message == NULL ) {
586
587  // The following assumes availability of the default constructor (what may not
588  // always be the case). Therefore explicit exception is thrown if the null
589  // object has been passed.
590  // the_Message = new TCollection_AsciiString ();
591  // jcas_SetHandle ( env, Message, the_Message );
592  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
593
594 }  // end if
595 SampleGeometryPackage::gpTest12(the_aContext,*the_Message);
596
597 }
598 catch (Standard_Failure) {
599   Standard_SStream Err;
600   Err <<   Standard_Failure::Caught(); 
601   Err << (char) 0;
602   jcas_ThrowException(env,Err.str().c_str());
603 }
604 }
605 alock.Release();
606
607 }
608
609
610
611 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest13 (JNIEnv *env, jclass, jobject aContext, jobject Message)
612 {
613
614 jcas_Locking alock(env);
615 {
616 try {
617  Handle( AIS_InteractiveContext ) the_aContext;
618  void*                ptr_aContext = jcas_GetHandle(env,aContext);
619  
620  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
621
622 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
623 if ( the_Message == NULL ) {
624
625  // The following assumes availability of the default constructor (what may not
626  // always be the case). Therefore explicit exception is thrown if the null
627  // object has been passed.
628  // the_Message = new TCollection_AsciiString ();
629  // jcas_SetHandle ( env, Message, the_Message );
630  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
631
632 }  // end if
633 SampleGeometryPackage::gpTest13(the_aContext,*the_Message);
634
635 }
636 catch (Standard_Failure) {
637   Standard_SStream Err;
638   Err <<   Standard_Failure::Caught(); 
639   Err << (char) 0;
640   jcas_ThrowException(env,Err.str().c_str());
641 }
642 }
643 alock.Release();
644
645 }
646
647
648
649 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest14 (JNIEnv *env, jclass, jobject aContext, jobject Message)
650 {
651
652 jcas_Locking alock(env);
653 {
654 try {
655  Handle( AIS_InteractiveContext ) the_aContext;
656  void*                ptr_aContext = jcas_GetHandle(env,aContext);
657  
658  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
659
660 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
661 if ( the_Message == NULL ) {
662
663  // The following assumes availability of the default constructor (what may not
664  // always be the case). Therefore explicit exception is thrown if the null
665  // object has been passed.
666  // the_Message = new TCollection_AsciiString ();
667  // jcas_SetHandle ( env, Message, the_Message );
668  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
669
670 }  // end if
671 SampleGeometryPackage::gpTest14(the_aContext,*the_Message);
672
673 }
674 catch (Standard_Failure) {
675   Standard_SStream Err;
676   Err <<   Standard_Failure::Caught(); 
677   Err << (char) 0;
678   jcas_ThrowException(env,Err.str().c_str());
679 }
680 }
681 alock.Release();
682
683 }
684
685
686
687 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest15 (JNIEnv *env, jclass, jobject aContext, jobject Message)
688 {
689
690 jcas_Locking alock(env);
691 {
692 try {
693  Handle( AIS_InteractiveContext ) the_aContext;
694  void*                ptr_aContext = jcas_GetHandle(env,aContext);
695  
696  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
697
698 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
699 if ( the_Message == NULL ) {
700
701  // The following assumes availability of the default constructor (what may not
702  // always be the case). Therefore explicit exception is thrown if the null
703  // object has been passed.
704  // the_Message = new TCollection_AsciiString ();
705  // jcas_SetHandle ( env, Message, the_Message );
706  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
707
708 }  // end if
709 SampleGeometryPackage::gpTest15(the_aContext,*the_Message);
710
711 }
712 catch (Standard_Failure) {
713   Standard_SStream Err;
714   Err <<   Standard_Failure::Caught(); 
715   Err << (char) 0;
716   jcas_ThrowException(env,Err.str().c_str());
717 }
718 }
719 alock.Release();
720
721 }
722
723
724
725 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest16 (JNIEnv *env, jclass, jobject aContext, jobject Message)
726 {
727
728 jcas_Locking alock(env);
729 {
730 try {
731  Handle( AIS_InteractiveContext ) the_aContext;
732  void*                ptr_aContext = jcas_GetHandle(env,aContext);
733  
734  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
735
736 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
737 if ( the_Message == NULL ) {
738
739  // The following assumes availability of the default constructor (what may not
740  // always be the case). Therefore explicit exception is thrown if the null
741  // object has been passed.
742  // the_Message = new TCollection_AsciiString ();
743  // jcas_SetHandle ( env, Message, the_Message );
744  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
745
746 }  // end if
747 SampleGeometryPackage::gpTest16(the_aContext,*the_Message);
748
749 }
750 catch (Standard_Failure) {
751   Standard_SStream Err;
752   Err <<   Standard_Failure::Caught(); 
753   Err << (char) 0;
754   jcas_ThrowException(env,Err.str().c_str());
755 }
756 }
757 alock.Release();
758
759 }
760
761
762
763 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest17 (JNIEnv *env, jclass, jobject aContext, jobject Message)
764 {
765
766 jcas_Locking alock(env);
767 {
768 try {
769  Handle( AIS_InteractiveContext ) the_aContext;
770  void*                ptr_aContext = jcas_GetHandle(env,aContext);
771  
772  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
773
774 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
775 if ( the_Message == NULL ) {
776
777  // The following assumes availability of the default constructor (what may not
778  // always be the case). Therefore explicit exception is thrown if the null
779  // object has been passed.
780  // the_Message = new TCollection_AsciiString ();
781  // jcas_SetHandle ( env, Message, the_Message );
782  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
783
784 }  // end if
785 SampleGeometryPackage::gpTest17(the_aContext,*the_Message);
786
787 }
788 catch (Standard_Failure) {
789   Standard_SStream Err;
790   Err <<   Standard_Failure::Caught(); 
791   Err << (char) 0;
792   jcas_ThrowException(env,Err.str().c_str());
793 }
794 }
795 alock.Release();
796
797 }
798
799
800
801 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest18 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
802 {
803
804 jcas_Locking alock(env);
805 {
806 try {
807  Handle( ISession2D_InteractiveContext ) the_aContext2D;
808  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
809  
810  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
811
812 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
813 if ( the_Message == NULL ) {
814
815  // The following assumes availability of the default constructor (what may not
816  // always be the case). Therefore explicit exception is thrown if the null
817  // object has been passed.
818  // the_Message = new TCollection_AsciiString ();
819  // jcas_SetHandle ( env, Message, the_Message );
820  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
821
822 }  // end if
823 SampleGeometryPackage::gpTest18(the_aContext2D,*the_Message);
824
825 }
826 catch (Standard_Failure) {
827   Standard_SStream Err;
828   Err <<   Standard_Failure::Caught(); 
829   Err << (char) 0;
830   jcas_ThrowException(env,Err.str().c_str());
831 }
832 }
833 alock.Release();
834
835 }
836
837
838
839 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest19 (JNIEnv *env, jclass, jobject aContext, jobject Message)
840 {
841
842 jcas_Locking alock(env);
843 {
844 try {
845  Handle( AIS_InteractiveContext ) the_aContext;
846  void*                ptr_aContext = jcas_GetHandle(env,aContext);
847  
848  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
849
850 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
851 if ( the_Message == NULL ) {
852
853  // The following assumes availability of the default constructor (what may not
854  // always be the case). Therefore explicit exception is thrown if the null
855  // object has been passed.
856  // the_Message = new TCollection_AsciiString ();
857  // jcas_SetHandle ( env, Message, the_Message );
858  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
859
860 }  // end if
861 SampleGeometryPackage::gpTest19(the_aContext,*the_Message);
862
863 }
864 catch (Standard_Failure) {
865   Standard_SStream Err;
866   Err <<   Standard_Failure::Caught(); 
867   Err << (char) 0;
868   jcas_ThrowException(env,Err.str().c_str());
869 }
870 }
871 alock.Release();
872
873 }
874
875
876
877 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest20 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
878 {
879
880 jcas_Locking alock(env);
881 {
882 try {
883  Handle( ISession2D_InteractiveContext ) the_aContext2D;
884  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
885  
886  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
887
888 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
889 if ( the_Message == NULL ) {
890
891  // The following assumes availability of the default constructor (what may not
892  // always be the case). Therefore explicit exception is thrown if the null
893  // object has been passed.
894  // the_Message = new TCollection_AsciiString ();
895  // jcas_SetHandle ( env, Message, the_Message );
896  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
897
898 }  // end if
899 SampleGeometryPackage::gpTest20(the_aContext2D,*the_Message);
900
901 }
902 catch (Standard_Failure) {
903   Standard_SStream Err;
904   Err <<   Standard_Failure::Caught(); 
905   Err << (char) 0;
906   jcas_ThrowException(env,Err.str().c_str());
907 }
908 }
909 alock.Release();
910
911 }
912
913
914
915 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest21 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
916 {
917
918 jcas_Locking alock(env);
919 {
920 try {
921  Handle( ISession2D_InteractiveContext ) the_aContext2D;
922  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
923  
924  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
925
926 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
927 if ( the_Message == NULL ) {
928
929  // The following assumes availability of the default constructor (what may not
930  // always be the case). Therefore explicit exception is thrown if the null
931  // object has been passed.
932  // the_Message = new TCollection_AsciiString ();
933  // jcas_SetHandle ( env, Message, the_Message );
934  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
935
936 }  // end if
937 SampleGeometryPackage::gpTest21(the_aContext2D,*the_Message);
938
939 }
940 catch (Standard_Failure) {
941   Standard_SStream Err;
942   Err <<   Standard_Failure::Caught(); 
943   Err << (char) 0;
944   jcas_ThrowException(env,Err.str().c_str());
945 }
946 }
947 alock.Release();
948
949 }
950
951
952
953 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest22 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
954 {
955
956 jcas_Locking alock(env);
957 {
958 try {
959  Handle( ISession2D_InteractiveContext ) the_aContext2D;
960  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
961  
962  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
963
964 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
965 if ( the_Message == NULL ) {
966
967  // The following assumes availability of the default constructor (what may not
968  // always be the case). Therefore explicit exception is thrown if the null
969  // object has been passed.
970  // the_Message = new TCollection_AsciiString ();
971  // jcas_SetHandle ( env, Message, the_Message );
972  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
973
974 }  // end if
975 SampleGeometryPackage::gpTest22(the_aContext2D,*the_Message);
976
977 }
978 catch (Standard_Failure) {
979   Standard_SStream Err;
980   Err <<   Standard_Failure::Caught(); 
981   Err << (char) 0;
982   jcas_ThrowException(env,Err.str().c_str());
983 }
984 }
985 alock.Release();
986
987 }
988
989
990
991 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest23 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
992 {
993
994 jcas_Locking alock(env);
995 {
996 try {
997  Handle( ISession2D_InteractiveContext ) the_aContext2D;
998  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
999  
1000  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
1001
1002 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1003 if ( the_Message == NULL ) {
1004
1005  // The following assumes availability of the default constructor (what may not
1006  // always be the case). Therefore explicit exception is thrown if the null
1007  // object has been passed.
1008  // the_Message = new TCollection_AsciiString ();
1009  // jcas_SetHandle ( env, Message, the_Message );
1010  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1011
1012 }  // end if
1013 SampleGeometryPackage::gpTest23(the_aContext2D,*the_Message);
1014
1015 }
1016 catch (Standard_Failure) {
1017   Standard_SStream Err;
1018   Err <<   Standard_Failure::Caught(); 
1019   Err << (char) 0;
1020   jcas_ThrowException(env,Err.str().c_str());
1021 }
1022 }
1023 alock.Release();
1024
1025 }
1026
1027
1028
1029 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest24 (JNIEnv *env, jclass, jobject aContext, jobject aContext2D, jobject Message)
1030 {
1031
1032 jcas_Locking alock(env);
1033 {
1034 try {
1035  Handle( AIS_InteractiveContext ) the_aContext;
1036  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1037  
1038  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1039
1040  Handle( ISession2D_InteractiveContext ) the_aContext2D;
1041  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1042  
1043  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
1044
1045 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1046 if ( the_Message == NULL ) {
1047
1048  // The following assumes availability of the default constructor (what may not
1049  // always be the case). Therefore explicit exception is thrown if the null
1050  // object has been passed.
1051  // the_Message = new TCollection_AsciiString ();
1052  // jcas_SetHandle ( env, Message, the_Message );
1053  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1054
1055 }  // end if
1056 SampleGeometryPackage::gpTest24(the_aContext,the_aContext2D,*the_Message);
1057
1058 }
1059 catch (Standard_Failure) {
1060   Standard_SStream Err;
1061   Err <<   Standard_Failure::Caught(); 
1062   Err << (char) 0;
1063   jcas_ThrowException(env,Err.str().c_str());
1064 }
1065 }
1066 alock.Release();
1067
1068 }
1069
1070
1071
1072 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest25 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1073 {
1074
1075 jcas_Locking alock(env);
1076 {
1077 try {
1078  Handle( ISession2D_InteractiveContext ) the_aContext2D;
1079  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1080  
1081  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
1082
1083 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1084 if ( the_Message == NULL ) {
1085
1086  // The following assumes availability of the default constructor (what may not
1087  // always be the case). Therefore explicit exception is thrown if the null
1088  // object has been passed.
1089  // the_Message = new TCollection_AsciiString ();
1090  // jcas_SetHandle ( env, Message, the_Message );
1091  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1092
1093 }  // end if
1094 SampleGeometryPackage::gpTest25(the_aContext2D,*the_Message);
1095
1096 }
1097 catch (Standard_Failure) {
1098   Standard_SStream Err;
1099   Err <<   Standard_Failure::Caught(); 
1100   Err << (char) 0;
1101   jcas_ThrowException(env,Err.str().c_str());
1102 }
1103 }
1104 alock.Release();
1105
1106 }
1107
1108
1109
1110 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest26 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1111 {
1112
1113 jcas_Locking alock(env);
1114 {
1115 try {
1116  Handle( ISession2D_InteractiveContext ) the_aContext2D;
1117  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1118  
1119  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
1120
1121 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1122 if ( the_Message == NULL ) {
1123
1124  // The following assumes availability of the default constructor (what may not
1125  // always be the case). Therefore explicit exception is thrown if the null
1126  // object has been passed.
1127  // the_Message = new TCollection_AsciiString ();
1128  // jcas_SetHandle ( env, Message, the_Message );
1129  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1130
1131 }  // end if
1132 SampleGeometryPackage::gpTest26(the_aContext2D,*the_Message);
1133
1134 }
1135 catch (Standard_Failure) {
1136   Standard_SStream Err;
1137   Err <<   Standard_Failure::Caught(); 
1138   Err << (char) 0;
1139   jcas_ThrowException(env,Err.str().c_str());
1140 }
1141 }
1142 alock.Release();
1143
1144 }
1145
1146
1147
1148 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest27 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1149 {
1150
1151 jcas_Locking alock(env);
1152 {
1153 try {
1154  Handle( ISession2D_InteractiveContext ) the_aContext2D;
1155  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1156  
1157  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
1158
1159 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1160 if ( the_Message == NULL ) {
1161
1162  // The following assumes availability of the default constructor (what may not
1163  // always be the case). Therefore explicit exception is thrown if the null
1164  // object has been passed.
1165  // the_Message = new TCollection_AsciiString ();
1166  // jcas_SetHandle ( env, Message, the_Message );
1167  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1168
1169 }  // end if
1170 SampleGeometryPackage::gpTest27(the_aContext2D,*the_Message);
1171
1172 }
1173 catch (Standard_Failure) {
1174   Standard_SStream Err;
1175   Err <<   Standard_Failure::Caught(); 
1176   Err << (char) 0;
1177   jcas_ThrowException(env,Err.str().c_str());
1178 }
1179 }
1180 alock.Release();
1181
1182 }
1183
1184
1185
1186 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest28 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1187 {
1188
1189 jcas_Locking alock(env);
1190 {
1191 try {
1192  Handle( ISession2D_InteractiveContext ) the_aContext2D;
1193  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1194  
1195  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
1196
1197 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1198 if ( the_Message == NULL ) {
1199
1200  // The following assumes availability of the default constructor (what may not
1201  // always be the case). Therefore explicit exception is thrown if the null
1202  // object has been passed.
1203  // the_Message = new TCollection_AsciiString ();
1204  // jcas_SetHandle ( env, Message, the_Message );
1205  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1206
1207 }  // end if
1208 SampleGeometryPackage::gpTest28(the_aContext2D,*the_Message);
1209
1210 }
1211 catch (Standard_Failure) {
1212   Standard_SStream Err;
1213   Err <<   Standard_Failure::Caught(); 
1214   Err << (char) 0;
1215   jcas_ThrowException(env,Err.str().c_str());
1216 }
1217 }
1218 alock.Release();
1219
1220 }
1221
1222
1223
1224 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest29 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1225 {
1226
1227 jcas_Locking alock(env);
1228 {
1229 try {
1230  Handle( ISession2D_InteractiveContext ) the_aContext2D;
1231  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1232  
1233  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
1234
1235 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1236 if ( the_Message == NULL ) {
1237
1238  // The following assumes availability of the default constructor (what may not
1239  // always be the case). Therefore explicit exception is thrown if the null
1240  // object has been passed.
1241  // the_Message = new TCollection_AsciiString ();
1242  // jcas_SetHandle ( env, Message, the_Message );
1243  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1244
1245 }  // end if
1246 SampleGeometryPackage::gpTest29(the_aContext2D,*the_Message);
1247
1248 }
1249 catch (Standard_Failure) {
1250   Standard_SStream Err;
1251   Err <<   Standard_Failure::Caught(); 
1252   Err << (char) 0;
1253   jcas_ThrowException(env,Err.str().c_str());
1254 }
1255 }
1256 alock.Release();
1257
1258 }
1259
1260
1261
1262 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest30 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1263 {
1264
1265 jcas_Locking alock(env);
1266 {
1267 try {
1268  Handle( ISession2D_InteractiveContext ) the_aContext2D;
1269  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1270  
1271  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
1272
1273 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1274 if ( the_Message == NULL ) {
1275
1276  // The following assumes availability of the default constructor (what may not
1277  // always be the case). Therefore explicit exception is thrown if the null
1278  // object has been passed.
1279  // the_Message = new TCollection_AsciiString ();
1280  // jcas_SetHandle ( env, Message, the_Message );
1281  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1282
1283 }  // end if
1284 SampleGeometryPackage::gpTest30(the_aContext2D,*the_Message);
1285
1286 }
1287 catch (Standard_Failure) {
1288   Standard_SStream Err;
1289   Err <<   Standard_Failure::Caught(); 
1290   Err << (char) 0;
1291   jcas_ThrowException(env,Err.str().c_str());
1292 }
1293 }
1294 alock.Release();
1295
1296 }
1297
1298
1299
1300 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest31 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1301 {
1302
1303 jcas_Locking alock(env);
1304 {
1305 try {
1306  Handle( ISession2D_InteractiveContext ) the_aContext2D;
1307  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1308  
1309  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
1310
1311 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1312 if ( the_Message == NULL ) {
1313
1314  // The following assumes availability of the default constructor (what may not
1315  // always be the case). Therefore explicit exception is thrown if the null
1316  // object has been passed.
1317  // the_Message = new TCollection_AsciiString ();
1318  // jcas_SetHandle ( env, Message, the_Message );
1319  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1320
1321 }  // end if
1322 SampleGeometryPackage::gpTest31(the_aContext2D,*the_Message);
1323
1324 }
1325 catch (Standard_Failure) {
1326   Standard_SStream Err;
1327   Err <<   Standard_Failure::Caught(); 
1328   Err << (char) 0;
1329   jcas_ThrowException(env,Err.str().c_str());
1330 }
1331 }
1332 alock.Release();
1333
1334 }
1335
1336
1337
1338 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest32 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1339 {
1340
1341 jcas_Locking alock(env);
1342 {
1343 try {
1344  Handle( ISession2D_InteractiveContext ) the_aContext2D;
1345  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1346  
1347  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
1348
1349 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1350 if ( the_Message == NULL ) {
1351
1352  // The following assumes availability of the default constructor (what may not
1353  // always be the case). Therefore explicit exception is thrown if the null
1354  // object has been passed.
1355  // the_Message = new TCollection_AsciiString ();
1356  // jcas_SetHandle ( env, Message, the_Message );
1357  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1358
1359 }  // end if
1360 SampleGeometryPackage::gpTest32(the_aContext2D,*the_Message);
1361
1362 }
1363 catch (Standard_Failure) {
1364   Standard_SStream Err;
1365   Err <<   Standard_Failure::Caught(); 
1366   Err << (char) 0;
1367   jcas_ThrowException(env,Err.str().c_str());
1368 }
1369 }
1370 alock.Release();
1371
1372 }
1373
1374
1375
1376 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest33 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1377 {
1378
1379 jcas_Locking alock(env);
1380 {
1381 try {
1382  Handle( AIS_InteractiveContext ) the_aContext;
1383  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1384  
1385  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1386
1387 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1388 if ( the_Message == NULL ) {
1389
1390  // The following assumes availability of the default constructor (what may not
1391  // always be the case). Therefore explicit exception is thrown if the null
1392  // object has been passed.
1393  // the_Message = new TCollection_AsciiString ();
1394  // jcas_SetHandle ( env, Message, the_Message );
1395  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1396
1397 }  // end if
1398 SampleGeometryPackage::gpTest33(the_aContext,*the_Message);
1399
1400 }
1401 catch (Standard_Failure) {
1402   Standard_SStream Err;
1403   Err <<   Standard_Failure::Caught(); 
1404   Err << (char) 0;
1405   jcas_ThrowException(env,Err.str().c_str());
1406 }
1407 }
1408 alock.Release();
1409
1410 }
1411
1412
1413
1414 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest34 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1415 {
1416
1417 jcas_Locking alock(env);
1418 {
1419 try {
1420  Handle( AIS_InteractiveContext ) the_aContext;
1421  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1422  
1423  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1424
1425 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1426 if ( the_Message == NULL ) {
1427
1428  // The following assumes availability of the default constructor (what may not
1429  // always be the case). Therefore explicit exception is thrown if the null
1430  // object has been passed.
1431  // the_Message = new TCollection_AsciiString ();
1432  // jcas_SetHandle ( env, Message, the_Message );
1433  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1434
1435 }  // end if
1436 SampleGeometryPackage::gpTest34(the_aContext,*the_Message);
1437
1438 }
1439 catch (Standard_Failure) {
1440   Standard_SStream Err;
1441   Err <<   Standard_Failure::Caught(); 
1442   Err << (char) 0;
1443   jcas_ThrowException(env,Err.str().c_str());
1444 }
1445 }
1446 alock.Release();
1447
1448 }
1449
1450
1451
1452 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest35 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1453 {
1454
1455 jcas_Locking alock(env);
1456 {
1457 try {
1458  Handle( AIS_InteractiveContext ) the_aContext;
1459  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1460  
1461  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1462
1463 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1464 if ( the_Message == NULL ) {
1465
1466  // The following assumes availability of the default constructor (what may not
1467  // always be the case). Therefore explicit exception is thrown if the null
1468  // object has been passed.
1469  // the_Message = new TCollection_AsciiString ();
1470  // jcas_SetHandle ( env, Message, the_Message );
1471  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1472
1473 }  // end if
1474 SampleGeometryPackage::gpTest35(the_aContext,*the_Message);
1475
1476 }
1477 catch (Standard_Failure) {
1478   Standard_SStream Err;
1479   Err <<   Standard_Failure::Caught(); 
1480   Err << (char) 0;
1481   jcas_ThrowException(env,Err.str().c_str());
1482 }
1483 }
1484 alock.Release();
1485
1486 }
1487
1488
1489
1490 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest36 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1491 {
1492
1493 jcas_Locking alock(env);
1494 {
1495 try {
1496  Handle( AIS_InteractiveContext ) the_aContext;
1497  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1498  
1499  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1500
1501 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1502 if ( the_Message == NULL ) {
1503
1504  // The following assumes availability of the default constructor (what may not
1505  // always be the case). Therefore explicit exception is thrown if the null
1506  // object has been passed.
1507  // the_Message = new TCollection_AsciiString ();
1508  // jcas_SetHandle ( env, Message, the_Message );
1509  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1510
1511 }  // end if
1512 SampleGeometryPackage::gpTest36(the_aContext,*the_Message);
1513
1514 }
1515 catch (Standard_Failure) {
1516   Standard_SStream Err;
1517   Err <<   Standard_Failure::Caught(); 
1518   Err << (char) 0;
1519   jcas_ThrowException(env,Err.str().c_str());
1520 }
1521 }
1522 alock.Release();
1523
1524 }
1525
1526
1527
1528 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest37 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1529 {
1530
1531 jcas_Locking alock(env);
1532 {
1533 try {
1534  Handle( AIS_InteractiveContext ) the_aContext;
1535  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1536  
1537  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1538
1539 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1540 if ( the_Message == NULL ) {
1541
1542  // The following assumes availability of the default constructor (what may not
1543  // always be the case). Therefore explicit exception is thrown if the null
1544  // object has been passed.
1545  // the_Message = new TCollection_AsciiString ();
1546  // jcas_SetHandle ( env, Message, the_Message );
1547  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1548
1549 }  // end if
1550 SampleGeometryPackage::gpTest37(the_aContext,*the_Message);
1551
1552 }
1553 catch (Standard_Failure) {
1554   Standard_SStream Err;
1555   Err <<   Standard_Failure::Caught(); 
1556   Err << (char) 0;
1557   jcas_ThrowException(env,Err.str().c_str());
1558 }
1559 }
1560 alock.Release();
1561
1562 }
1563
1564
1565
1566 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest38 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1567 {
1568
1569 jcas_Locking alock(env);
1570 {
1571 try {
1572  Handle( AIS_InteractiveContext ) the_aContext;
1573  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1574  
1575  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1576
1577 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1578 if ( the_Message == NULL ) {
1579
1580  // The following assumes availability of the default constructor (what may not
1581  // always be the case). Therefore explicit exception is thrown if the null
1582  // object has been passed.
1583  // the_Message = new TCollection_AsciiString ();
1584  // jcas_SetHandle ( env, Message, the_Message );
1585  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1586
1587 }  // end if
1588 SampleGeometryPackage::gpTest38(the_aContext,*the_Message);
1589
1590 }
1591 catch (Standard_Failure) {
1592   Standard_SStream Err;
1593   Err <<   Standard_Failure::Caught(); 
1594   Err << (char) 0;
1595   jcas_ThrowException(env,Err.str().c_str());
1596 }
1597 }
1598 alock.Release();
1599
1600 }
1601
1602
1603
1604 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest39 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1605 {
1606
1607 jcas_Locking alock(env);
1608 {
1609 try {
1610  Handle( AIS_InteractiveContext ) the_aContext;
1611  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1612  
1613  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1614
1615 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1616 if ( the_Message == NULL ) {
1617
1618  // The following assumes availability of the default constructor (what may not
1619  // always be the case). Therefore explicit exception is thrown if the null
1620  // object has been passed.
1621  // the_Message = new TCollection_AsciiString ();
1622  // jcas_SetHandle ( env, Message, the_Message );
1623  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1624
1625 }  // end if
1626 SampleGeometryPackage::gpTest39(the_aContext,*the_Message);
1627
1628 }
1629 catch (Standard_Failure) {
1630   Standard_SStream Err;
1631   Err <<   Standard_Failure::Caught(); 
1632   Err << (char) 0;
1633   jcas_ThrowException(env,Err.str().c_str());
1634 }
1635 }
1636 alock.Release();
1637
1638 }
1639
1640
1641
1642 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest40 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1643 {
1644
1645 jcas_Locking alock(env);
1646 {
1647 try {
1648  Handle( AIS_InteractiveContext ) the_aContext;
1649  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1650  
1651  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1652
1653 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1654 if ( the_Message == NULL ) {
1655
1656  // The following assumes availability of the default constructor (what may not
1657  // always be the case). Therefore explicit exception is thrown if the null
1658  // object has been passed.
1659  // the_Message = new TCollection_AsciiString ();
1660  // jcas_SetHandle ( env, Message, the_Message );
1661  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1662
1663 }  // end if
1664 SampleGeometryPackage::gpTest40(the_aContext,*the_Message);
1665
1666 }
1667 catch (Standard_Failure) {
1668   Standard_SStream Err;
1669   Err <<   Standard_Failure::Caught(); 
1670   Err << (char) 0;
1671   jcas_ThrowException(env,Err.str().c_str());
1672 }
1673 }
1674 alock.Release();
1675
1676 }
1677
1678
1679
1680 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest41 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1681 {
1682
1683 jcas_Locking alock(env);
1684 {
1685 try {
1686  Handle( AIS_InteractiveContext ) the_aContext;
1687  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1688  
1689  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1690
1691 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1692 if ( the_Message == NULL ) {
1693
1694  // The following assumes availability of the default constructor (what may not
1695  // always be the case). Therefore explicit exception is thrown if the null
1696  // object has been passed.
1697  // the_Message = new TCollection_AsciiString ();
1698  // jcas_SetHandle ( env, Message, the_Message );
1699  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1700
1701 }  // end if
1702 SampleGeometryPackage::gpTest41(the_aContext,*the_Message);
1703
1704 }
1705 catch (Standard_Failure) {
1706   Standard_SStream Err;
1707   Err <<   Standard_Failure::Caught(); 
1708   Err << (char) 0;
1709   jcas_ThrowException(env,Err.str().c_str());
1710 }
1711 }
1712 alock.Release();
1713
1714 }
1715
1716
1717
1718 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest42 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1719 {
1720
1721 jcas_Locking alock(env);
1722 {
1723 try {
1724  Handle( AIS_InteractiveContext ) the_aContext;
1725  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1726  
1727  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1728
1729 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1730 if ( the_Message == NULL ) {
1731
1732  // The following assumes availability of the default constructor (what may not
1733  // always be the case). Therefore explicit exception is thrown if the null
1734  // object has been passed.
1735  // the_Message = new TCollection_AsciiString ();
1736  // jcas_SetHandle ( env, Message, the_Message );
1737  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1738
1739 }  // end if
1740 SampleGeometryPackage::gpTest42(the_aContext,*the_Message);
1741
1742 }
1743 catch (Standard_Failure) {
1744   Standard_SStream Err;
1745   Err <<   Standard_Failure::Caught(); 
1746   Err << (char) 0;
1747   jcas_ThrowException(env,Err.str().c_str());
1748 }
1749 }
1750 alock.Release();
1751
1752 }
1753
1754
1755
1756 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest43 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1757 {
1758
1759 jcas_Locking alock(env);
1760 {
1761 try {
1762  Handle( AIS_InteractiveContext ) the_aContext;
1763  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1764  
1765  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1766
1767 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1768 if ( the_Message == NULL ) {
1769
1770  // The following assumes availability of the default constructor (what may not
1771  // always be the case). Therefore explicit exception is thrown if the null
1772  // object has been passed.
1773  // the_Message = new TCollection_AsciiString ();
1774  // jcas_SetHandle ( env, Message, the_Message );
1775  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1776
1777 }  // end if
1778 SampleGeometryPackage::gpTest43(the_aContext,*the_Message);
1779
1780 }
1781 catch (Standard_Failure) {
1782   Standard_SStream Err;
1783   Err <<   Standard_Failure::Caught(); 
1784   Err << (char) 0;
1785   jcas_ThrowException(env,Err.str().c_str());
1786 }
1787 }
1788 alock.Release();
1789
1790 }
1791
1792
1793
1794 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest44 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1795 {
1796
1797 jcas_Locking alock(env);
1798 {
1799 try {
1800  Handle( AIS_InteractiveContext ) the_aContext;
1801  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1802  
1803  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1804
1805 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1806 if ( the_Message == NULL ) {
1807
1808  // The following assumes availability of the default constructor (what may not
1809  // always be the case). Therefore explicit exception is thrown if the null
1810  // object has been passed.
1811  // the_Message = new TCollection_AsciiString ();
1812  // jcas_SetHandle ( env, Message, the_Message );
1813  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1814
1815 }  // end if
1816 SampleGeometryPackage::gpTest44(the_aContext,*the_Message);
1817
1818 }
1819 catch (Standard_Failure) {
1820   Standard_SStream Err;
1821   Err <<   Standard_Failure::Caught(); 
1822   Err << (char) 0;
1823   jcas_ThrowException(env,Err.str().c_str());
1824 }
1825 }
1826 alock.Release();
1827
1828 }
1829
1830
1831
1832 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest45 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1833 {
1834
1835 jcas_Locking alock(env);
1836 {
1837 try {
1838  Handle( AIS_InteractiveContext ) the_aContext;
1839  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1840  
1841  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1842
1843 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1844 if ( the_Message == NULL ) {
1845
1846  // The following assumes availability of the default constructor (what may not
1847  // always be the case). Therefore explicit exception is thrown if the null
1848  // object has been passed.
1849  // the_Message = new TCollection_AsciiString ();
1850  // jcas_SetHandle ( env, Message, the_Message );
1851  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1852
1853 }  // end if
1854 SampleGeometryPackage::gpTest45(the_aContext,*the_Message);
1855
1856 }
1857 catch (Standard_Failure) {
1858   Standard_SStream Err;
1859   Err <<   Standard_Failure::Caught(); 
1860   Err << (char) 0;
1861   jcas_ThrowException(env,Err.str().c_str());
1862 }
1863 }
1864 alock.Release();
1865
1866 }
1867
1868
1869
1870 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest46 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1871 {
1872
1873 jcas_Locking alock(env);
1874 {
1875 try {
1876  Handle( AIS_InteractiveContext ) the_aContext;
1877  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1878  
1879  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1880
1881 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1882 if ( the_Message == NULL ) {
1883
1884  // The following assumes availability of the default constructor (what may not
1885  // always be the case). Therefore explicit exception is thrown if the null
1886  // object has been passed.
1887  // the_Message = new TCollection_AsciiString ();
1888  // jcas_SetHandle ( env, Message, the_Message );
1889  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1890
1891 }  // end if
1892 SampleGeometryPackage::gpTest46(the_aContext,*the_Message);
1893
1894 }
1895 catch (Standard_Failure) {
1896   Standard_SStream Err;
1897   Err <<   Standard_Failure::Caught(); 
1898   Err << (char) 0;
1899   jcas_ThrowException(env,Err.str().c_str());
1900 }
1901 }
1902 alock.Release();
1903
1904 }
1905
1906
1907
1908 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest47 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1909 {
1910
1911 jcas_Locking alock(env);
1912 {
1913 try {
1914  Handle( AIS_InteractiveContext ) the_aContext;
1915  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1916  
1917  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1918
1919 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1920 if ( the_Message == NULL ) {
1921
1922  // The following assumes availability of the default constructor (what may not
1923  // always be the case). Therefore explicit exception is thrown if the null
1924  // object has been passed.
1925  // the_Message = new TCollection_AsciiString ();
1926  // jcas_SetHandle ( env, Message, the_Message );
1927  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1928
1929 }  // end if
1930 SampleGeometryPackage::gpTest47(the_aContext,*the_Message);
1931
1932 }
1933 catch (Standard_Failure) {
1934   Standard_SStream Err;
1935   Err <<   Standard_Failure::Caught(); 
1936   Err << (char) 0;
1937   jcas_ThrowException(env,Err.str().c_str());
1938 }
1939 }
1940 alock.Release();
1941
1942 }
1943
1944
1945
1946 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest48 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1947 {
1948
1949 jcas_Locking alock(env);
1950 {
1951 try {
1952  Handle( ISession2D_InteractiveContext ) the_aContext2D;
1953  void*                ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1954  
1955  if ( ptr_aContext2D != NULL ) the_aContext2D = *(   (  Handle( ISession2D_InteractiveContext )*  )ptr_aContext2D   );
1956
1957 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1958 if ( the_Message == NULL ) {
1959
1960  // The following assumes availability of the default constructor (what may not
1961  // always be the case). Therefore explicit exception is thrown if the null
1962  // object has been passed.
1963  // the_Message = new TCollection_AsciiString ();
1964  // jcas_SetHandle ( env, Message, the_Message );
1965  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1966
1967 }  // end if
1968 SampleGeometryPackage::gpTest48(the_aContext2D,*the_Message);
1969
1970 }
1971 catch (Standard_Failure) {
1972   Standard_SStream Err;
1973   Err <<   Standard_Failure::Caught(); 
1974   Err << (char) 0;
1975   jcas_ThrowException(env,Err.str().c_str());
1976 }
1977 }
1978 alock.Release();
1979
1980 }
1981
1982
1983
1984 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest49 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1985 {
1986
1987 jcas_Locking alock(env);
1988 {
1989 try {
1990  Handle( AIS_InteractiveContext ) the_aContext;
1991  void*                ptr_aContext = jcas_GetHandle(env,aContext);
1992  
1993  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
1994
1995 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1996 if ( the_Message == NULL ) {
1997
1998  // The following assumes availability of the default constructor (what may not
1999  // always be the case). Therefore explicit exception is thrown if the null
2000  // object has been passed.
2001  // the_Message = new TCollection_AsciiString ();
2002  // jcas_SetHandle ( env, Message, the_Message );
2003  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
2004
2005 }  // end if
2006 SampleGeometryPackage::gpTest49(the_aContext,*the_Message);
2007
2008 }
2009 catch (Standard_Failure) {
2010   Standard_SStream Err;
2011   Err <<   Standard_Failure::Caught(); 
2012   Err << (char) 0;
2013   jcas_ThrowException(env,Err.str().c_str());
2014 }
2015 }
2016 alock.Release();
2017
2018 }
2019
2020
2021
2022 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest50 (JNIEnv *env, jclass, jobject aContext, jobject Message)
2023 {
2024
2025 jcas_Locking alock(env);
2026 {
2027 try {
2028  Handle( AIS_InteractiveContext ) the_aContext;
2029  void*                ptr_aContext = jcas_GetHandle(env,aContext);
2030  
2031  if ( ptr_aContext != NULL ) the_aContext = *(   (  Handle( AIS_InteractiveContext )*  )ptr_aContext   );
2032
2033 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
2034 if ( the_Message == NULL ) {
2035
2036  // The following assumes availability of the default constructor (what may not
2037  // always be the case). Therefore explicit exception is thrown if the null
2038  // object has been passed.
2039  // the_Message = new TCollection_AsciiString ();
2040  // jcas_SetHandle ( env, Message, the_Message );
2041  jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
2042
2043 }  // end if
2044 SampleGeometryPackage::gpTest50(the_aContext,*the_Message);
2045
2046 }
2047 catch (Standard_Failure) {
2048   Standard_SStream Err;
2049   Err <<   Standard_Failure::Caught(); 
2050   Err << (char) 0;
2051   jcas_ThrowException(env,Err.str().c_str());
2052 }
2053 }
2054 alock.Release();
2055
2056 }
2057
2058
2059
2060 JNIEXPORT jboolean JNICALL Java_SampleGeometryJni_SampleGeometryPackage_SaveImage (JNIEnv *env, jclass, jobject aFileName, jobject aFormat, jobject aView)
2061 {
2062 jboolean thejret;
2063
2064 jcas_Locking alock(env);
2065 {
2066 try {
2067 Standard_CString the_aFileName = jcas_ConvertToCString(env,aFileName);
2068 Standard_CString the_aFormat = jcas_ConvertToCString(env,aFormat);
2069  Handle( V3d_View ) the_aView;
2070  void*                ptr_aView = jcas_GetHandle(env,aView);
2071  
2072  if ( ptr_aView != NULL ) the_aView = *(   (  Handle( V3d_View )*  )ptr_aView   );
2073
2074  thejret = SampleGeometryPackage::SaveImage(the_aFileName,the_aFormat,the_aView);
2075
2076 }
2077 catch (Standard_Failure) {
2078   Standard_SStream Err;
2079   Err <<   Standard_Failure::Caught(); 
2080   Err << (char) 0;
2081   jcas_ThrowException(env,Err.str().c_str());
2082 }
2083 }
2084 alock.Release();
2085 return thejret;
2086 }
2087
2088
2089 }