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
21 #include <CASCADESamplesJni_TCollection_AsciiString.h>
22 #include <TCollection_AsciiString.hxx>
25 #include <Standard_ErrorHandler.hxx>
26 #include <Standard_Failure.hxx>
27 #include <Standard_SStream.hxx>
29 #include <Standard_CString.hxx>
30 #include <Standard_Integer.hxx>
31 #include <Standard_Character.hxx>
32 #include <Standard_Real.hxx>
33 #include <TCollection_ExtendedString.hxx>
34 #include <Standard_Boolean.hxx>
40 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Create_11 (JNIEnv *env, jobject theobj)
43 jcas_Locking alock(env);
46 TCollection_AsciiString* theret = new TCollection_AsciiString();
47 jcas_SetHandle(env,theobj,theret);
50 catch (Standard_Failure) {
52 Err << Standard_Failure::Caught();
54 jcas_ThrowException(env,Err.str().c_str());
63 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Create_12 (JNIEnv *env, jobject theobj, jobject message)
66 jcas_Locking alock(env);
69 Standard_CString the_message = jcas_ConvertToCString(env,message);
70 TCollection_AsciiString* theret = new TCollection_AsciiString(the_message);
71 jcas_SetHandle(env,theobj,theret);
74 catch (Standard_Failure) {
76 Err << Standard_Failure::Caught();
78 jcas_ThrowException(env,Err.str().c_str());
87 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Create_13 (JNIEnv *env, jobject theobj, jobject message, jint aLen)
90 jcas_Locking alock(env);
93 Standard_CString the_message = jcas_ConvertToCString(env,message);
94 TCollection_AsciiString* theret = new TCollection_AsciiString(the_message,(Standard_Integer) aLen);
95 jcas_SetHandle(env,theobj,theret);
98 catch (Standard_Failure) {
100 Err << Standard_Failure::Caught();
102 jcas_ThrowException(env,Err.str().c_str());
111 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Create_14 (JNIEnv *env, jobject theobj, jobject aChar)
114 jcas_Locking alock(env);
117 Standard_Character the_aChar = jcas_GetCharacter(env,aChar);
118 TCollection_AsciiString* theret = new TCollection_AsciiString(the_aChar);
119 jcas_SetHandle(env,theobj,theret);
122 catch (Standard_Failure) {
123 Standard_SStream Err;
124 Err << Standard_Failure::Caught();
126 jcas_ThrowException(env,Err.str().c_str());
135 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Create_15 (JNIEnv *env, jobject theobj, jint length, jobject filler)
138 jcas_Locking alock(env);
141 Standard_Character the_filler = jcas_GetCharacter(env,filler);
142 TCollection_AsciiString* theret = new TCollection_AsciiString((Standard_Integer) length,the_filler);
143 jcas_SetHandle(env,theobj,theret);
146 catch (Standard_Failure) {
147 Standard_SStream Err;
148 Err << Standard_Failure::Caught();
150 jcas_ThrowException(env,Err.str().c_str());
159 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Create_16 (JNIEnv *env, jobject theobj, jint value)
162 jcas_Locking alock(env);
165 TCollection_AsciiString* theret = new TCollection_AsciiString((Standard_Integer) value);
166 jcas_SetHandle(env,theobj,theret);
169 catch (Standard_Failure) {
170 Standard_SStream Err;
171 Err << Standard_Failure::Caught();
173 jcas_ThrowException(env,Err.str().c_str());
182 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Create_17 (JNIEnv *env, jobject theobj, jdouble value)
185 jcas_Locking alock(env);
188 TCollection_AsciiString* theret = new TCollection_AsciiString((Standard_Real) value);
189 jcas_SetHandle(env,theobj,theret);
192 catch (Standard_Failure) {
193 Standard_SStream Err;
194 Err << Standard_Failure::Caught();
196 jcas_ThrowException(env,Err.str().c_str());
205 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Create_18 (JNIEnv *env, jobject theobj, jobject astring)
208 jcas_Locking alock(env);
211 TCollection_AsciiString* the_astring = (TCollection_AsciiString*) jcas_GetHandle(env,astring);
212 if ( the_astring == NULL ) {
214 // The following assumes availability of the default constructor (what may not
215 // always be the case). Therefore explicit exception is thrown if the null
216 // object has been passed.
217 // the_astring = new TCollection_AsciiString ();
218 // jcas_SetHandle ( env, astring, the_astring );
219 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
222 TCollection_AsciiString* theret = new TCollection_AsciiString(*the_astring);
223 jcas_SetHandle(env,theobj,theret);
226 catch (Standard_Failure) {
227 Standard_SStream Err;
228 Err << Standard_Failure::Caught();
230 jcas_ThrowException(env,Err.str().c_str());
239 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Create_19 (JNIEnv *env, jobject theobj, jobject astring, jobject message)
242 jcas_Locking alock(env);
245 TCollection_AsciiString* the_astring = (TCollection_AsciiString*) jcas_GetHandle(env,astring);
246 if ( the_astring == NULL ) {
248 // The following assumes availability of the default constructor (what may not
249 // always be the case). Therefore explicit exception is thrown if the null
250 // object has been passed.
251 // the_astring = new TCollection_AsciiString ();
252 // jcas_SetHandle ( env, astring, the_astring );
253 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
256 Standard_Character the_message = jcas_GetCharacter(env,message);
257 TCollection_AsciiString* theret = new TCollection_AsciiString(*the_astring,the_message);
258 jcas_SetHandle(env,theobj,theret);
261 catch (Standard_Failure) {
262 Standard_SStream Err;
263 Err << Standard_Failure::Caught();
265 jcas_ThrowException(env,Err.str().c_str());
274 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Create_110 (JNIEnv *env, jobject theobj, jobject astring, jobject message)
277 jcas_Locking alock(env);
280 TCollection_AsciiString* the_astring = (TCollection_AsciiString*) jcas_GetHandle(env,astring);
281 if ( the_astring == 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_astring = new TCollection_AsciiString ();
287 // jcas_SetHandle ( env, astring, the_astring );
288 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
291 Standard_CString the_message = jcas_ConvertToCString(env,message);
292 TCollection_AsciiString* theret = new TCollection_AsciiString(*the_astring,the_message);
293 jcas_SetHandle(env,theobj,theret);
296 catch (Standard_Failure) {
297 Standard_SStream Err;
298 Err << Standard_Failure::Caught();
300 jcas_ThrowException(env,Err.str().c_str());
309 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Create_111 (JNIEnv *env, jobject theobj, jobject astring, jobject message)
312 jcas_Locking alock(env);
315 TCollection_AsciiString* the_astring = (TCollection_AsciiString*) jcas_GetHandle(env,astring);
316 if ( the_astring == NULL ) {
318 // The following assumes availability of the default constructor (what may not
319 // always be the case). Therefore explicit exception is thrown if the null
320 // object has been passed.
321 // the_astring = new TCollection_AsciiString ();
322 // jcas_SetHandle ( env, astring, the_astring );
323 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
326 TCollection_AsciiString* the_message = (TCollection_AsciiString*) jcas_GetHandle(env,message);
327 if ( the_message == NULL ) {
329 // The following assumes availability of the default constructor (what may not
330 // always be the case). Therefore explicit exception is thrown if the null
331 // object has been passed.
332 // the_message = new TCollection_AsciiString ();
333 // jcas_SetHandle ( env, message, the_message );
334 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
337 TCollection_AsciiString* theret = new TCollection_AsciiString(*the_astring,*the_message);
338 jcas_SetHandle(env,theobj,theret);
341 catch (Standard_Failure) {
342 Standard_SStream Err;
343 Err << Standard_Failure::Caught();
345 jcas_ThrowException(env,Err.str().c_str());
354 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Create_112 (JNIEnv *env, jobject theobj, jobject astring)
357 jcas_Locking alock(env);
360 TCollection_ExtendedString* the_astring = (TCollection_ExtendedString*) jcas_GetHandle(env,astring);
361 if ( the_astring == NULL ) {
363 // The following assumes availability of the default constructor (what may not
364 // always be the case). Therefore explicit exception is thrown if the null
365 // object has been passed.
366 // the_astring = new TCollection_ExtendedString ();
367 // jcas_SetHandle ( env, astring, the_astring );
368 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
371 TCollection_AsciiString* theret = new TCollection_AsciiString(*the_astring);
372 jcas_SetHandle(env,theobj,theret);
375 catch (Standard_Failure) {
376 Standard_SStream Err;
377 Err << Standard_Failure::Caught();
379 jcas_ThrowException(env,Err.str().c_str());
388 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1AssignCat_11 (JNIEnv *env, jobject theobj, jobject other)
391 jcas_Locking alock(env);
394 Standard_Character the_other = jcas_GetCharacter(env,other);
395 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
396 the_this->AssignCat(the_other);
399 catch (Standard_Failure) {
400 Standard_SStream Err;
401 Err << Standard_Failure::Caught();
403 jcas_ThrowException(env,Err.str().c_str());
412 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1AssignCat_12 (JNIEnv *env, jobject theobj, jint other)
415 jcas_Locking alock(env);
418 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
419 the_this->AssignCat((Standard_Integer) other);
422 catch (Standard_Failure) {
423 Standard_SStream Err;
424 Err << Standard_Failure::Caught();
426 jcas_ThrowException(env,Err.str().c_str());
435 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1AssignCat_13 (JNIEnv *env, jobject theobj, jdouble other)
438 jcas_Locking alock(env);
441 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
442 the_this->AssignCat((Standard_Real) other);
445 catch (Standard_Failure) {
446 Standard_SStream Err;
447 Err << Standard_Failure::Caught();
449 jcas_ThrowException(env,Err.str().c_str());
458 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1AssignCat_14 (JNIEnv *env, jobject theobj, jobject other)
461 jcas_Locking alock(env);
464 Standard_CString the_other = jcas_ConvertToCString(env,other);
465 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
466 the_this->AssignCat(the_other);
469 catch (Standard_Failure) {
470 Standard_SStream Err;
471 Err << Standard_Failure::Caught();
473 jcas_ThrowException(env,Err.str().c_str());
482 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1AssignCat_15 (JNIEnv *env, jobject theobj, jobject other)
485 jcas_Locking alock(env);
488 TCollection_AsciiString* the_other = (TCollection_AsciiString*) jcas_GetHandle(env,other);
489 if ( the_other == NULL ) {
491 // The following assumes availability of the default constructor (what may not
492 // always be the case). Therefore explicit exception is thrown if the null
493 // object has been passed.
494 // the_other = new TCollection_AsciiString ();
495 // jcas_SetHandle ( env, other, the_other );
496 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
499 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
500 the_this->AssignCat(*the_other);
503 catch (Standard_Failure) {
504 Standard_SStream Err;
505 Err << Standard_Failure::Caught();
507 jcas_ThrowException(env,Err.str().c_str());
516 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_Capitalize (JNIEnv *env, jobject theobj)
519 jcas_Locking alock(env);
522 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
523 the_this->Capitalize();
526 catch (Standard_Failure) {
527 Standard_SStream Err;
528 Err << Standard_Failure::Caught();
530 jcas_ThrowException(env,Err.str().c_str());
539 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Cat_11 (JNIEnv *env, jobject theobj, jobject other)
543 jcas_Locking alock(env);
546 Standard_Character the_other = jcas_GetCharacter(env,other);
547 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
548 TCollection_AsciiString* theret = new TCollection_AsciiString(the_this->Cat(the_other));
549 thejret = jcas_CreateObject(env,"CASCADESamplesJni/TCollection_AsciiString",theret);
552 catch (Standard_Failure) {
553 Standard_SStream Err;
554 Err << Standard_Failure::Caught();
556 jcas_ThrowException(env,Err.str().c_str());
565 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Cat_12 (JNIEnv *env, jobject theobj, jint other)
569 jcas_Locking alock(env);
572 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
573 TCollection_AsciiString* theret = new TCollection_AsciiString(the_this->Cat((Standard_Integer) other));
574 thejret = jcas_CreateObject(env,"CASCADESamplesJni/TCollection_AsciiString",theret);
577 catch (Standard_Failure) {
578 Standard_SStream Err;
579 Err << Standard_Failure::Caught();
581 jcas_ThrowException(env,Err.str().c_str());
590 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Cat_13 (JNIEnv *env, jobject theobj, jdouble other)
594 jcas_Locking alock(env);
597 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
598 TCollection_AsciiString* theret = new TCollection_AsciiString(the_this->Cat((Standard_Real) other));
599 thejret = jcas_CreateObject(env,"CASCADESamplesJni/TCollection_AsciiString",theret);
602 catch (Standard_Failure) {
603 Standard_SStream Err;
604 Err << Standard_Failure::Caught();
606 jcas_ThrowException(env,Err.str().c_str());
615 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Cat_14 (JNIEnv *env, jobject theobj, jobject other)
619 jcas_Locking alock(env);
622 Standard_CString the_other = jcas_ConvertToCString(env,other);
623 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
624 TCollection_AsciiString* theret = new TCollection_AsciiString(the_this->Cat(the_other));
625 thejret = jcas_CreateObject(env,"CASCADESamplesJni/TCollection_AsciiString",theret);
628 catch (Standard_Failure) {
629 Standard_SStream Err;
630 Err << Standard_Failure::Caught();
632 jcas_ThrowException(env,Err.str().c_str());
641 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Cat_15 (JNIEnv *env, jobject theobj, jobject other)
645 jcas_Locking alock(env);
648 TCollection_AsciiString* the_other = (TCollection_AsciiString*) jcas_GetHandle(env,other);
649 if ( the_other == NULL ) {
651 // The following assumes availability of the default constructor (what may not
652 // always be the case). Therefore explicit exception is thrown if the null
653 // object has been passed.
654 // the_other = new TCollection_AsciiString ();
655 // jcas_SetHandle ( env, other, the_other );
656 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
659 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
660 TCollection_AsciiString* theret = new TCollection_AsciiString(the_this->Cat(*the_other));
661 thejret = jcas_CreateObject(env,"CASCADESamplesJni/TCollection_AsciiString",theret);
664 catch (Standard_Failure) {
665 Standard_SStream Err;
666 Err << Standard_Failure::Caught();
668 jcas_ThrowException(env,Err.str().c_str());
677 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_Center (JNIEnv *env, jobject theobj, jint Width, jobject Filler)
680 jcas_Locking alock(env);
683 Standard_Character the_Filler = jcas_GetCharacter(env,Filler);
684 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
685 the_this->Center((Standard_Integer) Width,the_Filler);
688 catch (Standard_Failure) {
689 Standard_SStream Err;
690 Err << Standard_Failure::Caught();
692 jcas_ThrowException(env,Err.str().c_str());
701 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_ChangeAll (JNIEnv *env, jobject theobj, jobject aChar, jobject NewChar, jboolean CaseSensitive)
704 jcas_Locking alock(env);
707 Standard_Character the_aChar = jcas_GetCharacter(env,aChar);
708 Standard_Character the_NewChar = jcas_GetCharacter(env,NewChar);
709 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
710 the_this->ChangeAll(the_aChar,the_NewChar,(Standard_Boolean) CaseSensitive);
713 catch (Standard_Failure) {
714 Standard_SStream Err;
715 Err << Standard_Failure::Caught();
717 jcas_ThrowException(env,Err.str().c_str());
726 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_Clear (JNIEnv *env, jobject theobj)
729 jcas_Locking alock(env);
732 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
736 catch (Standard_Failure) {
737 Standard_SStream Err;
738 Err << Standard_Failure::Caught();
740 jcas_ThrowException(env,Err.str().c_str());
749 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Copy_11 (JNIEnv *env, jobject theobj, jobject fromwhere)
752 jcas_Locking alock(env);
755 Standard_CString the_fromwhere = jcas_ConvertToCString(env,fromwhere);
756 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
757 the_this->Copy(the_fromwhere);
760 catch (Standard_Failure) {
761 Standard_SStream Err;
762 Err << Standard_Failure::Caught();
764 jcas_ThrowException(env,Err.str().c_str());
773 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Copy_12 (JNIEnv *env, jobject theobj, jobject fromwhere)
776 jcas_Locking alock(env);
779 TCollection_AsciiString* the_fromwhere = (TCollection_AsciiString*) jcas_GetHandle(env,fromwhere);
780 if ( the_fromwhere == NULL ) {
782 // The following assumes availability of the default constructor (what may not
783 // always be the case). Therefore explicit exception is thrown if the null
784 // object has been passed.
785 // the_fromwhere = new TCollection_AsciiString ();
786 // jcas_SetHandle ( env, fromwhere, the_fromwhere );
787 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
790 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
791 the_this->Copy(*the_fromwhere);
794 catch (Standard_Failure) {
795 Standard_SStream Err;
796 Err << Standard_Failure::Caught();
798 jcas_ThrowException(env,Err.str().c_str());
807 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_Destroy (JNIEnv *env, jobject theobj)
810 jcas_Locking alock(env);
813 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
817 catch (Standard_Failure) {
818 Standard_SStream Err;
819 Err << Standard_Failure::Caught();
821 jcas_ThrowException(env,Err.str().c_str());
830 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_FirstLocationInSet (JNIEnv *env, jobject theobj, jobject Set, jint FromIndex, jint ToIndex)
834 jcas_Locking alock(env);
837 TCollection_AsciiString* the_Set = (TCollection_AsciiString*) jcas_GetHandle(env,Set);
838 if ( the_Set == NULL ) {
840 // The following assumes availability of the default constructor (what may not
841 // always be the case). Therefore explicit exception is thrown if the null
842 // object has been passed.
843 // the_Set = new TCollection_AsciiString ();
844 // jcas_SetHandle ( env, Set, the_Set );
845 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
848 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
849 thejret = the_this->FirstLocationInSet(*the_Set,(Standard_Integer) FromIndex,(Standard_Integer) ToIndex);
852 catch (Standard_Failure) {
853 Standard_SStream Err;
854 Err << Standard_Failure::Caught();
856 jcas_ThrowException(env,Err.str().c_str());
865 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_FirstLocationNotInSet (JNIEnv *env, jobject theobj, jobject Set, jint FromIndex, jint ToIndex)
869 jcas_Locking alock(env);
872 TCollection_AsciiString* the_Set = (TCollection_AsciiString*) jcas_GetHandle(env,Set);
873 if ( the_Set == NULL ) {
875 // The following assumes availability of the default constructor (what may not
876 // always be the case). Therefore explicit exception is thrown if the null
877 // object has been passed.
878 // the_Set = new TCollection_AsciiString ();
879 // jcas_SetHandle ( env, Set, the_Set );
880 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
883 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
884 thejret = the_this->FirstLocationNotInSet(*the_Set,(Standard_Integer) FromIndex,(Standard_Integer) ToIndex);
887 catch (Standard_Failure) {
888 Standard_SStream Err;
889 Err << Standard_Failure::Caught();
891 jcas_ThrowException(env,Err.str().c_str());
900 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Insert_11 (JNIEnv *env, jobject theobj, jint where, jobject what)
903 jcas_Locking alock(env);
906 Standard_Character the_what = jcas_GetCharacter(env,what);
907 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
908 the_this->Insert((Standard_Integer) where,the_what);
911 catch (Standard_Failure) {
912 Standard_SStream Err;
913 Err << Standard_Failure::Caught();
915 jcas_ThrowException(env,Err.str().c_str());
924 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Insert_12 (JNIEnv *env, jobject theobj, jint where, jobject what)
927 jcas_Locking alock(env);
930 Standard_CString the_what = jcas_ConvertToCString(env,what);
931 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
932 the_this->Insert((Standard_Integer) where,the_what);
935 catch (Standard_Failure) {
936 Standard_SStream Err;
937 Err << Standard_Failure::Caught();
939 jcas_ThrowException(env,Err.str().c_str());
948 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Insert_13 (JNIEnv *env, jobject theobj, jint where, jobject what)
951 jcas_Locking alock(env);
954 TCollection_AsciiString* the_what = (TCollection_AsciiString*) jcas_GetHandle(env,what);
955 if ( the_what == NULL ) {
957 // The following assumes availability of the default constructor (what may not
958 // always be the case). Therefore explicit exception is thrown if the null
959 // object has been passed.
960 // the_what = new TCollection_AsciiString ();
961 // jcas_SetHandle ( env, what, the_what );
962 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
965 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
966 the_this->Insert((Standard_Integer) where,*the_what);
969 catch (Standard_Failure) {
970 Standard_SStream Err;
971 Err << Standard_Failure::Caught();
973 jcas_ThrowException(env,Err.str().c_str());
982 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_InsertAfter (JNIEnv *env, jobject theobj, jint Index, jobject other)
985 jcas_Locking alock(env);
988 TCollection_AsciiString* the_other = (TCollection_AsciiString*) jcas_GetHandle(env,other);
989 if ( the_other == NULL ) {
991 // The following assumes availability of the default constructor (what may not
992 // always be the case). Therefore explicit exception is thrown if the null
993 // object has been passed.
994 // the_other = new TCollection_AsciiString ();
995 // jcas_SetHandle ( env, other, the_other );
996 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
999 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1000 the_this->InsertAfter((Standard_Integer) Index,*the_other);
1003 catch (Standard_Failure) {
1004 Standard_SStream Err;
1005 Err << Standard_Failure::Caught();
1007 jcas_ThrowException(env,Err.str().c_str());
1016 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_InsertBefore (JNIEnv *env, jobject theobj, jint Index, jobject other)
1019 jcas_Locking alock(env);
1022 TCollection_AsciiString* the_other = (TCollection_AsciiString*) jcas_GetHandle(env,other);
1023 if ( the_other == NULL ) {
1025 // The following assumes availability of the default constructor (what may not
1026 // always be the case). Therefore explicit exception is thrown if the null
1027 // object has been passed.
1028 // the_other = new TCollection_AsciiString ();
1029 // jcas_SetHandle ( env, other, the_other );
1030 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1033 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1034 the_this->InsertBefore((Standard_Integer) Index,*the_other);
1037 catch (Standard_Failure) {
1038 Standard_SStream Err;
1039 Err << Standard_Failure::Caught();
1041 jcas_ThrowException(env,Err.str().c_str());
1050 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_IsEmpty (JNIEnv *env, jobject theobj)
1054 jcas_Locking alock(env);
1057 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1058 thejret = the_this->IsEmpty();
1061 catch (Standard_Failure) {
1062 Standard_SStream Err;
1063 Err << Standard_Failure::Caught();
1065 jcas_ThrowException(env,Err.str().c_str());
1074 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1IsEqual_11 (JNIEnv *env, jobject theobj, jobject other)
1078 jcas_Locking alock(env);
1081 Standard_CString the_other = jcas_ConvertToCString(env,other);
1082 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1083 thejret = the_this->IsEqual(the_other);
1086 catch (Standard_Failure) {
1087 Standard_SStream Err;
1088 Err << Standard_Failure::Caught();
1090 jcas_ThrowException(env,Err.str().c_str());
1099 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1IsEqual_12 (JNIEnv *env, jobject theobj, jobject other)
1103 jcas_Locking alock(env);
1106 TCollection_AsciiString* the_other = (TCollection_AsciiString*) jcas_GetHandle(env,other);
1107 if ( the_other == NULL ) {
1109 // The following assumes availability of the default constructor (what may not
1110 // always be the case). Therefore explicit exception is thrown if the null
1111 // object has been passed.
1112 // the_other = new TCollection_AsciiString ();
1113 // jcas_SetHandle ( env, other, the_other );
1114 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1117 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1118 thejret = the_this->IsEqual(*the_other);
1121 catch (Standard_Failure) {
1122 Standard_SStream Err;
1123 Err << Standard_Failure::Caught();
1125 jcas_ThrowException(env,Err.str().c_str());
1134 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1IsDifferent_11 (JNIEnv *env, jobject theobj, jobject other)
1138 jcas_Locking alock(env);
1141 Standard_CString the_other = jcas_ConvertToCString(env,other);
1142 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1143 thejret = the_this->IsDifferent(the_other);
1146 catch (Standard_Failure) {
1147 Standard_SStream Err;
1148 Err << Standard_Failure::Caught();
1150 jcas_ThrowException(env,Err.str().c_str());
1159 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1IsDifferent_12 (JNIEnv *env, jobject theobj, jobject other)
1163 jcas_Locking alock(env);
1166 TCollection_AsciiString* the_other = (TCollection_AsciiString*) jcas_GetHandle(env,other);
1167 if ( the_other == NULL ) {
1169 // The following assumes availability of the default constructor (what may not
1170 // always be the case). Therefore explicit exception is thrown if the null
1171 // object has been passed.
1172 // the_other = new TCollection_AsciiString ();
1173 // jcas_SetHandle ( env, other, the_other );
1174 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1177 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1178 thejret = the_this->IsDifferent(*the_other);
1181 catch (Standard_Failure) {
1182 Standard_SStream Err;
1183 Err << Standard_Failure::Caught();
1185 jcas_ThrowException(env,Err.str().c_str());
1194 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1IsLess_11 (JNIEnv *env, jobject theobj, jobject other)
1198 jcas_Locking alock(env);
1201 Standard_CString the_other = jcas_ConvertToCString(env,other);
1202 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1203 thejret = the_this->IsLess(the_other);
1206 catch (Standard_Failure) {
1207 Standard_SStream Err;
1208 Err << Standard_Failure::Caught();
1210 jcas_ThrowException(env,Err.str().c_str());
1219 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1IsLess_12 (JNIEnv *env, jobject theobj, jobject other)
1223 jcas_Locking alock(env);
1226 TCollection_AsciiString* the_other = (TCollection_AsciiString*) jcas_GetHandle(env,other);
1227 if ( the_other == NULL ) {
1229 // The following assumes availability of the default constructor (what may not
1230 // always be the case). Therefore explicit exception is thrown if the null
1231 // object has been passed.
1232 // the_other = new TCollection_AsciiString ();
1233 // jcas_SetHandle ( env, other, the_other );
1234 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1237 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1238 thejret = the_this->IsLess(*the_other);
1241 catch (Standard_Failure) {
1242 Standard_SStream Err;
1243 Err << Standard_Failure::Caught();
1245 jcas_ThrowException(env,Err.str().c_str());
1254 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1IsGreater_11 (JNIEnv *env, jobject theobj, jobject other)
1258 jcas_Locking alock(env);
1261 Standard_CString the_other = jcas_ConvertToCString(env,other);
1262 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1263 thejret = the_this->IsGreater(the_other);
1266 catch (Standard_Failure) {
1267 Standard_SStream Err;
1268 Err << Standard_Failure::Caught();
1270 jcas_ThrowException(env,Err.str().c_str());
1279 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1IsGreater_12 (JNIEnv *env, jobject theobj, jobject other)
1283 jcas_Locking alock(env);
1286 TCollection_AsciiString* the_other = (TCollection_AsciiString*) jcas_GetHandle(env,other);
1287 if ( the_other == NULL ) {
1289 // The following assumes availability of the default constructor (what may not
1290 // always be the case). Therefore explicit exception is thrown if the null
1291 // object has been passed.
1292 // the_other = new TCollection_AsciiString ();
1293 // jcas_SetHandle ( env, other, the_other );
1294 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1297 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1298 thejret = the_this->IsGreater(*the_other);
1301 catch (Standard_Failure) {
1302 Standard_SStream Err;
1303 Err << Standard_Failure::Caught();
1305 jcas_ThrowException(env,Err.str().c_str());
1314 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_IntegerValue (JNIEnv *env, jobject theobj)
1318 jcas_Locking alock(env);
1321 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1322 thejret = the_this->IntegerValue();
1325 catch (Standard_Failure) {
1326 Standard_SStream Err;
1327 Err << Standard_Failure::Caught();
1329 jcas_ThrowException(env,Err.str().c_str());
1338 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_IsIntegerValue (JNIEnv *env, jobject theobj)
1342 jcas_Locking alock(env);
1345 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1346 thejret = the_this->IsIntegerValue();
1349 catch (Standard_Failure) {
1350 Standard_SStream Err;
1351 Err << Standard_Failure::Caught();
1353 jcas_ThrowException(env,Err.str().c_str());
1362 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_IsRealValue (JNIEnv *env, jobject theobj)
1366 jcas_Locking alock(env);
1369 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1370 thejret = the_this->IsRealValue();
1373 catch (Standard_Failure) {
1374 Standard_SStream Err;
1375 Err << Standard_Failure::Caught();
1377 jcas_ThrowException(env,Err.str().c_str());
1386 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_IsAscii (JNIEnv *env, jobject theobj)
1390 jcas_Locking alock(env);
1393 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1394 thejret = the_this->IsAscii();
1397 catch (Standard_Failure) {
1398 Standard_SStream Err;
1399 Err << Standard_Failure::Caught();
1401 jcas_ThrowException(env,Err.str().c_str());
1410 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_LeftAdjust (JNIEnv *env, jobject theobj)
1413 jcas_Locking alock(env);
1416 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1417 the_this->LeftAdjust();
1420 catch (Standard_Failure) {
1421 Standard_SStream Err;
1422 Err << Standard_Failure::Caught();
1424 jcas_ThrowException(env,Err.str().c_str());
1433 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_LeftJustify (JNIEnv *env, jobject theobj, jint Width, jobject Filler)
1436 jcas_Locking alock(env);
1439 Standard_Character the_Filler = jcas_GetCharacter(env,Filler);
1440 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1441 the_this->LeftJustify((Standard_Integer) Width,the_Filler);
1444 catch (Standard_Failure) {
1445 Standard_SStream Err;
1446 Err << Standard_Failure::Caught();
1448 jcas_ThrowException(env,Err.str().c_str());
1457 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_Length (JNIEnv *env, jobject theobj)
1461 jcas_Locking alock(env);
1464 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1465 thejret = the_this->Length();
1468 catch (Standard_Failure) {
1469 Standard_SStream Err;
1470 Err << Standard_Failure::Caught();
1472 jcas_ThrowException(env,Err.str().c_str());
1481 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Location_11 (JNIEnv *env, jobject theobj, jobject other, jint FromIndex, jint ToIndex)
1485 jcas_Locking alock(env);
1488 TCollection_AsciiString* the_other = (TCollection_AsciiString*) jcas_GetHandle(env,other);
1489 if ( the_other == NULL ) {
1491 // The following assumes availability of the default constructor (what may not
1492 // always be the case). Therefore explicit exception is thrown if the null
1493 // object has been passed.
1494 // the_other = new TCollection_AsciiString ();
1495 // jcas_SetHandle ( env, other, the_other );
1496 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1499 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1500 thejret = the_this->Location(*the_other,(Standard_Integer) FromIndex,(Standard_Integer) ToIndex);
1503 catch (Standard_Failure) {
1504 Standard_SStream Err;
1505 Err << Standard_Failure::Caught();
1507 jcas_ThrowException(env,Err.str().c_str());
1516 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Location_12 (JNIEnv *env, jobject theobj, jint N, jobject C, jint FromIndex, jint ToIndex)
1520 jcas_Locking alock(env);
1523 Standard_Character the_C = jcas_GetCharacter(env,C);
1524 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1525 thejret = the_this->Location((Standard_Integer) N,the_C,(Standard_Integer) FromIndex,(Standard_Integer) ToIndex);
1528 catch (Standard_Failure) {
1529 Standard_SStream Err;
1530 Err << Standard_Failure::Caught();
1532 jcas_ThrowException(env,Err.str().c_str());
1541 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_LowerCase (JNIEnv *env, jobject theobj)
1544 jcas_Locking alock(env);
1547 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1548 the_this->LowerCase();
1551 catch (Standard_Failure) {
1552 Standard_SStream Err;
1553 Err << Standard_Failure::Caught();
1555 jcas_ThrowException(env,Err.str().c_str());
1564 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_Prepend (JNIEnv *env, jobject theobj, jobject other)
1567 jcas_Locking alock(env);
1570 TCollection_AsciiString* the_other = (TCollection_AsciiString*) jcas_GetHandle(env,other);
1571 if ( the_other == NULL ) {
1573 // The following assumes availability of the default constructor (what may not
1574 // always be the case). Therefore explicit exception is thrown if the null
1575 // object has been passed.
1576 // the_other = new TCollection_AsciiString ();
1577 // jcas_SetHandle ( env, other, the_other );
1578 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1581 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1582 the_this->Prepend(*the_other);
1585 catch (Standard_Failure) {
1586 Standard_SStream Err;
1587 Err << Standard_Failure::Caught();
1589 jcas_ThrowException(env,Err.str().c_str());
1598 JNIEXPORT jdouble JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_RealValue (JNIEnv *env, jobject theobj)
1602 jcas_Locking alock(env);
1605 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1606 thejret = the_this->RealValue();
1609 catch (Standard_Failure) {
1610 Standard_SStream Err;
1611 Err << Standard_Failure::Caught();
1613 jcas_ThrowException(env,Err.str().c_str());
1622 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1RemoveAll_11 (JNIEnv *env, jobject theobj, jobject C, jboolean CaseSensitive)
1625 jcas_Locking alock(env);
1628 Standard_Character the_C = jcas_GetCharacter(env,C);
1629 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1630 the_this->RemoveAll(the_C,(Standard_Boolean) CaseSensitive);
1633 catch (Standard_Failure) {
1634 Standard_SStream Err;
1635 Err << Standard_Failure::Caught();
1637 jcas_ThrowException(env,Err.str().c_str());
1646 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1RemoveAll_12 (JNIEnv *env, jobject theobj, jobject what)
1649 jcas_Locking alock(env);
1652 Standard_Character the_what = jcas_GetCharacter(env,what);
1653 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1654 the_this->RemoveAll(the_what);
1657 catch (Standard_Failure) {
1658 Standard_SStream Err;
1659 Err << Standard_Failure::Caught();
1661 jcas_ThrowException(env,Err.str().c_str());
1670 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_Remove (JNIEnv *env, jobject theobj, jint where, jint ahowmany)
1673 jcas_Locking alock(env);
1676 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1677 the_this->Remove((Standard_Integer) where,(Standard_Integer) ahowmany);
1680 catch (Standard_Failure) {
1681 Standard_SStream Err;
1682 Err << Standard_Failure::Caught();
1684 jcas_ThrowException(env,Err.str().c_str());
1693 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_RightAdjust (JNIEnv *env, jobject theobj)
1696 jcas_Locking alock(env);
1699 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1700 the_this->RightAdjust();
1703 catch (Standard_Failure) {
1704 Standard_SStream Err;
1705 Err << Standard_Failure::Caught();
1707 jcas_ThrowException(env,Err.str().c_str());
1716 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_RightJustify (JNIEnv *env, jobject theobj, jint Width, jobject Filler)
1719 jcas_Locking alock(env);
1722 Standard_Character the_Filler = jcas_GetCharacter(env,Filler);
1723 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1724 the_this->RightJustify((Standard_Integer) Width,the_Filler);
1727 catch (Standard_Failure) {
1728 Standard_SStream Err;
1729 Err << Standard_Failure::Caught();
1731 jcas_ThrowException(env,Err.str().c_str());
1740 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Search_11 (JNIEnv *env, jobject theobj, jobject what)
1744 jcas_Locking alock(env);
1747 Standard_CString the_what = jcas_ConvertToCString(env,what);
1748 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1749 thejret = the_this->Search(the_what);
1752 catch (Standard_Failure) {
1753 Standard_SStream Err;
1754 Err << Standard_Failure::Caught();
1756 jcas_ThrowException(env,Err.str().c_str());
1765 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Search_12 (JNIEnv *env, jobject theobj, jobject what)
1769 jcas_Locking alock(env);
1772 TCollection_AsciiString* the_what = (TCollection_AsciiString*) jcas_GetHandle(env,what);
1773 if ( the_what == NULL ) {
1775 // The following assumes availability of the default constructor (what may not
1776 // always be the case). Therefore explicit exception is thrown if the null
1777 // object has been passed.
1778 // the_what = new TCollection_AsciiString ();
1779 // jcas_SetHandle ( env, what, the_what );
1780 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1783 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1784 thejret = the_this->Search(*the_what);
1787 catch (Standard_Failure) {
1788 Standard_SStream Err;
1789 Err << Standard_Failure::Caught();
1791 jcas_ThrowException(env,Err.str().c_str());
1800 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1SearchFromEnd_11 (JNIEnv *env, jobject theobj, jobject what)
1804 jcas_Locking alock(env);
1807 Standard_CString the_what = jcas_ConvertToCString(env,what);
1808 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1809 thejret = the_this->SearchFromEnd(the_what);
1812 catch (Standard_Failure) {
1813 Standard_SStream Err;
1814 Err << Standard_Failure::Caught();
1816 jcas_ThrowException(env,Err.str().c_str());
1825 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1SearchFromEnd_12 (JNIEnv *env, jobject theobj, jobject what)
1829 jcas_Locking alock(env);
1832 TCollection_AsciiString* the_what = (TCollection_AsciiString*) jcas_GetHandle(env,what);
1833 if ( the_what == NULL ) {
1835 // The following assumes availability of the default constructor (what may not
1836 // always be the case). Therefore explicit exception is thrown if the null
1837 // object has been passed.
1838 // the_what = new TCollection_AsciiString ();
1839 // jcas_SetHandle ( env, what, the_what );
1840 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1843 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1844 thejret = the_this->SearchFromEnd(*the_what);
1847 catch (Standard_Failure) {
1848 Standard_SStream Err;
1849 Err << Standard_Failure::Caught();
1851 jcas_ThrowException(env,Err.str().c_str());
1860 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1SetValue_11 (JNIEnv *env, jobject theobj, jint where, jobject what)
1863 jcas_Locking alock(env);
1866 Standard_Character the_what = jcas_GetCharacter(env,what);
1867 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1868 the_this->SetValue((Standard_Integer) where,the_what);
1871 catch (Standard_Failure) {
1872 Standard_SStream Err;
1873 Err << Standard_Failure::Caught();
1875 jcas_ThrowException(env,Err.str().c_str());
1884 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1SetValue_12 (JNIEnv *env, jobject theobj, jint where, jobject what)
1887 jcas_Locking alock(env);
1890 Standard_CString the_what = jcas_ConvertToCString(env,what);
1891 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1892 the_this->SetValue((Standard_Integer) where,the_what);
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_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1SetValue_13 (JNIEnv *env, jobject theobj, jint where, jobject what)
1911 jcas_Locking alock(env);
1914 TCollection_AsciiString* the_what = (TCollection_AsciiString*) jcas_GetHandle(env,what);
1915 if ( the_what == NULL ) {
1917 // The following assumes availability of the default constructor (what may not
1918 // always be the case). Therefore explicit exception is thrown if the null
1919 // object has been passed.
1920 // the_what = new TCollection_AsciiString ();
1921 // jcas_SetHandle ( env, what, the_what );
1922 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1925 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1926 the_this->SetValue((Standard_Integer) where,*the_what);
1929 catch (Standard_Failure) {
1930 Standard_SStream Err;
1931 Err << Standard_Failure::Caught();
1933 jcas_ThrowException(env,Err.str().c_str());
1942 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Split_12 (JNIEnv *env, jobject theobj, jint where)
1946 jcas_Locking alock(env);
1949 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1950 TCollection_AsciiString* theret = new TCollection_AsciiString(the_this->Split((Standard_Integer) where));
1951 thejret = jcas_CreateObject(env,"CASCADESamplesJni/TCollection_AsciiString",theret);
1954 catch (Standard_Failure) {
1955 Standard_SStream Err;
1956 Err << Standard_Failure::Caught();
1958 jcas_ThrowException(env,Err.str().c_str());
1967 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1SubString_12 (JNIEnv *env, jobject theobj, jint FromIndex, jint ToIndex)
1971 jcas_Locking alock(env);
1974 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
1975 TCollection_AsciiString* theret = new TCollection_AsciiString(the_this->SubString((Standard_Integer) FromIndex,(Standard_Integer) ToIndex));
1976 thejret = jcas_CreateObject(env,"CASCADESamplesJni/TCollection_AsciiString",theret);
1979 catch (Standard_Failure) {
1980 Standard_SStream Err;
1981 Err << Standard_Failure::Caught();
1983 jcas_ThrowException(env,Err.str().c_str());
1992 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_ToCString (JNIEnv *env, jobject theobj)
1996 jcas_Locking alock(env);
1999 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
2000 Standard_CString sret = the_this->ToCString();
2001 jclass CLSret = env->FindClass("jcas/Standard_CString");
2002 thejret = env->AllocObject(CLSret);
2003 jcas_SetCStringValue(env,thejret,sret);
2006 catch (Standard_Failure) {
2007 Standard_SStream Err;
2008 Err << Standard_Failure::Caught();
2010 jcas_ThrowException(env,Err.str().c_str());
2019 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1Token_12 (JNIEnv *env, jobject theobj, jobject separators, jint whichone)
2023 jcas_Locking alock(env);
2026 Standard_CString the_separators = jcas_ConvertToCString(env,separators);
2027 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
2028 TCollection_AsciiString* theret = new TCollection_AsciiString(the_this->Token(the_separators,(Standard_Integer) whichone));
2029 thejret = jcas_CreateObject(env,"CASCADESamplesJni/TCollection_AsciiString",theret);
2032 catch (Standard_Failure) {
2033 Standard_SStream Err;
2034 Err << Standard_Failure::Caught();
2036 jcas_ThrowException(env,Err.str().c_str());
2045 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_Trunc (JNIEnv *env, jobject theobj, jint ahowmany)
2048 jcas_Locking alock(env);
2051 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
2052 the_this->Trunc((Standard_Integer) ahowmany);
2055 catch (Standard_Failure) {
2056 Standard_SStream Err;
2057 Err << Standard_Failure::Caught();
2059 jcas_ThrowException(env,Err.str().c_str());
2068 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_UpperCase (JNIEnv *env, jobject theobj)
2071 jcas_Locking alock(env);
2074 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
2075 the_this->UpperCase();
2078 catch (Standard_Failure) {
2079 Standard_SStream Err;
2080 Err << Standard_Failure::Caught();
2082 jcas_ThrowException(env,Err.str().c_str());
2091 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_UsefullLength (JNIEnv *env, jobject theobj)
2095 jcas_Locking alock(env);
2098 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
2099 thejret = the_this->UsefullLength();
2102 catch (Standard_Failure) {
2103 Standard_SStream Err;
2104 Err << Standard_Failure::Caught();
2106 jcas_ThrowException(env,Err.str().c_str());
2115 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_Value (JNIEnv *env, jobject theobj, jint where)
2119 jcas_Locking alock(env);
2122 TCollection_AsciiString* the_this = (TCollection_AsciiString*) jcas_GetHandle(env,theobj);
2123 Standard_Character *theret = ((Standard_Character *) malloc(sizeof(Standard_Character)));
2124 *theret = the_this->Value((Standard_Integer) where);
2125 thejret = jcas_CreateObject(env,"jcas/Standard_Character",theret);
2128 catch (Standard_Failure) {
2129 Standard_SStream Err;
2130 Err << Standard_Failure::Caught();
2132 jcas_ThrowException(env,Err.str().c_str());
2141 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_HashCode (JNIEnv *env, jclass, jobject astring, jint Upper)
2145 jcas_Locking alock(env);
2148 TCollection_AsciiString* the_astring = (TCollection_AsciiString*) jcas_GetHandle(env,astring);
2149 if ( the_astring == NULL ) {
2151 // The following assumes availability of the default constructor (what may not
2152 // always be the case). Therefore explicit exception is thrown if the null
2153 // object has been passed.
2154 // the_astring = new TCollection_AsciiString ();
2155 // jcas_SetHandle ( env, astring, the_astring );
2156 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
2159 thejret = TCollection_AsciiString::HashCode(*the_astring,(Standard_Integer) Upper);
2162 catch (Standard_Failure) {
2163 Standard_SStream Err;
2164 Err << Standard_Failure::Caught();
2166 jcas_ThrowException(env,Err.str().c_str());
2175 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1IsEqual_13 (JNIEnv *env, jclass, jobject string1, jobject string2)
2179 jcas_Locking alock(env);
2182 TCollection_AsciiString* the_string1 = (TCollection_AsciiString*) jcas_GetHandle(env,string1);
2183 if ( the_string1 == NULL ) {
2185 // The following assumes availability of the default constructor (what may not
2186 // always be the case). Therefore explicit exception is thrown if the null
2187 // object has been passed.
2188 // the_string1 = new TCollection_AsciiString ();
2189 // jcas_SetHandle ( env, string1, the_string1 );
2190 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
2193 TCollection_AsciiString* the_string2 = (TCollection_AsciiString*) jcas_GetHandle(env,string2);
2194 if ( the_string2 == NULL ) {
2196 // The following assumes availability of the default constructor (what may not
2197 // always be the case). Therefore explicit exception is thrown if the null
2198 // object has been passed.
2199 // the_string2 = new TCollection_AsciiString ();
2200 // jcas_SetHandle ( env, string2, the_string2 );
2201 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
2204 thejret = TCollection_AsciiString::IsEqual(*the_string1,*the_string2);
2207 catch (Standard_Failure) {
2208 Standard_SStream Err;
2209 Err << Standard_Failure::Caught();
2211 jcas_ThrowException(env,Err.str().c_str());
2220 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_TCollection_1AsciiString_1IsEqual_14 (JNIEnv *env, jclass, jobject string1, jobject string2)
2224 jcas_Locking alock(env);
2227 TCollection_AsciiString* the_string1 = (TCollection_AsciiString*) jcas_GetHandle(env,string1);
2228 if ( the_string1 == NULL ) {
2230 // The following assumes availability of the default constructor (what may not
2231 // always be the case). Therefore explicit exception is thrown if the null
2232 // object has been passed.
2233 // the_string1 = new TCollection_AsciiString ();
2234 // jcas_SetHandle ( env, string1, the_string1 );
2235 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
2238 Standard_CString the_string2 = jcas_ConvertToCString(env,string2);
2239 thejret = TCollection_AsciiString::IsEqual(*the_string1,the_string2);
2242 catch (Standard_Failure) {
2243 Standard_SStream Err;
2244 Err << Standard_Failure::Caught();
2246 jcas_ThrowException(env,Err.str().c_str());
2255 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_HASHCODE (JNIEnv *env, jclass, jobject astring, jint Upper)
2259 jcas_Locking alock(env);
2262 TCollection_AsciiString* the_astring = (TCollection_AsciiString*) jcas_GetHandle(env,astring);
2263 if ( the_astring == NULL ) {
2265 // The following assumes availability of the default constructor (what may not
2266 // always be the case). Therefore explicit exception is thrown if the null
2267 // object has been passed.
2268 // the_astring = new TCollection_AsciiString ();
2269 // jcas_SetHandle ( env, astring, the_astring );
2270 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
2273 thejret = TCollection_AsciiString::HASHCODE(*the_astring,(Standard_Integer) Upper);
2276 catch (Standard_Failure) {
2277 Standard_SStream Err;
2278 Err << Standard_Failure::Caught();
2280 jcas_ThrowException(env,Err.str().c_str());
2289 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_ISSIMILAR (JNIEnv *env, jclass, jobject string1, jobject string2)
2293 jcas_Locking alock(env);
2296 TCollection_AsciiString* the_string1 = (TCollection_AsciiString*) jcas_GetHandle(env,string1);
2297 if ( the_string1 == NULL ) {
2299 // The following assumes availability of the default constructor (what may not
2300 // always be the case). Therefore explicit exception is thrown if the null
2301 // object has been passed.
2302 // the_string1 = new TCollection_AsciiString ();
2303 // jcas_SetHandle ( env, string1, the_string1 );
2304 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
2307 TCollection_AsciiString* the_string2 = (TCollection_AsciiString*) jcas_GetHandle(env,string2);
2308 if ( the_string2 == NULL ) {
2310 // The following assumes availability of the default constructor (what may not
2311 // always be the case). Therefore explicit exception is thrown if the null
2312 // object has been passed.
2313 // the_string2 = new TCollection_AsciiString ();
2314 // jcas_SetHandle ( env, string2, the_string2 );
2315 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
2318 thejret = TCollection_AsciiString::ISSIMILAR(*the_string1,*the_string2);
2321 catch (Standard_Failure) {
2322 Standard_SStream Err;
2323 Err << Standard_Failure::Caught();
2325 jcas_ThrowException(env,Err.str().c_str());
2334 JNIEXPORT void JNICALL Java_CASCADESamplesJni_TCollection_1AsciiString_FinalizeValue(JNIEnv *, jclass, jlong theid)
2337 TCollection_AsciiString* theobj = (TCollection_AsciiString*) theid;