Adjusting testing cases for current state of OCCT
[occt.git] / samples / java / drv / CASCADESamplesJni / CASCADESamplesJni_Aspect_LineStyle_java.cxx
CommitLineData
7fd59977 1// Copyright (C) 1991,1995 by
2//
3// MATRA DATAVISION, FRANCE
4//
5// This software is furnished in accordance with the terms and conditions
6// of the contract and with the inclusion of the above copyright notice.
7// This software or any other copy thereof may not be provided or otherwise
8// be made available to any other person. No title to an ownership of the
9// software is hereby transferred.
10//
11// At the termination of the contract, the software and all copies of this
12// software must be deleted.
13
14#include <CASCADESamplesJni_Aspect_LineStyle.h>
15#include <Aspect_LineStyle.hxx>
16#include <jcas.hxx>
17#include <stdlib.h>
18#include <Standard_ErrorHandler.hxx>
19#include <Standard_SStream.hxx>
20
21#include <Aspect_TypeOfLine.hxx>
22#include <TColQuantity_Array1OfLength.hxx>
23#include <Standard_Integer.hxx>
24#include <Standard_Boolean.hxx>
25
26
27extern "C" {
28
29
30JNIEXPORT void JNICALL Java_CASCADESamplesJni_Aspect_1LineStyle_Aspect_1LineStyle_1Create_11 (JNIEnv *env, jobject theobj)
31{
32
33jcas_Locking alock(env);
34{
35try {
36Aspect_LineStyle* theret = new Aspect_LineStyle();
37jcas_SetHandle(env,theobj,theret);
38
39}
40catch (Standard_Failure) {
41 Standard_SStream Err;
42 Err << Standard_Failure::Caught();
43 Err << (char) 0;
44 jcas_ThrowException(env,GetSString(Err));
45}
46}
47alock.Release();
48
49}
50
51
52
53JNIEXPORT void JNICALL Java_CASCADESamplesJni_Aspect_1LineStyle_Aspect_1LineStyle_1Create_12 (JNIEnv *env, jobject theobj, jint Type)
54{
55
56jcas_Locking alock(env);
57{
58try {
59Aspect_LineStyle* theret = new Aspect_LineStyle((Aspect_TypeOfLine) Type);
60jcas_SetHandle(env,theobj,theret);
61
62}
63catch (Standard_Failure) {
64 Standard_SStream Err;
65 Err << Standard_Failure::Caught();
66 Err << (char) 0;
67 jcas_ThrowException(env,GetSString(Err));
68}
69}
70alock.Release();
71
72}
73
74
75
76JNIEXPORT void JNICALL Java_CASCADESamplesJni_Aspect_1LineStyle_Aspect_1LineStyle_1Create_13 (JNIEnv *env, jobject theobj, jobject Style)
77{
78
79jcas_Locking alock(env);
80{
81try {
82TColQuantity_Array1OfLength* the_Style = (TColQuantity_Array1OfLength*) jcas_GetHandle(env,Style);
83Aspect_LineStyle* theret = new Aspect_LineStyle(*the_Style);
84jcas_SetHandle(env,theobj,theret);
85
86}
87catch (Standard_Failure) {
88 Standard_SStream Err;
89 Err << Standard_Failure::Caught();
90 Err << (char) 0;
91 jcas_ThrowException(env,GetSString(Err));
92}
93}
94alock.Release();
95
96}
97
98
99
100JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_Aspect_1LineStyle_Assign (JNIEnv *env, jobject theobj, jobject Other)
101{
102jobject thejret;
103
104jcas_Locking alock(env);
105{
106try {
107Aspect_LineStyle* the_Other = (Aspect_LineStyle*) jcas_GetHandle(env,Other);
108Aspect_LineStyle* the_this = (Aspect_LineStyle*) jcas_GetHandle(env,theobj);
109const Aspect_LineStyle& theret = the_this->Assign(*the_Other);
110thejret = jcas_CreateObject(env,"CASCADESamplesJni/Aspect_LineStyle",&theret,0);
111
112}
113catch (Standard_Failure) {
114 Standard_SStream Err;
115 Err << Standard_Failure::Caught();
116 Err << (char) 0;
117 jcas_ThrowException(env,GetSString(Err));
118}
119}
120alock.Release();
121return thejret;
122}
123
124
125
126JNIEXPORT void JNICALL Java_CASCADESamplesJni_Aspect_1LineStyle_Aspect_1LineStyle_1SetValues_11 (JNIEnv *env, jobject theobj, jint Type)
127{
128
129jcas_Locking alock(env);
130{
131try {
132Aspect_LineStyle* the_this = (Aspect_LineStyle*) jcas_GetHandle(env,theobj);
133the_this->SetValues((Aspect_TypeOfLine) Type);
134
135}
136catch (Standard_Failure) {
137 Standard_SStream Err;
138 Err << Standard_Failure::Caught();
139 Err << (char) 0;
140 jcas_ThrowException(env,GetSString(Err));
141}
142}
143alock.Release();
144
145}
146
147
148
149JNIEXPORT void JNICALL Java_CASCADESamplesJni_Aspect_1LineStyle_Aspect_1LineStyle_1SetValues_12 (JNIEnv *env, jobject theobj, jobject Style)
150{
151
152jcas_Locking alock(env);
153{
154try {
155TColQuantity_Array1OfLength* the_Style = (TColQuantity_Array1OfLength*) jcas_GetHandle(env,Style);
156Aspect_LineStyle* the_this = (Aspect_LineStyle*) jcas_GetHandle(env,theobj);
157the_this->SetValues(*the_Style);
158
159}
160catch (Standard_Failure) {
161 Standard_SStream Err;
162 Err << Standard_Failure::Caught();
163 Err << (char) 0;
164 jcas_ThrowException(env,GetSString(Err));
165}
166}
167alock.Release();
168
169}
170
171
172
173JNIEXPORT jint JNICALL Java_CASCADESamplesJni_Aspect_1LineStyle_Style (JNIEnv *env, jobject theobj)
174{
175jint thejret;
176
177jcas_Locking alock(env);
178{
179try {
180Aspect_LineStyle* the_this = (Aspect_LineStyle*) jcas_GetHandle(env,theobj);
181 thejret = the_this->Style();
182
183}
184catch (Standard_Failure) {
185 Standard_SStream Err;
186 Err << Standard_Failure::Caught();
187 Err << (char) 0;
188 jcas_ThrowException(env,GetSString(Err));
189}
190}
191alock.Release();
192return thejret;
193}
194
195
196
197JNIEXPORT jint JNICALL Java_CASCADESamplesJni_Aspect_1LineStyle_Length (JNIEnv *env, jobject theobj)
198{
199jint thejret;
200
201jcas_Locking alock(env);
202{
203try {
204Aspect_LineStyle* the_this = (Aspect_LineStyle*) jcas_GetHandle(env,theobj);
205 thejret = the_this->Length();
206
207}
208catch (Standard_Failure) {
209 Standard_SStream Err;
210 Err << Standard_Failure::Caught();
211 Err << (char) 0;
212 jcas_ThrowException(env,GetSString(Err));
213}
214}
215alock.Release();
216return thejret;
217}
218
219
220
221JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_Aspect_1LineStyle_Values (JNIEnv *env, jobject theobj)
222{
223jobject thejret;
224
225jcas_Locking alock(env);
226{
227try {
228Aspect_LineStyle* the_this = (Aspect_LineStyle*) jcas_GetHandle(env,theobj);
229const TColQuantity_Array1OfLength& theret = the_this->Values();
230thejret = jcas_CreateObject(env,"CASCADESamplesJni/TColQuantity_Array1OfLength",&theret,0);
231
232}
233catch (Standard_Failure) {
234 Standard_SStream Err;
235 Err << Standard_Failure::Caught();
236 Err << (char) 0;
237 jcas_ThrowException(env,GetSString(Err));
238}
239}
240alock.Release();
241return thejret;
242}
243
244
245
246JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_Aspect_1LineStyle_IsEqual (JNIEnv *env, jobject theobj, jobject Other)
247{
248jboolean thejret;
249
250jcas_Locking alock(env);
251{
252try {
253Aspect_LineStyle* the_Other = (Aspect_LineStyle*) jcas_GetHandle(env,Other);
254Aspect_LineStyle* the_this = (Aspect_LineStyle*) jcas_GetHandle(env,theobj);
255 thejret = the_this->IsEqual(*the_Other);
256
257}
258catch (Standard_Failure) {
259 Standard_SStream Err;
260 Err << Standard_Failure::Caught();
261 Err << (char) 0;
262 jcas_ThrowException(env,GetSString(Err));
263}
264}
265alock.Release();
266return thejret;
267}
268
269
270
271JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_Aspect_1LineStyle_IsNotEqual (JNIEnv *env, jobject theobj, jobject Other)
272{
273jboolean thejret;
274
275jcas_Locking alock(env);
276{
277try {
278Aspect_LineStyle* the_Other = (Aspect_LineStyle*) jcas_GetHandle(env,Other);
279Aspect_LineStyle* the_this = (Aspect_LineStyle*) jcas_GetHandle(env,theobj);
280 thejret = the_this->IsNotEqual(*the_Other);
281
282}
283catch (Standard_Failure) {
284 Standard_SStream Err;
285 Err << Standard_Failure::Caught();
286 Err << (char) 0;
287 jcas_ThrowException(env,GetSString(Err));
288}
289}
290alock.Release();
291return thejret;
292}
293
294
295
296JNIEXPORT void JNICALL Java_CASCADESamplesJni_Aspect_1LineStyle_FinalizeValue(JNIEnv *, jclass, jlong theid)
297{
298if (theid) {
299 Aspect_LineStyle* theobj = (Aspect_LineStyle*) theid;
300 delete theobj;
301}
302}
303
304
305}