2 // Copyright (C) 1991 - 2000 by
3 // Matra Datavision SA. All rights reserved.
5 // Copyright (C) 2001 - 2004 by
6 // Open CASCADE SA. All rights reserved.
8 // This file is part of the Open CASCADE Technology software.
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.
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
22 #include <SampleGeometryJni_SampleGeometryPackage.h>
23 #include <SampleGeometryPackage.hxx>
26 #include <Standard_ErrorHandler.hxx>
27 #include <Standard_Failure.hxx>
28 #include <Standard_SStream.hxx>
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>
46 JNIEXPORT jobject JNICALL Java_SampleGeometryJni_SampleGeometryPackage_CreateViewer3d (JNIEnv *env, jclass, jstring aName)
50 jcas_Locking alock(env);
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);
59 catch (Standard_Failure) {
61 Err << Standard_Failure::Caught();
63 jcas_ThrowException(env,Err.str().c_str());
72 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_SetWindow3d (JNIEnv *env, jclass, jobject aView, jint hiwin, jint lowin)
75 jcas_Locking alock(env);
78 Handle( V3d_View ) the_aView;
79 void* ptr_aView = jcas_GetHandle(env,aView);
81 if ( ptr_aView != NULL ) the_aView = *( ( Handle( V3d_View )* )ptr_aView );
83 SampleGeometryPackage::SetWindow3d(the_aView,(Standard_Integer) hiwin,(Standard_Integer) lowin);
86 catch (Standard_Failure) {
88 Err << Standard_Failure::Caught();
90 jcas_ThrowException(env,Err.str().c_str());
99 JNIEXPORT jobject JNICALL Java_SampleGeometryJni_SampleGeometryPackage_CreateViewer2d (JNIEnv *env, jclass, jstring aName)
103 jcas_Locking alock(env);
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);
112 catch (Standard_Failure) {
113 Standard_SStream Err;
114 Err << Standard_Failure::Caught();
116 jcas_ThrowException(env,Err.str().c_str());
125 JNIEXPORT jobject JNICALL Java_SampleGeometryJni_SampleGeometryPackage_CreateView2d (JNIEnv *env, jclass, jobject aViewer, jint hiwin, jint lowin)
129 jcas_Locking alock(env);
132 Handle( V2d_Viewer ) the_aViewer;
133 void* ptr_aViewer = jcas_GetHandle(env,aViewer);
135 if ( ptr_aViewer != NULL ) the_aViewer = *( ( Handle( V2d_Viewer )* )ptr_aViewer );
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);
142 catch (Standard_Failure) {
143 Standard_SStream Err;
144 Err << Standard_Failure::Caught();
146 jcas_ThrowException(env,Err.str().c_str());
155 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest1 (JNIEnv *env, jclass, jobject aContext, jobject Message)
158 jcas_Locking alock(env);
161 Handle( AIS_InteractiveContext ) the_aContext;
162 void* ptr_aContext = jcas_GetHandle(env,aContext);
164 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
166 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
167 if ( the_Message == NULL ) {
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");
177 SampleGeometryPackage::gpTest1(the_aContext,*the_Message);
180 catch (Standard_Failure) {
181 Standard_SStream Err;
182 Err << Standard_Failure::Caught();
184 jcas_ThrowException(env,Err.str().c_str());
193 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest2 (JNIEnv *env, jclass, jobject aContext, jobject Message)
196 jcas_Locking alock(env);
199 Handle( AIS_InteractiveContext ) the_aContext;
200 void* ptr_aContext = jcas_GetHandle(env,aContext);
202 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
204 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
205 if ( the_Message == NULL ) {
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");
215 SampleGeometryPackage::gpTest2(the_aContext,*the_Message);
218 catch (Standard_Failure) {
219 Standard_SStream Err;
220 Err << Standard_Failure::Caught();
222 jcas_ThrowException(env,Err.str().c_str());
231 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest3 (JNIEnv *env, jclass, jobject aContext, jobject Message)
234 jcas_Locking alock(env);
237 Handle( AIS_InteractiveContext ) the_aContext;
238 void* ptr_aContext = jcas_GetHandle(env,aContext);
240 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
242 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
243 if ( the_Message == NULL ) {
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");
253 SampleGeometryPackage::gpTest3(the_aContext,*the_Message);
256 catch (Standard_Failure) {
257 Standard_SStream Err;
258 Err << Standard_Failure::Caught();
260 jcas_ThrowException(env,Err.str().c_str());
269 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest4 (JNIEnv *env, jclass, jobject aContext, jobject Message)
272 jcas_Locking alock(env);
275 Handle( AIS_InteractiveContext ) the_aContext;
276 void* ptr_aContext = jcas_GetHandle(env,aContext);
278 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
280 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
281 if ( the_Message == NULL ) {
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");
291 SampleGeometryPackage::gpTest4(the_aContext,*the_Message);
294 catch (Standard_Failure) {
295 Standard_SStream Err;
296 Err << Standard_Failure::Caught();
298 jcas_ThrowException(env,Err.str().c_str());
307 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest5 (JNIEnv *env, jclass, jobject aContext, jobject Message)
310 jcas_Locking alock(env);
313 Handle( AIS_InteractiveContext ) the_aContext;
314 void* ptr_aContext = jcas_GetHandle(env,aContext);
316 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
318 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
319 if ( the_Message == NULL ) {
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");
329 SampleGeometryPackage::gpTest5(the_aContext,*the_Message);
332 catch (Standard_Failure) {
333 Standard_SStream Err;
334 Err << Standard_Failure::Caught();
336 jcas_ThrowException(env,Err.str().c_str());
345 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest6 (JNIEnv *env, jclass, jobject aContext, jobject Message)
348 jcas_Locking alock(env);
351 Handle( AIS_InteractiveContext ) the_aContext;
352 void* ptr_aContext = jcas_GetHandle(env,aContext);
354 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
356 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
357 if ( the_Message == NULL ) {
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");
367 SampleGeometryPackage::gpTest6(the_aContext,*the_Message);
370 catch (Standard_Failure) {
371 Standard_SStream Err;
372 Err << Standard_Failure::Caught();
374 jcas_ThrowException(env,Err.str().c_str());
383 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest7 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
386 jcas_Locking alock(env);
389 Handle( ISession2D_InteractiveContext ) the_aContext2D;
390 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
392 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
394 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
395 if ( the_Message == NULL ) {
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");
405 SampleGeometryPackage::gpTest7(the_aContext2D,*the_Message);
408 catch (Standard_Failure) {
409 Standard_SStream Err;
410 Err << Standard_Failure::Caught();
412 jcas_ThrowException(env,Err.str().c_str());
421 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest8 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
424 jcas_Locking alock(env);
427 Handle( ISession2D_InteractiveContext ) the_aContext2D;
428 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
430 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
432 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
433 if ( the_Message == NULL ) {
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");
443 SampleGeometryPackage::gpTest8(the_aContext2D,*the_Message);
446 catch (Standard_Failure) {
447 Standard_SStream Err;
448 Err << Standard_Failure::Caught();
450 jcas_ThrowException(env,Err.str().c_str());
459 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest9 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
462 jcas_Locking alock(env);
465 Handle( ISession2D_InteractiveContext ) the_aContext2D;
466 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
468 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
470 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
471 if ( the_Message == NULL ) {
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");
481 SampleGeometryPackage::gpTest9(the_aContext2D,*the_Message);
484 catch (Standard_Failure) {
485 Standard_SStream Err;
486 Err << Standard_Failure::Caught();
488 jcas_ThrowException(env,Err.str().c_str());
497 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest10 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
500 jcas_Locking alock(env);
503 Handle( ISession2D_InteractiveContext ) the_aContext2D;
504 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
506 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
508 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
509 if ( the_Message == NULL ) {
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");
519 SampleGeometryPackage::gpTest10(the_aContext2D,*the_Message);
522 catch (Standard_Failure) {
523 Standard_SStream Err;
524 Err << Standard_Failure::Caught();
526 jcas_ThrowException(env,Err.str().c_str());
535 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest11 (JNIEnv *env, jclass, jobject aContext, jobject Message)
538 jcas_Locking alock(env);
541 Handle( AIS_InteractiveContext ) the_aContext;
542 void* ptr_aContext = jcas_GetHandle(env,aContext);
544 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
546 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
547 if ( the_Message == NULL ) {
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");
557 SampleGeometryPackage::gpTest11(the_aContext,*the_Message);
560 catch (Standard_Failure) {
561 Standard_SStream Err;
562 Err << Standard_Failure::Caught();
564 jcas_ThrowException(env,Err.str().c_str());
573 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest12 (JNIEnv *env, jclass, jobject aContext, jobject Message)
576 jcas_Locking alock(env);
579 Handle( AIS_InteractiveContext ) the_aContext;
580 void* ptr_aContext = jcas_GetHandle(env,aContext);
582 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
584 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
585 if ( the_Message == NULL ) {
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");
595 SampleGeometryPackage::gpTest12(the_aContext,*the_Message);
598 catch (Standard_Failure) {
599 Standard_SStream Err;
600 Err << Standard_Failure::Caught();
602 jcas_ThrowException(env,Err.str().c_str());
611 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest13 (JNIEnv *env, jclass, jobject aContext, jobject Message)
614 jcas_Locking alock(env);
617 Handle( AIS_InteractiveContext ) the_aContext;
618 void* ptr_aContext = jcas_GetHandle(env,aContext);
620 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
622 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
623 if ( the_Message == NULL ) {
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");
633 SampleGeometryPackage::gpTest13(the_aContext,*the_Message);
636 catch (Standard_Failure) {
637 Standard_SStream Err;
638 Err << Standard_Failure::Caught();
640 jcas_ThrowException(env,Err.str().c_str());
649 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest14 (JNIEnv *env, jclass, jobject aContext, jobject Message)
652 jcas_Locking alock(env);
655 Handle( AIS_InteractiveContext ) the_aContext;
656 void* ptr_aContext = jcas_GetHandle(env,aContext);
658 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
660 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
661 if ( the_Message == NULL ) {
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");
671 SampleGeometryPackage::gpTest14(the_aContext,*the_Message);
674 catch (Standard_Failure) {
675 Standard_SStream Err;
676 Err << Standard_Failure::Caught();
678 jcas_ThrowException(env,Err.str().c_str());
687 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest15 (JNIEnv *env, jclass, jobject aContext, jobject Message)
690 jcas_Locking alock(env);
693 Handle( AIS_InteractiveContext ) the_aContext;
694 void* ptr_aContext = jcas_GetHandle(env,aContext);
696 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
698 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
699 if ( the_Message == NULL ) {
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");
709 SampleGeometryPackage::gpTest15(the_aContext,*the_Message);
712 catch (Standard_Failure) {
713 Standard_SStream Err;
714 Err << Standard_Failure::Caught();
716 jcas_ThrowException(env,Err.str().c_str());
725 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest16 (JNIEnv *env, jclass, jobject aContext, jobject Message)
728 jcas_Locking alock(env);
731 Handle( AIS_InteractiveContext ) the_aContext;
732 void* ptr_aContext = jcas_GetHandle(env,aContext);
734 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
736 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
737 if ( the_Message == NULL ) {
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");
747 SampleGeometryPackage::gpTest16(the_aContext,*the_Message);
750 catch (Standard_Failure) {
751 Standard_SStream Err;
752 Err << Standard_Failure::Caught();
754 jcas_ThrowException(env,Err.str().c_str());
763 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest17 (JNIEnv *env, jclass, jobject aContext, jobject Message)
766 jcas_Locking alock(env);
769 Handle( AIS_InteractiveContext ) the_aContext;
770 void* ptr_aContext = jcas_GetHandle(env,aContext);
772 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
774 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
775 if ( the_Message == NULL ) {
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");
785 SampleGeometryPackage::gpTest17(the_aContext,*the_Message);
788 catch (Standard_Failure) {
789 Standard_SStream Err;
790 Err << Standard_Failure::Caught();
792 jcas_ThrowException(env,Err.str().c_str());
801 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest18 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
804 jcas_Locking alock(env);
807 Handle( ISession2D_InteractiveContext ) the_aContext2D;
808 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
810 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
812 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
813 if ( the_Message == NULL ) {
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");
823 SampleGeometryPackage::gpTest18(the_aContext2D,*the_Message);
826 catch (Standard_Failure) {
827 Standard_SStream Err;
828 Err << Standard_Failure::Caught();
830 jcas_ThrowException(env,Err.str().c_str());
839 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest19 (JNIEnv *env, jclass, jobject aContext, jobject Message)
842 jcas_Locking alock(env);
845 Handle( AIS_InteractiveContext ) the_aContext;
846 void* ptr_aContext = jcas_GetHandle(env,aContext);
848 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
850 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
851 if ( the_Message == NULL ) {
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");
861 SampleGeometryPackage::gpTest19(the_aContext,*the_Message);
864 catch (Standard_Failure) {
865 Standard_SStream Err;
866 Err << Standard_Failure::Caught();
868 jcas_ThrowException(env,Err.str().c_str());
877 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest20 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
880 jcas_Locking alock(env);
883 Handle( ISession2D_InteractiveContext ) the_aContext2D;
884 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
886 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
888 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
889 if ( the_Message == NULL ) {
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");
899 SampleGeometryPackage::gpTest20(the_aContext2D,*the_Message);
902 catch (Standard_Failure) {
903 Standard_SStream Err;
904 Err << Standard_Failure::Caught();
906 jcas_ThrowException(env,Err.str().c_str());
915 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest21 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
918 jcas_Locking alock(env);
921 Handle( ISession2D_InteractiveContext ) the_aContext2D;
922 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
924 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
926 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
927 if ( the_Message == NULL ) {
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");
937 SampleGeometryPackage::gpTest21(the_aContext2D,*the_Message);
940 catch (Standard_Failure) {
941 Standard_SStream Err;
942 Err << Standard_Failure::Caught();
944 jcas_ThrowException(env,Err.str().c_str());
953 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest22 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
956 jcas_Locking alock(env);
959 Handle( ISession2D_InteractiveContext ) the_aContext2D;
960 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
962 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
964 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
965 if ( the_Message == NULL ) {
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");
975 SampleGeometryPackage::gpTest22(the_aContext2D,*the_Message);
978 catch (Standard_Failure) {
979 Standard_SStream Err;
980 Err << Standard_Failure::Caught();
982 jcas_ThrowException(env,Err.str().c_str());
991 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest23 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
994 jcas_Locking alock(env);
997 Handle( ISession2D_InteractiveContext ) the_aContext2D;
998 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1000 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
1002 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1003 if ( the_Message == NULL ) {
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");
1013 SampleGeometryPackage::gpTest23(the_aContext2D,*the_Message);
1016 catch (Standard_Failure) {
1017 Standard_SStream Err;
1018 Err << Standard_Failure::Caught();
1020 jcas_ThrowException(env,Err.str().c_str());
1029 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest24 (JNIEnv *env, jclass, jobject aContext, jobject aContext2D, jobject Message)
1032 jcas_Locking alock(env);
1035 Handle( AIS_InteractiveContext ) the_aContext;
1036 void* ptr_aContext = jcas_GetHandle(env,aContext);
1038 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1040 Handle( ISession2D_InteractiveContext ) the_aContext2D;
1041 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1043 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
1045 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1046 if ( the_Message == NULL ) {
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");
1056 SampleGeometryPackage::gpTest24(the_aContext,the_aContext2D,*the_Message);
1059 catch (Standard_Failure) {
1060 Standard_SStream Err;
1061 Err << Standard_Failure::Caught();
1063 jcas_ThrowException(env,Err.str().c_str());
1072 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest25 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1075 jcas_Locking alock(env);
1078 Handle( ISession2D_InteractiveContext ) the_aContext2D;
1079 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1081 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
1083 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1084 if ( the_Message == NULL ) {
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");
1094 SampleGeometryPackage::gpTest25(the_aContext2D,*the_Message);
1097 catch (Standard_Failure) {
1098 Standard_SStream Err;
1099 Err << Standard_Failure::Caught();
1101 jcas_ThrowException(env,Err.str().c_str());
1110 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest26 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1113 jcas_Locking alock(env);
1116 Handle( ISession2D_InteractiveContext ) the_aContext2D;
1117 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1119 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
1121 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1122 if ( the_Message == NULL ) {
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");
1132 SampleGeometryPackage::gpTest26(the_aContext2D,*the_Message);
1135 catch (Standard_Failure) {
1136 Standard_SStream Err;
1137 Err << Standard_Failure::Caught();
1139 jcas_ThrowException(env,Err.str().c_str());
1148 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest27 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1151 jcas_Locking alock(env);
1154 Handle( ISession2D_InteractiveContext ) the_aContext2D;
1155 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1157 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
1159 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1160 if ( the_Message == NULL ) {
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");
1170 SampleGeometryPackage::gpTest27(the_aContext2D,*the_Message);
1173 catch (Standard_Failure) {
1174 Standard_SStream Err;
1175 Err << Standard_Failure::Caught();
1177 jcas_ThrowException(env,Err.str().c_str());
1186 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest28 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1189 jcas_Locking alock(env);
1192 Handle( ISession2D_InteractiveContext ) the_aContext2D;
1193 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1195 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
1197 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1198 if ( the_Message == NULL ) {
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");
1208 SampleGeometryPackage::gpTest28(the_aContext2D,*the_Message);
1211 catch (Standard_Failure) {
1212 Standard_SStream Err;
1213 Err << Standard_Failure::Caught();
1215 jcas_ThrowException(env,Err.str().c_str());
1224 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest29 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1227 jcas_Locking alock(env);
1230 Handle( ISession2D_InteractiveContext ) the_aContext2D;
1231 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1233 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
1235 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1236 if ( the_Message == NULL ) {
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");
1246 SampleGeometryPackage::gpTest29(the_aContext2D,*the_Message);
1249 catch (Standard_Failure) {
1250 Standard_SStream Err;
1251 Err << Standard_Failure::Caught();
1253 jcas_ThrowException(env,Err.str().c_str());
1262 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest30 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1265 jcas_Locking alock(env);
1268 Handle( ISession2D_InteractiveContext ) the_aContext2D;
1269 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1271 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
1273 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1274 if ( the_Message == NULL ) {
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");
1284 SampleGeometryPackage::gpTest30(the_aContext2D,*the_Message);
1287 catch (Standard_Failure) {
1288 Standard_SStream Err;
1289 Err << Standard_Failure::Caught();
1291 jcas_ThrowException(env,Err.str().c_str());
1300 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest31 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1303 jcas_Locking alock(env);
1306 Handle( ISession2D_InteractiveContext ) the_aContext2D;
1307 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1309 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
1311 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1312 if ( the_Message == NULL ) {
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");
1322 SampleGeometryPackage::gpTest31(the_aContext2D,*the_Message);
1325 catch (Standard_Failure) {
1326 Standard_SStream Err;
1327 Err << Standard_Failure::Caught();
1329 jcas_ThrowException(env,Err.str().c_str());
1338 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest32 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1341 jcas_Locking alock(env);
1344 Handle( ISession2D_InteractiveContext ) the_aContext2D;
1345 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1347 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
1349 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1350 if ( the_Message == NULL ) {
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");
1360 SampleGeometryPackage::gpTest32(the_aContext2D,*the_Message);
1363 catch (Standard_Failure) {
1364 Standard_SStream Err;
1365 Err << Standard_Failure::Caught();
1367 jcas_ThrowException(env,Err.str().c_str());
1376 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest33 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1379 jcas_Locking alock(env);
1382 Handle( AIS_InteractiveContext ) the_aContext;
1383 void* ptr_aContext = jcas_GetHandle(env,aContext);
1385 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1387 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1388 if ( the_Message == NULL ) {
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");
1398 SampleGeometryPackage::gpTest33(the_aContext,*the_Message);
1401 catch (Standard_Failure) {
1402 Standard_SStream Err;
1403 Err << Standard_Failure::Caught();
1405 jcas_ThrowException(env,Err.str().c_str());
1414 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest34 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1417 jcas_Locking alock(env);
1420 Handle( AIS_InteractiveContext ) the_aContext;
1421 void* ptr_aContext = jcas_GetHandle(env,aContext);
1423 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1425 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1426 if ( the_Message == NULL ) {
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");
1436 SampleGeometryPackage::gpTest34(the_aContext,*the_Message);
1439 catch (Standard_Failure) {
1440 Standard_SStream Err;
1441 Err << Standard_Failure::Caught();
1443 jcas_ThrowException(env,Err.str().c_str());
1452 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest35 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1455 jcas_Locking alock(env);
1458 Handle( AIS_InteractiveContext ) the_aContext;
1459 void* ptr_aContext = jcas_GetHandle(env,aContext);
1461 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1463 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1464 if ( the_Message == NULL ) {
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");
1474 SampleGeometryPackage::gpTest35(the_aContext,*the_Message);
1477 catch (Standard_Failure) {
1478 Standard_SStream Err;
1479 Err << Standard_Failure::Caught();
1481 jcas_ThrowException(env,Err.str().c_str());
1490 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest36 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1493 jcas_Locking alock(env);
1496 Handle( AIS_InteractiveContext ) the_aContext;
1497 void* ptr_aContext = jcas_GetHandle(env,aContext);
1499 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1501 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1502 if ( the_Message == NULL ) {
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");
1512 SampleGeometryPackage::gpTest36(the_aContext,*the_Message);
1515 catch (Standard_Failure) {
1516 Standard_SStream Err;
1517 Err << Standard_Failure::Caught();
1519 jcas_ThrowException(env,Err.str().c_str());
1528 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest37 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1531 jcas_Locking alock(env);
1534 Handle( AIS_InteractiveContext ) the_aContext;
1535 void* ptr_aContext = jcas_GetHandle(env,aContext);
1537 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1539 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1540 if ( the_Message == NULL ) {
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");
1550 SampleGeometryPackage::gpTest37(the_aContext,*the_Message);
1553 catch (Standard_Failure) {
1554 Standard_SStream Err;
1555 Err << Standard_Failure::Caught();
1557 jcas_ThrowException(env,Err.str().c_str());
1566 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest38 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1569 jcas_Locking alock(env);
1572 Handle( AIS_InteractiveContext ) the_aContext;
1573 void* ptr_aContext = jcas_GetHandle(env,aContext);
1575 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1577 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1578 if ( the_Message == NULL ) {
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");
1588 SampleGeometryPackage::gpTest38(the_aContext,*the_Message);
1591 catch (Standard_Failure) {
1592 Standard_SStream Err;
1593 Err << Standard_Failure::Caught();
1595 jcas_ThrowException(env,Err.str().c_str());
1604 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest39 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1607 jcas_Locking alock(env);
1610 Handle( AIS_InteractiveContext ) the_aContext;
1611 void* ptr_aContext = jcas_GetHandle(env,aContext);
1613 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1615 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1616 if ( the_Message == NULL ) {
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");
1626 SampleGeometryPackage::gpTest39(the_aContext,*the_Message);
1629 catch (Standard_Failure) {
1630 Standard_SStream Err;
1631 Err << Standard_Failure::Caught();
1633 jcas_ThrowException(env,Err.str().c_str());
1642 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest40 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1645 jcas_Locking alock(env);
1648 Handle( AIS_InteractiveContext ) the_aContext;
1649 void* ptr_aContext = jcas_GetHandle(env,aContext);
1651 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1653 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1654 if ( the_Message == NULL ) {
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");
1664 SampleGeometryPackage::gpTest40(the_aContext,*the_Message);
1667 catch (Standard_Failure) {
1668 Standard_SStream Err;
1669 Err << Standard_Failure::Caught();
1671 jcas_ThrowException(env,Err.str().c_str());
1680 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest41 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1683 jcas_Locking alock(env);
1686 Handle( AIS_InteractiveContext ) the_aContext;
1687 void* ptr_aContext = jcas_GetHandle(env,aContext);
1689 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1691 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1692 if ( the_Message == NULL ) {
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");
1702 SampleGeometryPackage::gpTest41(the_aContext,*the_Message);
1705 catch (Standard_Failure) {
1706 Standard_SStream Err;
1707 Err << Standard_Failure::Caught();
1709 jcas_ThrowException(env,Err.str().c_str());
1718 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest42 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1721 jcas_Locking alock(env);
1724 Handle( AIS_InteractiveContext ) the_aContext;
1725 void* ptr_aContext = jcas_GetHandle(env,aContext);
1727 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1729 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1730 if ( the_Message == NULL ) {
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");
1740 SampleGeometryPackage::gpTest42(the_aContext,*the_Message);
1743 catch (Standard_Failure) {
1744 Standard_SStream Err;
1745 Err << Standard_Failure::Caught();
1747 jcas_ThrowException(env,Err.str().c_str());
1756 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest43 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1759 jcas_Locking alock(env);
1762 Handle( AIS_InteractiveContext ) the_aContext;
1763 void* ptr_aContext = jcas_GetHandle(env,aContext);
1765 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1767 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1768 if ( the_Message == NULL ) {
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");
1778 SampleGeometryPackage::gpTest43(the_aContext,*the_Message);
1781 catch (Standard_Failure) {
1782 Standard_SStream Err;
1783 Err << Standard_Failure::Caught();
1785 jcas_ThrowException(env,Err.str().c_str());
1794 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest44 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1797 jcas_Locking alock(env);
1800 Handle( AIS_InteractiveContext ) the_aContext;
1801 void* ptr_aContext = jcas_GetHandle(env,aContext);
1803 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1805 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1806 if ( the_Message == NULL ) {
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");
1816 SampleGeometryPackage::gpTest44(the_aContext,*the_Message);
1819 catch (Standard_Failure) {
1820 Standard_SStream Err;
1821 Err << Standard_Failure::Caught();
1823 jcas_ThrowException(env,Err.str().c_str());
1832 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest45 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1835 jcas_Locking alock(env);
1838 Handle( AIS_InteractiveContext ) the_aContext;
1839 void* ptr_aContext = jcas_GetHandle(env,aContext);
1841 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1843 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1844 if ( the_Message == NULL ) {
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");
1854 SampleGeometryPackage::gpTest45(the_aContext,*the_Message);
1857 catch (Standard_Failure) {
1858 Standard_SStream Err;
1859 Err << Standard_Failure::Caught();
1861 jcas_ThrowException(env,Err.str().c_str());
1870 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest46 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1873 jcas_Locking alock(env);
1876 Handle( AIS_InteractiveContext ) the_aContext;
1877 void* ptr_aContext = jcas_GetHandle(env,aContext);
1879 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1881 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1882 if ( the_Message == NULL ) {
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");
1892 SampleGeometryPackage::gpTest46(the_aContext,*the_Message);
1895 catch (Standard_Failure) {
1896 Standard_SStream Err;
1897 Err << Standard_Failure::Caught();
1899 jcas_ThrowException(env,Err.str().c_str());
1908 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest47 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1911 jcas_Locking alock(env);
1914 Handle( AIS_InteractiveContext ) the_aContext;
1915 void* ptr_aContext = jcas_GetHandle(env,aContext);
1917 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1919 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1920 if ( the_Message == NULL ) {
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");
1930 SampleGeometryPackage::gpTest47(the_aContext,*the_Message);
1933 catch (Standard_Failure) {
1934 Standard_SStream Err;
1935 Err << Standard_Failure::Caught();
1937 jcas_ThrowException(env,Err.str().c_str());
1946 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest48 (JNIEnv *env, jclass, jobject aContext2D, jobject Message)
1949 jcas_Locking alock(env);
1952 Handle( ISession2D_InteractiveContext ) the_aContext2D;
1953 void* ptr_aContext2D = jcas_GetHandle(env,aContext2D);
1955 if ( ptr_aContext2D != NULL ) the_aContext2D = *( ( Handle( ISession2D_InteractiveContext )* )ptr_aContext2D );
1957 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1958 if ( the_Message == NULL ) {
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");
1968 SampleGeometryPackage::gpTest48(the_aContext2D,*the_Message);
1971 catch (Standard_Failure) {
1972 Standard_SStream Err;
1973 Err << Standard_Failure::Caught();
1975 jcas_ThrowException(env,Err.str().c_str());
1984 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest49 (JNIEnv *env, jclass, jobject aContext, jobject Message)
1987 jcas_Locking alock(env);
1990 Handle( AIS_InteractiveContext ) the_aContext;
1991 void* ptr_aContext = jcas_GetHandle(env,aContext);
1993 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
1995 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
1996 if ( the_Message == NULL ) {
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");
2006 SampleGeometryPackage::gpTest49(the_aContext,*the_Message);
2009 catch (Standard_Failure) {
2010 Standard_SStream Err;
2011 Err << Standard_Failure::Caught();
2013 jcas_ThrowException(env,Err.str().c_str());
2022 JNIEXPORT void JNICALL Java_SampleGeometryJni_SampleGeometryPackage_gpTest50 (JNIEnv *env, jclass, jobject aContext, jobject Message)
2025 jcas_Locking alock(env);
2028 Handle( AIS_InteractiveContext ) the_aContext;
2029 void* ptr_aContext = jcas_GetHandle(env,aContext);
2031 if ( ptr_aContext != NULL ) the_aContext = *( ( Handle( AIS_InteractiveContext )* )ptr_aContext );
2033 TCollection_AsciiString* the_Message = (TCollection_AsciiString*) jcas_GetHandle(env,Message);
2034 if ( the_Message == NULL ) {
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");
2044 SampleGeometryPackage::gpTest50(the_aContext,*the_Message);
2047 catch (Standard_Failure) {
2048 Standard_SStream Err;
2049 Err << Standard_Failure::Caught();
2051 jcas_ThrowException(env,Err.str().c_str());
2060 JNIEXPORT jboolean JNICALL Java_SampleGeometryJni_SampleGeometryPackage_SaveImage (JNIEnv *env, jclass, jobject aFileName, jobject aFormat, jobject aView)
2064 jcas_Locking alock(env);
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);
2072 if ( ptr_aView != NULL ) the_aView = *( ( Handle( V3d_View )* )ptr_aView );
2074 thejret = SampleGeometryPackage::SaveImage(the_aFileName,the_aFormat,the_aView);
2077 catch (Standard_Failure) {
2078 Standard_SStream Err;
2079 Err << Standard_Failure::Caught();
2081 jcas_ThrowException(env,Err.str().c_str());