2
* File: sidl_SIDLException_Module.c
3
* Symbol: sidl.SIDLException-v0.9.17
7
* Revision: @(#) $Id: $
8
* Description: implement a C extension type for a sidl extendable
10
* Copyright (c) 2000-2002, Lawrence Livermore National Security, LLC.
11
* Produced at the Lawrence Livermore National Laboratory.
12
* Written by the Components Team <components@llnl.gov>
13
* All rights reserved.
15
* This file is part of Babel. For more information, see
16
* http://www.llnl.gov/CASC/components/. Please read the COPYRIGHT file
17
* for Our Notice and the LICENSE file for the GNU Lesser General Public
20
* This program is free software; you can redistribute it and/or modify it
21
* under the terms of the GNU Lesser General Public License (as published by
22
* the Free Software Foundation) version 2.1 dated February 1999.
24
* This program is distributed in the hope that it will be useful, but
25
* WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
26
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
27
* conditions of the GNU Lesser General Public License for more details.
29
* You should have recieved a copy of the GNU Lesser General Public License
30
* along with this program; if not, write to the Free Software Foundation,
31
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33
* WARNING: Automatically generated; changes will be lost
38
* THIS CODE IS AUTOMATICALLY GENERATED BY THE BABEL
39
* COMPILER. DO NOT EDIT THIS!
41
* This file contains the implementation of a Python C
42
* extension type (i.e. a Python type implemented in C).
43
* This extension type provides Python interface to the
44
* sidl type sidl.SIDLException.
49
* Symbol "sidl.SIDLException" (version 0.9.17)
51
* <code>SIDLException</code> provides the basic functionality of the
52
* <code>BaseException</code> interface for getting and setting error
53
* messages and stack traces.
59
#ifndef included_sidl_BaseClass_h
60
#include "sidl_BaseClass.h"
62
#ifndef included_sidl_ClassInfo_h
63
#include "sidl_ClassInfo.h"
65
#ifndef included_sidl_rmi_ProtocolFactory_h
66
#include "sidl_rmi_ProtocolFactory.h"
68
#ifndef included_sidl_rmi_InstanceRegistry_h
69
#include "sidl_rmi_InstanceRegistry.h"
71
#ifndef included_sidl_rmi_InstanceHandle_h
72
#include "sidl_rmi_InstanceHandle.h"
74
#ifndef included_sidl_rmi_Invocation_h
75
#include "sidl_rmi_Invocation.h"
77
#ifndef included_sidl_rmi_Response_h
78
#include "sidl_rmi_Response.h"
80
#ifndef included_sidl_rmi_ServerRegistry_h
81
#include "sidl_rmi_ServerRegistry.h"
83
#ifndef included_sidl_rmi_ConnectRegistry_h
84
#include "sidl_rmi_ConnectRegistry.h"
86
#ifndef included_sidl_io_Serializable_h
87
#include "sidl_io_Serializable.h"
89
#ifndef included_sidl_MemAllocException_h
90
#include "sidl_MemAllocException.h"
92
#ifndef included_sidl_NotImplementedException_h
93
#include "sidl_NotImplementedException.h"
95
#include "sidl_Exception.h"
101
#include "sidl_thread.h"
103
static struct sidl_recursive_mutex_t sidl_SIDLException__mutex= SIDL_RECURSIVE_MUTEX_INITIALIZER;
104
#define LOCK_STATIC_GLOBALS sidl_recursive_mutex_lock( &sidl_SIDLException__mutex )
105
#define UNLOCK_STATIC_GLOBALS sidl_recursive_mutex_unlock( &sidl_SIDLException__mutex )
106
/* #define HAVE_LOCKED_STATIC_GLOBALS (sidl_recursive_mutex_trylock( &sidl_SIDLException__mutex )==EDEADLOCK) */
108
#define LOCK_STATIC_GLOBALS
109
#define UNLOCK_STATIC_GLOBALS
110
/* #define HAVE_LOCKED_STATIC_GLOBALS (1) */
113
#define sidl_SIDLException_INTERNAL 1
114
#include "sidl_SIDLException_Module.h"
115
#ifndef included_sidl_SIDLException_IOR_h
116
#include "sidl_SIDLException_IOR.h"
118
#include "sidlObjA.h"
119
#include "sidlPyArrays.h"
120
#ifdef SIDL_HAVE_NUMPY
121
#include "oldnumeric.h"
122
#elif defined(SIDL_HAVE_NUMERIC_PYTHON)
123
#include "Numeric/arrayobject.h"
125
#error Neither Numeric Python nor NumPy installed
127
#ifndef included_sidl_Loader_h
128
#include "sidl_Loader.h"
130
#ifndef included_sidl_header_h
131
#include "sidl_header.h"
133
#ifndef included_sidl_interface_IOR_h
134
#include "sidl_interface_IOR.h"
136
#include "sidl_rmi_NetworkException_Module.h"
137
#include "sidl_BaseClass_Module.h"
138
#include "sidl_BaseException_Module.h"
139
#include "sidl_BaseInterface_Module.h"
140
#include "sidl_ClassInfo_Module.h"
141
#include "sidl_RuntimeException_Module.h"
142
#include "sidl_io_Deserializer_Module.h"
143
#include "sidl_io_Serializable_Module.h"
144
#include "sidl_io_Serializer_Module.h"
145
#include "sidl_rmi_Call_Module.h"
146
#include "sidl_rmi_Return_Module.h"
147
#include "sidl_rmi_Ticket_Module.h"
154
* lang_inited is a boolean value showing if we have already imported all the nescessary modules
157
static int lang_inited = 0;
159
#define LANG_SPECIFIC_INIT() if(!lang_inited) { \
161
sidl_BaseClass__import(); \
162
sidl_BaseException__import(); \
163
sidl_BaseInterface__import(); \
164
sidl_ClassInfo__import(); \
165
sidl_RuntimeException__import(); \
166
sidl_SIDLException__import(); \
167
sidl_io_Deserializer__import(); \
168
sidl_io_Serializable__import(); \
169
sidl_io_Serializer__import(); \
170
sidl_rmi_Ticket__import(); \
176
* RMI connector function for the class. (no addref)
178
struct sidl_SIDLException__object*
179
sidl_SIDLException__connectI(const char * url, sidl_bool ar, struct \
180
sidl_BaseInterface__object **_ex);
185
/* Static variables to hold version of IOR */
186
static const int32_t s_IOR_MAJOR_VERSION = 2;
187
static const int32_t s_IOR_MINOR_VERSION = 0;
189
/* Static variables for managing EPV initialization. */
190
static int s_remote_initialized = 0;
192
static struct sidl_SIDLException__epv s_rem_epv__sidl_sidlexception;
194
static struct sidl_BaseClass__epv s_rem_epv__sidl_baseclass;
196
static struct sidl_BaseException__epv s_rem_epv__sidl_baseexception;
198
static struct sidl_BaseInterface__epv s_rem_epv__sidl_baseinterface;
200
static struct sidl_io_Serializable__epv s_rem_epv__sidl_io_serializable;
205
/* REMOTE CAST: dynamic type casting for remote objects. */
206
static void* remote_sidl_SIDLException__cast(
207
struct sidl_SIDLException__object* self,
208
const char* name, sidl_BaseInterface* _ex)
212
*_ex = NULL; /* default to no exception */
213
cmp = strcmp(name, "sidl.BaseInterface");
215
(*self->d_epv->f_addRef)(self, _ex); SIDL_CHECK(*_ex);
216
cast = &((*self).d_sidl_baseclass.d_sidl_baseinterface);
220
cmp = strcmp(name, "sidl.BaseException");
222
(*self->d_epv->f_addRef)(self, _ex); SIDL_CHECK(*_ex);
223
cast = &((*self).d_sidl_baseexception);
227
cmp = strcmp(name, "sidl.BaseClass");
229
(*self->d_epv->f_addRef)(self, _ex); SIDL_CHECK(*_ex);
230
cast = ((struct sidl_BaseClass__object*)self);
236
cmp = strcmp(name, "sidl.io.Serializable");
238
(*self->d_epv->f_addRef)(self, _ex); SIDL_CHECK(*_ex);
239
cast = &((*self).d_sidl_io_serializable);
243
cmp = strcmp(name, "sidl.SIDLException");
245
(*self->d_epv->f_addRef)(self, _ex); SIDL_CHECK(*_ex);
246
cast = ((struct sidl_SIDLException__object*)self);
251
if ((*self->d_epv->f_isType)(self,name, _ex)) {
252
void* (*func)(struct sidl_rmi_InstanceHandle__object*, struct \
253
sidl_BaseInterface__object**) =
254
(void* (*)(struct sidl_rmi_InstanceHandle__object*, struct \
255
sidl_BaseInterface__object**))
256
sidl_rmi_ConnectRegistry_getConnect(name, _ex);SIDL_CHECK(*_ex);
257
cast = (*func)(((struct sidl_SIDLException__remote*)self->d_data)->d_ih, \
266
/* REMOTE DELETE: call the remote destructor for the object. */
267
static void remote_sidl_SIDLException__delete(
268
struct sidl_SIDLException__object* self,
269
struct sidl_BaseInterface__object* *_ex)
275
/* REMOTE GETURL: call the getURL function for the object. */
276
static char* remote_sidl_SIDLException__getURL(
277
struct sidl_SIDLException__object* self, struct sidl_BaseInterface__object* \
280
struct sidl_rmi_InstanceHandle__object *conn = ((struct \
281
sidl_SIDLException__remote*)self->d_data)->d_ih;
284
return sidl_rmi_InstanceHandle_getObjectURL(conn, _ex);
289
/* REMOTE ADDREF: For internal babel use only! Remote addRef. */
290
static void remote_sidl_SIDLException__raddRef(
291
struct sidl_SIDLException__object* self,struct sidl_BaseInterface__object* \
294
struct sidl_BaseException__object* netex = NULL;
295
/* initialize a new invocation */
296
struct sidl_BaseInterface__object* _throwaway = NULL;
297
struct sidl_rmi_InstanceHandle__object *_conn = ((struct \
298
sidl_SIDLException__remote*)self->d_data)->d_ih;
299
sidl_rmi_Response _rsvp = NULL;
300
sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( _conn, \
301
"addRef", _ex ); SIDL_CHECK(*_ex);
302
/* send actual RMI request */
303
_rsvp = sidl_rmi_Invocation_invokeMethod(_inv,_ex);SIDL_CHECK(*_ex);
304
/* Check for exceptions */
305
netex = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);
307
*_ex = (struct sidl_BaseInterface__object*)netex;
311
/* cleanup and return */
313
if(_inv) { sidl_rmi_Invocation_deleteRef(_inv,&_throwaway); }
314
if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp,&_throwaway); }
318
/* REMOTE ISREMOTE: returns true if this object is Remote (it is). */
320
remote_sidl_SIDLException__isRemote(
321
struct sidl_SIDLException__object* self,
322
struct sidl_BaseInterface__object* *_ex) {
327
/* REMOTE METHOD STUB:_set_hooks */
329
remote_sidl_SIDLException__set_hooks(
330
/* in */ struct sidl_SIDLException__object *self ,
331
/* in */ sidl_bool on,
332
/* out */ struct sidl_BaseInterface__object * *_ex)
334
LANG_SPECIFIC_INIT();
337
/* initialize a new invocation */
338
struct sidl_BaseInterface__object* _throwaway = NULL;
339
sidl_BaseException _be = NULL;
340
sidl_rmi_Response _rsvp = NULL;
341
struct sidl_rmi_InstanceHandle__object * _conn = ((struct \
342
sidl_SIDLException__remote*)self->d_data)->d_ih;
343
sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( \
344
_conn, "_set_hooks", _ex ); SIDL_CHECK(*_ex);
346
/* pack in and inout arguments */
347
sidl_rmi_Invocation_packBool( _inv, "on", on, _ex);SIDL_CHECK(*_ex);
349
/* send actual RMI request */
350
_rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
352
_be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
354
struct sidl_BaseInterface__object* throwaway_exception = NULL;
355
sidl_BaseException_addLine(_be, "Exception unserialized from sidl.SIDLException._set_hooks.", &throwaway_exception);
356
*_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast( \
357
_be,&throwaway_exception);
361
/* unpack out and inout arguments */
363
/* cleanup and return */
365
if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
366
if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
371
/* REMOTE EXEC: call the exec function for the object. */
372
static void remote_sidl_SIDLException__exec(
373
struct sidl_SIDLException__object* self,const char* methodName,
374
sidl_rmi_Call inArgs,
375
sidl_rmi_Return outArgs,
376
struct sidl_BaseInterface__object* *_ex)
381
/* REMOTE METHOD STUB:addRef */
383
remote_sidl_SIDLException_addRef(
384
/* in */ struct sidl_SIDLException__object *self ,
385
/* out */ struct sidl_BaseInterface__object * *_ex)
387
LANG_SPECIFIC_INIT();
390
struct sidl_SIDLException__remote* r_obj = (struct \
391
sidl_SIDLException__remote*)self->d_data;
394
#ifdef SIDL_DEBUG_REFCOUNT
395
fprintf(stderr, "babel: addRef %p new count %d (type %s)\n",r_obj, r_obj->d_refcount, "sidl.SIDLException Remote Stub");
396
#endif /* SIDL_DEBUG_REFCOUNT */
397
UNLOCK_STATIC_GLOBALS;
401
/* REMOTE METHOD STUB:deleteRef */
403
remote_sidl_SIDLException_deleteRef(
404
/* in */ struct sidl_SIDLException__object *self ,
405
/* out */ struct sidl_BaseInterface__object * *_ex)
407
LANG_SPECIFIC_INIT();
410
struct sidl_SIDLException__remote* r_obj = (struct \
411
sidl_SIDLException__remote*)self->d_data;
414
#ifdef SIDL_DEBUG_REFCOUNT
415
fprintf(stderr, "babel: deleteRef %p new count %d (type %s)\n",r_obj, r_obj->d_refcount, "sidl.SIDLException Remote Stub");
416
#endif /* SIDL_DEBUG_REFCOUNT */
417
if(r_obj->d_refcount == 0) {
418
sidl_rmi_InstanceHandle_deleteRef(r_obj->d_ih, _ex);
422
UNLOCK_STATIC_GLOBALS;
426
/* REMOTE METHOD STUB:isSame */
428
remote_sidl_SIDLException_isSame(
429
/* in */ struct sidl_SIDLException__object *self ,
430
/* in */ struct sidl_BaseInterface__object* iobj,
431
/* out */ struct sidl_BaseInterface__object * *_ex)
433
LANG_SPECIFIC_INIT();
436
/* initialize a new invocation */
437
struct sidl_BaseInterface__object* _throwaway = NULL;
438
sidl_BaseException _be = NULL;
439
sidl_rmi_Response _rsvp = NULL;
440
sidl_bool _retval = FALSE;
441
struct sidl_rmi_InstanceHandle__object * _conn = ((struct \
442
sidl_SIDLException__remote*)self->d_data)->d_ih;
443
sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( \
444
_conn, "isSame", _ex ); SIDL_CHECK(*_ex);
446
/* pack in and inout arguments */
448
char* _url = sidl_BaseInterface__getURL((sidl_BaseInterface)iobj, \
449
_ex);SIDL_CHECK(*_ex);
450
sidl_rmi_Invocation_packString( _inv, "iobj", _url, _ex);SIDL_CHECK( \
454
sidl_rmi_Invocation_packString( _inv, "iobj", NULL, _ex);SIDL_CHECK( \
458
/* send actual RMI request */
459
_rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
461
_be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
463
struct sidl_BaseInterface__object* throwaway_exception = NULL;
464
sidl_BaseException_addLine(_be, "Exception unserialized from sidl.SIDLException.isSame.", &throwaway_exception);
465
*_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast( \
466
_be,&throwaway_exception);
470
/* extract return value */
471
sidl_rmi_Response_unpackBool( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(\
474
/* unpack out and inout arguments */
476
/* cleanup and return */
478
if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
479
if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
484
/* REMOTE METHOD STUB:isType */
486
remote_sidl_SIDLException_isType(
487
/* in */ struct sidl_SIDLException__object *self ,
488
/* in */ const char* name,
489
/* out */ struct sidl_BaseInterface__object * *_ex)
491
LANG_SPECIFIC_INIT();
494
/* initialize a new invocation */
495
struct sidl_BaseInterface__object* _throwaway = NULL;
496
sidl_BaseException _be = NULL;
497
sidl_rmi_Response _rsvp = NULL;
498
sidl_bool _retval = FALSE;
499
struct sidl_rmi_InstanceHandle__object * _conn = ((struct \
500
sidl_SIDLException__remote*)self->d_data)->d_ih;
501
sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( \
502
_conn, "isType", _ex ); SIDL_CHECK(*_ex);
504
/* pack in and inout arguments */
505
sidl_rmi_Invocation_packString( _inv, "name", name, _ex);SIDL_CHECK(*_ex);
507
/* send actual RMI request */
508
_rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
510
_be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
512
struct sidl_BaseInterface__object* throwaway_exception = NULL;
513
sidl_BaseException_addLine(_be, "Exception unserialized from sidl.SIDLException.isType.", &throwaway_exception);
514
*_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast( \
515
_be,&throwaway_exception);
519
/* extract return value */
520
sidl_rmi_Response_unpackBool( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(\
523
/* unpack out and inout arguments */
525
/* cleanup and return */
527
if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
528
if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
533
/* REMOTE METHOD STUB:getClassInfo */
534
static struct sidl_ClassInfo__object*
535
remote_sidl_SIDLException_getClassInfo(
536
/* in */ struct sidl_SIDLException__object *self ,
537
/* out */ struct sidl_BaseInterface__object * *_ex)
539
LANG_SPECIFIC_INIT();
542
/* initialize a new invocation */
543
struct sidl_BaseInterface__object* _throwaway = NULL;
544
sidl_BaseException _be = NULL;
545
sidl_rmi_Response _rsvp = NULL;
546
char*_retval_str = NULL;
547
struct sidl_ClassInfo__object* _retval = 0;
548
struct sidl_rmi_InstanceHandle__object * _conn = ((struct \
549
sidl_SIDLException__remote*)self->d_data)->d_ih;
550
sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( \
551
_conn, "getClassInfo", _ex ); SIDL_CHECK(*_ex);
553
/* pack in and inout arguments */
555
/* send actual RMI request */
556
_rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
558
_be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
560
struct sidl_BaseInterface__object* throwaway_exception = NULL;
561
sidl_BaseException_addLine(_be, "Exception unserialized from sidl.SIDLException.getClassInfo.", &throwaway_exception);
562
*_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast( \
563
_be,&throwaway_exception);
567
/* extract return value */
568
sidl_rmi_Response_unpackString( _rsvp, "_retval", &_retval_str, \
569
_ex);SIDL_CHECK(*_ex);
570
_retval = sidl_ClassInfo__connectI(_retval_str, FALSE, _ex);SIDL_CHECK( \
573
/* unpack out and inout arguments */
575
/* cleanup and return */
577
if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
578
if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
583
/* REMOTE METHOD STUB:getNote */
585
remote_sidl_SIDLException_getNote(
586
/* in */ struct sidl_SIDLException__object *self ,
587
/* out */ struct sidl_BaseInterface__object * *_ex)
589
LANG_SPECIFIC_INIT();
592
/* initialize a new invocation */
593
struct sidl_BaseInterface__object* _throwaway = NULL;
594
sidl_BaseException _be = NULL;
595
sidl_rmi_Response _rsvp = NULL;
597
struct sidl_rmi_InstanceHandle__object * _conn = ((struct \
598
sidl_SIDLException__remote*)self->d_data)->d_ih;
599
sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( \
600
_conn, "getNote", _ex ); SIDL_CHECK(*_ex);
602
/* pack in and inout arguments */
604
/* send actual RMI request */
605
_rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
607
_be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
609
struct sidl_BaseInterface__object* throwaway_exception = NULL;
610
sidl_BaseException_addLine(_be, "Exception unserialized from sidl.SIDLException.getNote.", &throwaway_exception);
611
*_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast( \
612
_be,&throwaway_exception);
616
/* extract return value */
617
sidl_rmi_Response_unpackString( _rsvp, "_retval", &_retval, \
618
_ex);SIDL_CHECK(*_ex);
620
/* unpack out and inout arguments */
622
/* cleanup and return */
624
if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
625
if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
630
/* REMOTE METHOD STUB:setNote */
632
remote_sidl_SIDLException_setNote(
633
/* in */ struct sidl_SIDLException__object *self ,
634
/* in */ const char* message,
635
/* out */ struct sidl_BaseInterface__object * *_ex)
637
LANG_SPECIFIC_INIT();
640
/* initialize a new invocation */
641
struct sidl_BaseInterface__object* _throwaway = NULL;
642
sidl_BaseException _be = NULL;
643
sidl_rmi_Response _rsvp = NULL;
644
struct sidl_rmi_InstanceHandle__object * _conn = ((struct \
645
sidl_SIDLException__remote*)self->d_data)->d_ih;
646
sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( \
647
_conn, "setNote", _ex ); SIDL_CHECK(*_ex);
649
/* pack in and inout arguments */
650
sidl_rmi_Invocation_packString( _inv, "message", message, _ex);SIDL_CHECK(\
653
/* send actual RMI request */
654
_rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
656
_be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
658
struct sidl_BaseInterface__object* throwaway_exception = NULL;
659
sidl_BaseException_addLine(_be, "Exception unserialized from sidl.SIDLException.setNote.", &throwaway_exception);
660
*_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast( \
661
_be,&throwaway_exception);
665
/* unpack out and inout arguments */
667
/* cleanup and return */
669
if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
670
if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
675
/* REMOTE METHOD STUB:getTrace */
677
remote_sidl_SIDLException_getTrace(
678
/* in */ struct sidl_SIDLException__object *self ,
679
/* out */ struct sidl_BaseInterface__object * *_ex)
681
LANG_SPECIFIC_INIT();
684
/* initialize a new invocation */
685
struct sidl_BaseInterface__object* _throwaway = NULL;
686
sidl_BaseException _be = NULL;
687
sidl_rmi_Response _rsvp = NULL;
689
struct sidl_rmi_InstanceHandle__object * _conn = ((struct \
690
sidl_SIDLException__remote*)self->d_data)->d_ih;
691
sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( \
692
_conn, "getTrace", _ex ); SIDL_CHECK(*_ex);
694
/* pack in and inout arguments */
696
/* send actual RMI request */
697
_rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
699
_be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
701
struct sidl_BaseInterface__object* throwaway_exception = NULL;
702
sidl_BaseException_addLine(_be, "Exception unserialized from sidl.SIDLException.getTrace.", &throwaway_exception);
703
*_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast( \
704
_be,&throwaway_exception);
708
/* extract return value */
709
sidl_rmi_Response_unpackString( _rsvp, "_retval", &_retval, \
710
_ex);SIDL_CHECK(*_ex);
712
/* unpack out and inout arguments */
714
/* cleanup and return */
716
if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
717
if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
722
/* REMOTE METHOD STUB:addLine */
724
remote_sidl_SIDLException_addLine(
725
/* in */ struct sidl_SIDLException__object *self ,
726
/* in */ const char* traceline,
727
/* out */ struct sidl_BaseInterface__object * *_ex)
729
LANG_SPECIFIC_INIT();
732
/* initialize a new invocation */
733
struct sidl_BaseInterface__object* _throwaway = NULL;
734
sidl_BaseException _be = NULL;
735
sidl_rmi_Response _rsvp = NULL;
736
struct sidl_rmi_InstanceHandle__object * _conn = ((struct \
737
sidl_SIDLException__remote*)self->d_data)->d_ih;
738
sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( \
739
_conn, "addLine", _ex ); SIDL_CHECK(*_ex);
741
/* pack in and inout arguments */
742
sidl_rmi_Invocation_packString( _inv, "traceline", traceline, \
743
_ex);SIDL_CHECK(*_ex);
745
/* send actual RMI request */
746
_rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
748
_be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
750
struct sidl_BaseInterface__object* throwaway_exception = NULL;
751
sidl_BaseException_addLine(_be, "Exception unserialized from sidl.SIDLException.addLine.", &throwaway_exception);
752
*_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast( \
753
_be,&throwaway_exception);
757
/* unpack out and inout arguments */
759
/* cleanup and return */
761
if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
762
if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
767
/* REMOTE METHOD STUB:add */
769
remote_sidl_SIDLException_add(
770
/* in */ struct sidl_SIDLException__object *self ,
771
/* in */ const char* filename,
772
/* in */ int32_t lineno,
773
/* in */ const char* methodname,
774
/* out */ struct sidl_BaseInterface__object * *_ex)
776
LANG_SPECIFIC_INIT();
779
/* initialize a new invocation */
780
struct sidl_BaseInterface__object* _throwaway = NULL;
781
sidl_BaseException _be = NULL;
782
sidl_rmi_Response _rsvp = NULL;
783
struct sidl_rmi_InstanceHandle__object * _conn = ((struct \
784
sidl_SIDLException__remote*)self->d_data)->d_ih;
785
sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( \
786
_conn, "add", _ex ); SIDL_CHECK(*_ex);
788
/* pack in and inout arguments */
789
sidl_rmi_Invocation_packString( _inv, "filename", filename, \
790
_ex);SIDL_CHECK(*_ex);
791
sidl_rmi_Invocation_packInt( _inv, "lineno", lineno, _ex);SIDL_CHECK( \
793
sidl_rmi_Invocation_packString( _inv, "methodname", methodname, \
794
_ex);SIDL_CHECK(*_ex);
796
/* send actual RMI request */
797
_rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
799
_be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
801
struct sidl_BaseInterface__object* throwaway_exception = NULL;
802
sidl_BaseException_addLine(_be, "Exception unserialized from sidl.SIDLException.add.", &throwaway_exception);
803
*_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast( \
804
_be,&throwaway_exception);
808
/* unpack out and inout arguments */
810
/* cleanup and return */
812
if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
813
if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
818
/* REMOTE METHOD STUB:packObj */
820
remote_sidl_SIDLException_packObj(
821
/* in */ struct sidl_SIDLException__object *self ,
822
/* in */ struct sidl_io_Serializer__object* ser,
823
/* out */ struct sidl_BaseInterface__object * *_ex)
825
LANG_SPECIFIC_INIT();
828
/* initialize a new invocation */
829
struct sidl_BaseInterface__object* _throwaway = NULL;
830
sidl_BaseException _be = NULL;
831
sidl_rmi_Response _rsvp = NULL;
832
struct sidl_rmi_InstanceHandle__object * _conn = ((struct \
833
sidl_SIDLException__remote*)self->d_data)->d_ih;
834
sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( \
835
_conn, "packObj", _ex ); SIDL_CHECK(*_ex);
837
/* pack in and inout arguments */
839
char* _url = sidl_BaseInterface__getURL((sidl_BaseInterface)ser, \
840
_ex);SIDL_CHECK(*_ex);
841
sidl_rmi_Invocation_packString( _inv, "ser", _url, _ex);SIDL_CHECK( \
845
sidl_rmi_Invocation_packString( _inv, "ser", NULL, _ex);SIDL_CHECK( \
849
/* send actual RMI request */
850
_rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
852
_be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
854
struct sidl_BaseInterface__object* throwaway_exception = NULL;
855
sidl_BaseException_addLine(_be, "Exception unserialized from sidl.SIDLException.packObj.", &throwaway_exception);
856
*_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast( \
857
_be,&throwaway_exception);
861
/* unpack out and inout arguments */
863
/* cleanup and return */
865
if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
866
if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
871
/* REMOTE METHOD STUB:unpackObj */
873
remote_sidl_SIDLException_unpackObj(
874
/* in */ struct sidl_SIDLException__object *self ,
875
/* in */ struct sidl_io_Deserializer__object* des,
876
/* out */ struct sidl_BaseInterface__object * *_ex)
878
LANG_SPECIFIC_INIT();
881
/* initialize a new invocation */
882
struct sidl_BaseInterface__object* _throwaway = NULL;
883
sidl_BaseException _be = NULL;
884
sidl_rmi_Response _rsvp = NULL;
885
struct sidl_rmi_InstanceHandle__object * _conn = ((struct \
886
sidl_SIDLException__remote*)self->d_data)->d_ih;
887
sidl_rmi_Invocation _inv = sidl_rmi_InstanceHandle_createInvocation( \
888
_conn, "unpackObj", _ex ); SIDL_CHECK(*_ex);
890
/* pack in and inout arguments */
892
char* _url = sidl_BaseInterface__getURL((sidl_BaseInterface)des, \
893
_ex);SIDL_CHECK(*_ex);
894
sidl_rmi_Invocation_packString( _inv, "des", _url, _ex);SIDL_CHECK( \
898
sidl_rmi_Invocation_packString( _inv, "des", NULL, _ex);SIDL_CHECK( \
902
/* send actual RMI request */
903
_rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
905
_be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
907
struct sidl_BaseInterface__object* throwaway_exception = NULL;
908
sidl_BaseException_addLine(_be, "Exception unserialized from sidl.SIDLException.unpackObj.", &throwaway_exception);
909
*_ex = (struct sidl_BaseInterface__object*) sidl_BaseInterface__cast( \
910
_be,&throwaway_exception);
914
/* unpack out and inout arguments */
916
/* cleanup and return */
918
if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
919
if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
924
/* REMOTE EPV: create remote entry point vectors (EPVs). */
925
static void sidl_SIDLException__init_remote_epv(void)
927
/* assert( HAVE_LOCKED_STATIC_GLOBALS ); */
928
struct sidl_SIDLException__epv* epv = &s_rem_epv__sidl_sidlexception;
929
struct sidl_BaseClass__epv* e0 = &s_rem_epv__sidl_baseclass;
930
struct sidl_BaseException__epv* e1 = &s_rem_epv__sidl_baseexception;
931
struct sidl_BaseInterface__epv* e2 = &s_rem_epv__sidl_baseinterface;
932
struct sidl_io_Serializable__epv* e3 = &s_rem_epv__sidl_io_serializable;
934
epv->f__cast = remote_sidl_SIDLException__cast;
935
epv->f__delete = remote_sidl_SIDLException__delete;
936
epv->f__exec = remote_sidl_SIDLException__exec;
937
epv->f__getURL = remote_sidl_SIDLException__getURL;
938
epv->f__raddRef = remote_sidl_SIDLException__raddRef;
939
epv->f__isRemote = remote_sidl_SIDLException__isRemote;
940
epv->f__set_hooks = remote_sidl_SIDLException__set_hooks;
942
epv->f__ctor2 = NULL;
944
epv->f_addRef = remote_sidl_SIDLException_addRef;
945
epv->f_deleteRef = remote_sidl_SIDLException_deleteRef;
946
epv->f_isSame = remote_sidl_SIDLException_isSame;
947
epv->f_isType = remote_sidl_SIDLException_isType;
948
epv->f_getClassInfo = remote_sidl_SIDLException_getClassInfo;
949
epv->f_getNote = remote_sidl_SIDLException_getNote;
950
epv->f_setNote = remote_sidl_SIDLException_setNote;
951
epv->f_getTrace = remote_sidl_SIDLException_getTrace;
952
epv->f_addLine = remote_sidl_SIDLException_addLine;
953
epv->f_add = remote_sidl_SIDLException_add;
954
epv->f_packObj = remote_sidl_SIDLException_packObj;
955
epv->f_unpackObj = remote_sidl_SIDLException_unpackObj;
957
e0->f__cast = (void* (*)(struct sidl_BaseClass__object*,const char*, \
958
struct sidl_BaseInterface__object**)) epv->f__cast;
959
e0->f__delete = (void (*)(struct sidl_BaseClass__object*,struct \
960
sidl_BaseInterface__object**)) epv->f__delete;
961
e0->f__getURL = (char* (*)(struct sidl_BaseClass__object*,struct \
962
sidl_BaseInterface__object**)) epv->f__getURL;
963
e0->f__raddRef = (void (*)(struct sidl_BaseClass__object*,struct \
964
sidl_BaseInterface__object**)) epv->f__raddRef;
965
e0->f__isRemote = (sidl_bool (*)(struct sidl_BaseClass__object*,struct \
966
sidl_BaseInterface__object**)) epv->f__isRemote;
967
e0->f__set_hooks = (void (*)(struct sidl_BaseClass__object*,int32_t, \
968
struct sidl_BaseInterface__object**)) epv->f__set_hooks;
969
e0->f__exec = (void (*)(struct sidl_BaseClass__object*,const char*, \
970
struct sidl_rmi_Call__object*,struct sidl_rmi_Return__object*,struct \
971
sidl_BaseInterface__object **)) epv->f__exec;
972
e0->f_addRef = (void (*)(struct sidl_BaseClass__object*,struct \
973
sidl_BaseInterface__object **)) epv->f_addRef;
974
e0->f_deleteRef = (void (*)(struct sidl_BaseClass__object*,struct \
975
sidl_BaseInterface__object **)) epv->f_deleteRef;
976
e0->f_isSame = (sidl_bool (*)(struct sidl_BaseClass__object*,struct \
977
sidl_BaseInterface__object*,struct sidl_BaseInterface__object **)) \
979
e0->f_isType = (sidl_bool (*)(struct sidl_BaseClass__object*,const \
980
char*,struct sidl_BaseInterface__object **)) epv->f_isType;
981
e0->f_getClassInfo = (struct sidl_ClassInfo__object* (*)(struct \
982
sidl_BaseClass__object*,struct sidl_BaseInterface__object **)) \
985
e1->f__cast = (void* (*)(void*,const char*, struct \
986
sidl_BaseInterface__object**)) epv->f__cast;
987
e1->f__delete = (void (*)(void*,struct sidl_BaseInterface__object**)) \
989
e1->f__getURL = (char* (*)(void*,struct sidl_BaseInterface__object**)) \
991
e1->f__raddRef = (void (*)(void*,struct sidl_BaseInterface__object**)) \
993
e1->f__isRemote = (sidl_bool (*)(void*,struct \
994
sidl_BaseInterface__object**)) epv->f__isRemote;
995
e1->f__set_hooks = (void (*)(void*,int32_t, struct \
996
sidl_BaseInterface__object**)) epv->f__set_hooks;
997
e1->f__exec = (void (*)(void*,const char*,struct \
998
sidl_rmi_Call__object*,struct sidl_rmi_Return__object*,struct \
999
sidl_BaseInterface__object **)) epv->f__exec;
1000
e1->f_getNote = (char* (*)(void*,struct sidl_BaseInterface__object \
1001
**)) epv->f_getNote;
1002
e1->f_setNote = (void (*)(void*,const char*,struct \
1003
sidl_BaseInterface__object **)) epv->f_setNote;
1004
e1->f_getTrace = (char* (*)(void*,struct sidl_BaseInterface__object \
1005
**)) epv->f_getTrace;
1006
e1->f_addLine = (void (*)(void*,const char*,struct \
1007
sidl_BaseInterface__object **)) epv->f_addLine;
1008
e1->f_add = (void (*)(void*,const char*,int32_t,const char*,struct \
1009
sidl_BaseInterface__object **)) epv->f_add;
1010
e1->f_packObj = (void (*)(void*,struct sidl_io_Serializer__object*, \
1011
struct sidl_BaseInterface__object **)) epv->f_packObj;
1012
e1->f_unpackObj = (void (*)(void*,struct sidl_io_Deserializer__object*, \
1013
struct sidl_BaseInterface__object **)) epv->f_unpackObj;
1014
e1->f_addRef = (void (*)(void*,struct sidl_BaseInterface__object **)) \
1016
e1->f_deleteRef = (void (*)(void*,struct sidl_BaseInterface__object **)) \
1018
e1->f_isSame = (sidl_bool (*)(void*,struct \
1019
sidl_BaseInterface__object*,struct sidl_BaseInterface__object **)) \
1021
e1->f_isType = (sidl_bool (*)(void*,const char*,struct \
1022
sidl_BaseInterface__object **)) epv->f_isType;
1023
e1->f_getClassInfo = (struct sidl_ClassInfo__object* (*)(void*,struct \
1024
sidl_BaseInterface__object **)) epv->f_getClassInfo;
1026
e2->f__cast = (void* (*)(void*,const char*, struct \
1027
sidl_BaseInterface__object**)) epv->f__cast;
1028
e2->f__delete = (void (*)(void*,struct sidl_BaseInterface__object**)) \
1030
e2->f__getURL = (char* (*)(void*,struct sidl_BaseInterface__object**)) \
1032
e2->f__raddRef = (void (*)(void*,struct sidl_BaseInterface__object**)) \
1034
e2->f__isRemote = (sidl_bool (*)(void*,struct \
1035
sidl_BaseInterface__object**)) epv->f__isRemote;
1036
e2->f__set_hooks = (void (*)(void*,int32_t, struct \
1037
sidl_BaseInterface__object**)) epv->f__set_hooks;
1038
e2->f__exec = (void (*)(void*,const char*,struct \
1039
sidl_rmi_Call__object*,struct sidl_rmi_Return__object*,struct \
1040
sidl_BaseInterface__object **)) epv->f__exec;
1041
e2->f_addRef = (void (*)(void*,struct sidl_BaseInterface__object **)) \
1043
e2->f_deleteRef = (void (*)(void*,struct sidl_BaseInterface__object **)) \
1045
e2->f_isSame = (sidl_bool (*)(void*,struct \
1046
sidl_BaseInterface__object*,struct sidl_BaseInterface__object **)) \
1048
e2->f_isType = (sidl_bool (*)(void*,const char*,struct \
1049
sidl_BaseInterface__object **)) epv->f_isType;
1050
e2->f_getClassInfo = (struct sidl_ClassInfo__object* (*)(void*,struct \
1051
sidl_BaseInterface__object **)) epv->f_getClassInfo;
1053
e3->f__cast = (void* (*)(void*,const char*, struct \
1054
sidl_BaseInterface__object**)) epv->f__cast;
1055
e3->f__delete = (void (*)(void*,struct sidl_BaseInterface__object**)) \
1057
e3->f__getURL = (char* (*)(void*,struct sidl_BaseInterface__object**)) \
1059
e3->f__raddRef = (void (*)(void*,struct sidl_BaseInterface__object**)) \
1061
e3->f__isRemote = (sidl_bool (*)(void*,struct \
1062
sidl_BaseInterface__object**)) epv->f__isRemote;
1063
e3->f__set_hooks = (void (*)(void*,int32_t, struct \
1064
sidl_BaseInterface__object**)) epv->f__set_hooks;
1065
e3->f__exec = (void (*)(void*,const char*,struct \
1066
sidl_rmi_Call__object*,struct sidl_rmi_Return__object*,struct \
1067
sidl_BaseInterface__object **)) epv->f__exec;
1068
e3->f_packObj = (void (*)(void*,struct sidl_io_Serializer__object*, \
1069
struct sidl_BaseInterface__object **)) epv->f_packObj;
1070
e3->f_unpackObj = (void (*)(void*,struct sidl_io_Deserializer__object*, \
1071
struct sidl_BaseInterface__object **)) epv->f_unpackObj;
1072
e3->f_addRef = (void (*)(void*,struct sidl_BaseInterface__object **)) \
1074
e3->f_deleteRef = (void (*)(void*,struct sidl_BaseInterface__object **)) \
1076
e3->f_isSame = (sidl_bool (*)(void*,struct \
1077
sidl_BaseInterface__object*,struct sidl_BaseInterface__object **)) \
1079
e3->f_isType = (sidl_bool (*)(void*,const char*,struct \
1080
sidl_BaseInterface__object **)) epv->f_isType;
1081
e3->f_getClassInfo = (struct sidl_ClassInfo__object* (*)(void*,struct \
1082
sidl_BaseInterface__object **)) epv->f_getClassInfo;
1084
s_remote_initialized = 1;
1087
/* Create an instance that connects to an existing remote object. */
1088
static struct sidl_SIDLException__object*
1089
sidl_SIDLException__remoteConnect(const char *url, sidl_bool ar, struct \
1090
sidl_BaseInterface__object* *_ex)
1092
struct sidl_SIDLException__object* self = NULL;
1094
struct sidl_SIDLException__object* s0;
1095
struct sidl_BaseClass__object* s1;
1097
struct sidl_SIDLException__remote* r_obj = NULL;
1098
sidl_rmi_InstanceHandle instance = NULL;
1099
char* objectID = NULL;
1102
if(url == NULL) {return NULL;}
1103
objectID = sidl_rmi_ServerRegistry_isLocalObject(url, _ex);
1105
struct sidl_SIDLException__object* retobj = NULL;
1106
struct sidl_BaseInterface__object *throwaway_exception;
1107
sidl_BaseInterface bi = ( \
1108
sidl_BaseInterface)sidl_rmi_InstanceRegistry_getInstanceByString( \
1109
objectID, _ex); SIDL_CHECK(*_ex);
1110
(*bi->d_epv->f_deleteRef)(bi->d_object, &throwaway_exception);
1111
retobj = (struct sidl_SIDLException__object*) (*bi->d_epv->f__cast)( \
1112
bi->d_object, "sidl.SIDLException", _ex);
1114
(*bi->d_epv->f_deleteRef)(bi->d_object, &throwaway_exception);
1118
instance = sidl_rmi_ProtocolFactory_connectInstance(url, \
1119
"sidl.SIDLException", ar, _ex ); SIDL_CHECK(*_ex);
1120
if ( instance == NULL) { return NULL; }
1122
(struct sidl_SIDLException__object*) malloc(
1123
sizeof(struct sidl_SIDLException__object));
1126
(struct sidl_SIDLException__remote*) malloc(
1127
sizeof(struct sidl_SIDLException__remote));
1129
if(!self || !r_obj) {
1130
sidl_MemAllocException ex = sidl_MemAllocException_getSingletonException( \
1133
sidl_MemAllocException_setNote(ex, "Out of memory.", _ex); SIDL_CHECK( \
1135
sidl_MemAllocException_add(ex, __FILE__, __LINE__, \
1136
"sidl.SIDLException.EPVgeneration", _ex);
1138
*_ex = (struct sidl_BaseInterface__object*)ex;
1142
r_obj->d_refcount = 1;
1143
r_obj->d_ih = instance;
1145
s1 = &s0->d_sidl_baseclass;
1147
LOCK_STATIC_GLOBALS;
1148
if (!s_remote_initialized) {
1149
sidl_SIDLException__init_remote_epv();
1151
UNLOCK_STATIC_GLOBALS;
1153
s1->d_sidl_baseinterface.d_epv = &s_rem_epv__sidl_baseinterface;
1154
s1->d_sidl_baseinterface.d_object = (void*) self;
1156
s1->d_data = (void*) r_obj;
1157
s1->d_epv = &s_rem_epv__sidl_baseclass;
1159
s0->d_sidl_baseexception.d_epv = &s_rem_epv__sidl_baseexception;
1160
s0->d_sidl_baseexception.d_object = (void*) self;
1162
s0->d_sidl_io_serializable.d_epv = &s_rem_epv__sidl_io_serializable;
1163
s0->d_sidl_io_serializable.d_object = (void*) self;
1165
s0->d_data = (void*) r_obj;
1166
s0->d_epv = &s_rem_epv__sidl_sidlexception;
1168
self->d_data = (void*) r_obj;
1172
if(self) { free(self); }
1173
if(r_obj) { free(r_obj); }
1176
/* Create an instance that uses an already existing */
1177
/* InstanceHandle to connect to an existing remote object. */
1178
static struct sidl_SIDLException__object*
1179
sidl_SIDLException__IHConnect(sidl_rmi_InstanceHandle instance, struct \
1180
sidl_BaseInterface__object* *_ex)
1182
struct sidl_SIDLException__object* self = NULL;
1184
struct sidl_SIDLException__object* s0;
1185
struct sidl_BaseClass__object* s1;
1187
struct sidl_SIDLException__remote* r_obj = NULL;
1189
(struct sidl_SIDLException__object*) malloc(
1190
sizeof(struct sidl_SIDLException__object));
1193
(struct sidl_SIDLException__remote*) malloc(
1194
sizeof(struct sidl_SIDLException__remote));
1196
if(!self || !r_obj) {
1197
sidl_MemAllocException ex = sidl_MemAllocException_getSingletonException( \
1200
sidl_MemAllocException_setNote(ex, "Out of memory.", _ex); SIDL_CHECK( \
1202
sidl_MemAllocException_add(ex, __FILE__, __LINE__, \
1203
"sidl.SIDLException.EPVgeneration", _ex);
1205
*_ex = (struct sidl_BaseInterface__object*)ex;
1209
r_obj->d_refcount = 1;
1210
r_obj->d_ih = instance;
1212
s1 = &s0->d_sidl_baseclass;
1214
LOCK_STATIC_GLOBALS;
1215
if (!s_remote_initialized) {
1216
sidl_SIDLException__init_remote_epv();
1218
UNLOCK_STATIC_GLOBALS;
1220
s1->d_sidl_baseinterface.d_epv = &s_rem_epv__sidl_baseinterface;
1221
s1->d_sidl_baseinterface.d_object = (void*) self;
1223
s1->d_data = (void*) r_obj;
1224
s1->d_epv = &s_rem_epv__sidl_baseclass;
1226
s0->d_sidl_baseexception.d_epv = &s_rem_epv__sidl_baseexception;
1227
s0->d_sidl_baseexception.d_object = (void*) self;
1229
s0->d_sidl_io_serializable.d_epv = &s_rem_epv__sidl_io_serializable;
1230
s0->d_sidl_io_serializable.d_object = (void*) self;
1232
s0->d_data = (void*) r_obj;
1233
s0->d_epv = &s_rem_epv__sidl_sidlexception;
1235
self->d_data = (void*) r_obj;
1237
sidl_rmi_InstanceHandle_addRef(instance,_ex);SIDL_CHECK(*_ex);
1240
if(self) { free(self); }
1241
if(r_obj) { free(r_obj); }
1244
/* REMOTE: generate remote instance given URL string. */
1245
static struct sidl_SIDLException__object*
1246
sidl_SIDLException__remoteCreate(const char *url, struct \
1247
sidl_BaseInterface__object **_ex)
1249
struct sidl_BaseInterface__object* _throwaway_exception = NULL;
1250
struct sidl_SIDLException__object* self = NULL;
1252
struct sidl_SIDLException__object* s0;
1253
struct sidl_BaseClass__object* s1;
1255
struct sidl_SIDLException__remote* r_obj = NULL;
1256
sidl_rmi_InstanceHandle instance = sidl_rmi_ProtocolFactory_createInstance( \
1257
url, "sidl.SIDLException", _ex ); SIDL_CHECK(*_ex);
1258
if ( instance == NULL) { return NULL; }
1260
(struct sidl_SIDLException__object*) malloc(
1261
sizeof(struct sidl_SIDLException__object));
1264
(struct sidl_SIDLException__remote*) malloc(
1265
sizeof(struct sidl_SIDLException__remote));
1267
if(!self || !r_obj) {
1268
sidl_MemAllocException ex = sidl_MemAllocException_getSingletonException( \
1271
sidl_MemAllocException_setNote(ex, "Out of memory.", _ex); SIDL_CHECK( \
1273
sidl_MemAllocException_add(ex, __FILE__, __LINE__, \
1274
"sidl.SIDLException.EPVgeneration", _ex);
1276
*_ex = (struct sidl_BaseInterface__object*)ex;
1280
r_obj->d_refcount = 1;
1281
r_obj->d_ih = instance;
1283
s1 = &s0->d_sidl_baseclass;
1285
LOCK_STATIC_GLOBALS;
1286
if (!s_remote_initialized) {
1287
sidl_SIDLException__init_remote_epv();
1289
UNLOCK_STATIC_GLOBALS;
1291
s1->d_sidl_baseinterface.d_epv = &s_rem_epv__sidl_baseinterface;
1292
s1->d_sidl_baseinterface.d_object = (void*) self;
1294
s1->d_data = (void*) r_obj;
1295
s1->d_epv = &s_rem_epv__sidl_baseclass;
1297
s0->d_sidl_baseexception.d_epv = &s_rem_epv__sidl_baseexception;
1298
s0->d_sidl_baseexception.d_object = (void*) self;
1300
s0->d_sidl_io_serializable.d_epv = &s_rem_epv__sidl_io_serializable;
1301
s0->d_sidl_io_serializable.d_object = (void*) self;
1303
s0->d_data = (void*) r_obj;
1304
s0->d_epv = &s_rem_epv__sidl_sidlexception;
1306
self->d_data = (void*) r_obj;
1310
if(instance) { sidl_rmi_InstanceHandle_deleteRef(instance, \
1311
&_throwaway_exception); }
1312
if(self) { free(self); }
1313
if(r_obj) { free(r_obj); }
1317
* RMI connector function for the class.
1320
struct sidl_SIDLException__object*
1321
sidl_SIDLException__connectI(const char* url, sidl_bool ar, struct \
1322
sidl_BaseInterface__object **_ex)
1324
return sidl_SIDLException__remoteConnect(url, ar, _ex);
1332
pStub_SIDLException__connect(PyObject *_ignored, PyObject *_args, PyObject \
1334
PyObject *_return_value = NULL;
1335
struct sidl_SIDLException__object* self = NULL;
1337
struct sidl_BaseInterface__object *_exception = NULL;
1338
static char *_kwlist[] = {
1343
sidl_rmi_NetworkException__import();
1344
_okay = PyArg_ParseTupleAndKeywords(
1349
self = sidl_SIDLException__remoteConnect(url,1,&_exception);
1351
struct sidl_rmi_NetworkException__object *_ex0;
1352
if ((_ex0 = (struct sidl_rmi_NetworkException__object *)
1353
sidl_PyExceptionCast(_exception, "sidl.rmi.NetworkException"))) {
1354
struct sidl_BaseInterface__object *throwaway_exception;
1355
PyObject *_obj = sidl_rmi_NetworkException__wrap(_ex0);
1356
PyObject *_eargs = PyTuple_New(1);
1357
PyTuple_SetItem(_eargs, 0, _obj);
1358
_obj = PyObject_CallObject(sidl_rmi_NetworkException__type, _eargs);
1359
PyErr_SetObject(sidl_rmi_NetworkException__type, _obj);
1361
(*(_exception->d_epv->f_deleteRef))(_exception->d_object, \
1362
&throwaway_exception);
1367
_return_value = Py_BuildValue(
1369
(void *)sidl_SIDLException__wrap, self);
1372
return _return_value;
1377
staticforward PyTypeObject _sidl_SIDLExceptionType;
1379
static const struct sidl_SIDLException__external *_implEPV = NULL;
1382
pStub_SIDLException__exec(PyObject *_self, PyObject *_args, PyObject \
1384
PyObject *_return_value = NULL;
1385
struct sidl_SIDLException__object *_self_ior =
1386
((struct sidl_SIDLException__object *)
1387
sidl_Cast(_self, "sidl.SIDLException"));
1389
char* methodName = NULL;
1390
struct sidl_rmi_Call__object* inArgs = NULL;
1391
struct sidl_rmi_Return__object* outArgs = NULL;
1392
struct sidl_BaseInterface__object *_exception = NULL;
1393
static char *_kwlist[] = {
1400
sidl_RuntimeException__import();
1401
sidl_rmi_Call__import();
1402
sidl_rmi_Return__import();
1403
_okay = PyArg_ParseTupleAndKeywords(
1407
(void *)sidl_rmi_Call__convert, &inArgs,
1408
(void *)sidl_rmi_Return__convert, &outArgs);
1410
(*(_self_ior->d_epv->f__exec))(_self_ior, methodName, inArgs, outArgs, \
1413
struct sidl_RuntimeException__object *_ex0;
1414
if ((_ex0 = (struct sidl_RuntimeException__object *)
1415
sidl_PyExceptionCast(_exception, "sidl.RuntimeException"))) {
1416
struct sidl_BaseInterface__object *throwaway_exception;
1417
PyObject *_obj = sidl_RuntimeException__wrap(_ex0);
1418
PyObject *_eargs = PyTuple_New(1);
1419
PyTuple_SetItem(_eargs, 0, _obj);
1420
_obj = PyObject_CallObject(sidl_RuntimeException__type, _eargs);
1421
PyErr_SetObject(sidl_RuntimeException__type, _obj);
1423
(*(_exception->d_epv->f_deleteRef))(_exception->d_object, \
1424
&throwaway_exception);
1429
_return_value = Py_None;
1430
Py_INCREF(_return_value);
1432
sidl_rmi_Call_deref(inArgs);
1433
sidl_rmi_Return_deref(outArgs);
1436
struct sidl_BaseInterface__object *throwaway_exception;
1437
(*(_self_ior->d_epv->f_deleteRef))(_self_ior, &throwaway_exception);
1441
PyErr_SetString(PyExc_TypeError,
1442
"self pointer is not a sidl.SIDLException");
1444
return _return_value;
1448
pStub_SIDLException__getURL(PyObject *_self, PyObject *_args, PyObject \
1450
PyObject *_return_value = NULL;
1451
struct sidl_SIDLException__object *_self_ior =
1452
((struct sidl_SIDLException__object *)
1453
sidl_Cast(_self, "sidl.SIDLException"));
1455
struct sidl_BaseInterface__object *_exception = NULL;
1456
static char *_kwlist[] = {
1460
sidl_RuntimeException__import();
1461
_okay = PyArg_ParseTupleAndKeywords(
1465
char* _return = NULL;
1466
_return = (*(_self_ior->d_epv->f__getURL))(_self_ior, &_exception);
1468
struct sidl_RuntimeException__object *_ex0;
1469
if ((_ex0 = (struct sidl_RuntimeException__object *)
1470
sidl_PyExceptionCast(_exception, "sidl.RuntimeException"))) {
1471
struct sidl_BaseInterface__object *throwaway_exception;
1472
PyObject *_obj = sidl_RuntimeException__wrap(_ex0);
1473
PyObject *_eargs = PyTuple_New(1);
1474
PyTuple_SetItem(_eargs, 0, _obj);
1475
_obj = PyObject_CallObject(sidl_RuntimeException__type, _eargs);
1476
PyErr_SetObject(sidl_RuntimeException__type, _obj);
1478
(*(_exception->d_epv->f_deleteRef))(_exception->d_object, \
1479
&throwaway_exception);
1484
_return_value = Py_BuildValue(
1487
free((void *)_return);
1491
struct sidl_BaseInterface__object *throwaway_exception;
1492
(*(_self_ior->d_epv->f_deleteRef))(_self_ior, &throwaway_exception);
1496
PyErr_SetString(PyExc_TypeError,
1497
"self pointer is not a sidl.SIDLException");
1499
return _return_value;
1503
pStub_SIDLException__isLocal(PyObject *_self, PyObject *_args, PyObject \
1505
PyObject *_return_value = NULL;
1506
struct sidl_SIDLException__object *_self_ior =
1507
((struct sidl_SIDLException__object *)
1508
sidl_Cast(_self, "sidl.SIDLException"));
1510
struct sidl_BaseInterface__object *_exception = NULL;
1511
static char *_kwlist[] = {
1515
sidl_RuntimeException__import();
1516
_okay = PyArg_ParseTupleAndKeywords(
1520
sidl_bool _return = (sidl_bool) 0;
1522
_return = !(*(_self_ior->d_epv->f__isRemote))(_self_ior, &_exception);
1523
_proxy__return = _return;
1525
struct sidl_RuntimeException__object *_ex0;
1526
if ((_ex0 = (struct sidl_RuntimeException__object *)
1527
sidl_PyExceptionCast(_exception, "sidl.RuntimeException"))) {
1528
struct sidl_BaseInterface__object *throwaway_exception;
1529
PyObject *_obj = sidl_RuntimeException__wrap(_ex0);
1530
PyObject *_eargs = PyTuple_New(1);
1531
PyTuple_SetItem(_eargs, 0, _obj);
1532
_obj = PyObject_CallObject(sidl_RuntimeException__type, _eargs);
1533
PyErr_SetObject(sidl_RuntimeException__type, _obj);
1535
(*(_exception->d_epv->f_deleteRef))(_exception->d_object, \
1536
&throwaway_exception);
1541
_return_value = Py_BuildValue(
1547
struct sidl_BaseInterface__object *throwaway_exception;
1548
(*(_self_ior->d_epv->f_deleteRef))(_self_ior, &throwaway_exception);
1552
PyErr_SetString(PyExc_TypeError,
1553
"self pointer is not a sidl.SIDLException");
1555
return _return_value;
1559
pStub_SIDLException__isRemote(PyObject *_self, PyObject *_args, PyObject \
1561
PyObject *_return_value = NULL;
1562
struct sidl_SIDLException__object *_self_ior =
1563
((struct sidl_SIDLException__object *)
1564
sidl_Cast(_self, "sidl.SIDLException"));
1566
struct sidl_BaseInterface__object *_exception = NULL;
1567
static char *_kwlist[] = {
1571
sidl_RuntimeException__import();
1572
_okay = PyArg_ParseTupleAndKeywords(
1576
sidl_bool _return = (sidl_bool) 0;
1578
_return = (*(_self_ior->d_epv->f__isRemote))(_self_ior, &_exception);
1579
_proxy__return = _return;
1581
struct sidl_RuntimeException__object *_ex0;
1582
if ((_ex0 = (struct sidl_RuntimeException__object *)
1583
sidl_PyExceptionCast(_exception, "sidl.RuntimeException"))) {
1584
struct sidl_BaseInterface__object *throwaway_exception;
1585
PyObject *_obj = sidl_RuntimeException__wrap(_ex0);
1586
PyObject *_eargs = PyTuple_New(1);
1587
PyTuple_SetItem(_eargs, 0, _obj);
1588
_obj = PyObject_CallObject(sidl_RuntimeException__type, _eargs);
1589
PyErr_SetObject(sidl_RuntimeException__type, _obj);
1591
(*(_exception->d_epv->f_deleteRef))(_exception->d_object, \
1592
&throwaway_exception);
1597
_return_value = Py_BuildValue(
1603
struct sidl_BaseInterface__object *throwaway_exception;
1604
(*(_self_ior->d_epv->f_deleteRef))(_self_ior, &throwaway_exception);
1608
PyErr_SetString(PyExc_TypeError,
1609
"self pointer is not a sidl.SIDLException");
1611
return _return_value;
1615
pStub_SIDLException__set_hooks(PyObject *_self, PyObject *_args, PyObject \
1617
PyObject *_return_value = NULL;
1618
struct sidl_SIDLException__object *_self_ior =
1619
((struct sidl_SIDLException__object *)
1620
sidl_Cast(_self, "sidl.SIDLException"));
1622
sidl_bool on = (sidl_bool) 0;
1623
struct sidl_BaseInterface__object *_exception = NULL;
1625
static char *_kwlist[] = {
1630
sidl_RuntimeException__import();
1631
_okay = PyArg_ParseTupleAndKeywords(
1636
on = (_proxy_on ? (TRUE) : (FALSE));
1637
(*(_self_ior->d_epv->f__set_hooks))(_self_ior, on, &_exception);
1639
struct sidl_RuntimeException__object *_ex0;
1640
if ((_ex0 = (struct sidl_RuntimeException__object *)
1641
sidl_PyExceptionCast(_exception, "sidl.RuntimeException"))) {
1642
struct sidl_BaseInterface__object *throwaway_exception;
1643
PyObject *_obj = sidl_RuntimeException__wrap(_ex0);
1644
PyObject *_eargs = PyTuple_New(1);
1645
PyTuple_SetItem(_eargs, 0, _obj);
1646
_obj = PyObject_CallObject(sidl_RuntimeException__type, _eargs);
1647
PyErr_SetObject(sidl_RuntimeException__type, _obj);
1649
(*(_exception->d_epv->f_deleteRef))(_exception->d_object, \
1650
&throwaway_exception);
1655
_return_value = Py_None;
1656
Py_INCREF(_return_value);
1660
struct sidl_BaseInterface__object *throwaway_exception;
1661
(*(_self_ior->d_epv->f_deleteRef))(_self_ior, &throwaway_exception);
1665
PyErr_SetString(PyExc_TypeError,
1666
"self pointer is not a sidl.SIDLException");
1668
return _return_value;
1672
sidl_SIDLException_createCast(PyObject *self, PyObject *args, PyObject *kwds) \
1674
struct sidl_SIDLException__object *optarg = NULL;
1676
PyObject * implObj = NULL;
1677
static char *_kwlist[] = {"sobj", "url", "impl", NULL };
1678
int _okay = PyArg_ParseTupleAndKeywords(args, kwds, "|O&zO", _kwlist, (void \
1679
*)sidl_SIDLException__convert, &optarg, &url, &implObj);
1681
if (!optarg && !url && !implObj) {
1682
struct sidl_BaseInterface__object *_exception;
1683
optarg = (*(_implEPV->createObject))(NULL,&_exception);
1685
sidl_RuntimeException__import();
1687
struct sidl_RuntimeException__object *_ex0;
1688
if ((_ex0 = (struct sidl_RuntimeException__object *)
1689
sidl_PyExceptionCast(_exception, "sidl.RuntimeException"))) {
1690
struct sidl_BaseInterface__object *throwaway_exception;
1691
PyObject *_obj = sidl_RuntimeException__wrap(_ex0);
1692
PyObject *_eargs = PyTuple_New(1);
1693
PyTuple_SetItem(_eargs, 0, _obj);
1694
_obj = PyObject_CallObject(sidl_RuntimeException__type, _eargs);
1695
PyErr_SetObject(sidl_RuntimeException__type, _obj);
1697
(*(_exception->d_epv->f_deleteRef))(_exception->d_object, \
1698
&throwaway_exception);
1705
else if (!optarg && !url && implObj) {
1706
struct sidl_BaseInterface__object *_exception;
1708
optarg = (*(_implEPV->createObject))((void*)implObj,&_exception);
1710
sidl_RuntimeException__import();
1712
struct sidl_RuntimeException__object *_ex0;
1713
if ((_ex0 = (struct sidl_RuntimeException__object *)
1714
sidl_PyExceptionCast(_exception, "sidl.RuntimeException"))) {
1715
struct sidl_BaseInterface__object *throwaway_exception;
1716
PyObject *_obj = sidl_RuntimeException__wrap(_ex0);
1717
PyObject *_eargs = PyTuple_New(1);
1718
PyTuple_SetItem(_eargs, 0, _obj);
1719
_obj = PyObject_CallObject(sidl_RuntimeException__type, _eargs);
1720
PyErr_SetObject(sidl_RuntimeException__type, _obj);
1722
(*(_exception->d_epv->f_deleteRef))(_exception->d_object, \
1723
&throwaway_exception);
1733
else if(url && !optarg && !implObj) {
1734
struct sidl_BaseInterface__object *_exception = NULL;
1735
optarg = sidl_SIDLException__remoteCreate(url,&_exception);
1737
sidl_rmi_NetworkException__import();
1738
struct sidl_rmi_NetworkException__object *_ex0;
1739
if ((_ex0 = (struct sidl_rmi_NetworkException__object *)
1740
sidl_PyExceptionCast(_exception, "sidl.rmi.NetworkException"))) {
1741
struct sidl_BaseInterface__object *throwaway_exception;
1742
PyObject *_obj = sidl_rmi_NetworkException__wrap(_ex0);
1743
PyObject *_eargs = PyTuple_New(1);
1744
PyTuple_SetItem(_eargs, 0, _obj);
1745
_obj = PyObject_CallObject(sidl_rmi_NetworkException__type, _eargs);
1746
PyErr_SetObject(sidl_rmi_NetworkException__type, _obj);
1748
(*(_exception->d_epv->f_deleteRef))(_exception->d_object, \
1749
&throwaway_exception);
1758
/* OK, but fall though */
1759
else if(!url && optarg && !implObj) {}
1764
return sidl_Object_Init(
1766
(struct sidl_BaseInterface__object *)optarg,
1772
static PyMethodDef _SIDLExceptionModuleMethods[] = {
1776
{ "_connect", (PyCFunction)pStub_SIDLException__connect,
1777
(METH_VARARGS | METH_KEYWORDS),
1779
_connect( in string url)\n\
1781
( out sidl.SIDLException self)\n\
1783
sidl.rmi.NetworkException\n\
1792
static PyMethodDef _SIDLExceptionObjectMethods[] = {
1793
{ "_exec", (PyCFunction)pStub_SIDLException__exec,
1794
(METH_VARARGS | METH_KEYWORDS),
1796
_exec( in string methodName,\n\
1797
in sidl.rmi.Call inArgs,\n\
1798
in sidl.rmi.Return outArgs)\n\
1802
sidl.RuntimeException\n\
1805
Select and execute a method by name"
1807
{ "_getURL", (PyCFunction)pStub_SIDLException__getURL,
1808
(METH_VARARGS | METH_KEYWORDS),
1814
sidl.RuntimeException\n\
1817
Get the URL of the Implementation of this object (for RMI)"
1819
{ "_isLocal", (PyCFunction)pStub_SIDLException__isLocal,
1820
(METH_VARARGS | METH_KEYWORDS),
1826
sidl.RuntimeException\n\
1829
TRUE if this object is local, false if remote"
1831
{ "_isRemote", (PyCFunction)pStub_SIDLException__isRemote,
1832
(METH_VARARGS | METH_KEYWORDS),
1838
sidl.RuntimeException\n\
1841
TRUE if this object is remote, false if local"
1843
{ "_set_hooks", (PyCFunction)pStub_SIDLException__set_hooks,
1844
(METH_VARARGS | METH_KEYWORDS),
1846
_set_hooks( in bool on)\n\
1850
sidl.RuntimeException\n\
1853
Method to set whether or not method hooks should be invoked."
1858
static PyTypeObject _sidl_SIDLExceptionType = {
1859
PyObject_HEAD_INIT(NULL)
1861
"sidl.SIDLException.SIDLException", /* tp_name */
1862
0, /* tp_basicsize */
1863
0, /* tp_itemsize */
1870
0, /* tp_as_number */
1871
0, /* tp_as_sequence */
1872
0, /* tp_as_mapping */
1876
0, /* tp_getattro */
1877
0, /* tp_setattro */
1878
0, /* tp_as_buffer */
1879
Py_TPFLAGS_DEFAULT, /* tp_flags */
1882
<code>SIDLException</code> provides the basic functionality of the\n\
1883
<code>BaseException</code> interface for getting and setting error\n\
1884
messages and stack traces.", /* tp_doc */
1885
0, /* tp_traverse */
1887
0, /* tp_richcompare */
1888
0, /* tp_weaklistoffset */
1890
0, /* tp_iternext */
1891
_SIDLExceptionObjectMethods, /* tp_methods */
1896
0, /* tp_descr_get */
1897
0, /* tp_descr_set */
1898
0, /* tp_dictoffset */
1899
sidl_SIDLException_createCast, /* tp_init */
1904
sidl_SIDLException__wrap_RETURN
1905
sidl_SIDLException__wrap sidl_SIDLException__wrap_PROTO {
1908
result = _sidl_SIDLExceptionType.tp_new(&_sidl_SIDLExceptionType, NULL, \
1911
if (sidl_Object_Init(
1913
(struct sidl_BaseInterface__object *)(sidlobj),
1928
sidl_SIDLException__weakRef_RETURN
1929
sidl_SIDLException__weakRef sidl_SIDLException__weakRef_PROTO {
1932
result = _sidl_SIDLExceptionType.tp_new(&_sidl_SIDLExceptionType, NULL, \
1935
if (sidl_Object_Init(
1937
(struct sidl_BaseInterface__object *)(sidlobj),
1952
sidl_SIDLException_deref_RETURN
1953
sidl_SIDLException_deref sidl_SIDLException_deref_PROTO {
1955
struct sidl_BaseInterface__object *throwaway_exception;
1956
(*(sidlobj->d_epv->f_deleteRef))(sidlobj, &throwaway_exception);
1960
sidl_SIDLException__newRef_RETURN
1961
sidl_SIDLException__newRef sidl_SIDLException__newRef_PROTO {
1964
result = _sidl_SIDLExceptionType.tp_new(&_sidl_SIDLExceptionType, NULL, \
1967
if (sidl_Object_Init(
1969
(struct sidl_BaseInterface__object *)(sidlobj),
1984
sidl_SIDLException__addRef_RETURN
1985
sidl_SIDLException__addRef sidl_SIDLException__addRef_PROTO {
1987
struct sidl_BaseInterface__object *throwaway_exception;
1988
(*(sidlobj->d_epv->f_addRef))(sidlobj, &throwaway_exception);
1992
sidl_SIDLException_PyType_RETURN
1993
sidl_SIDLException_PyType sidl_SIDLException_PyType_PROTO {
1994
Py_INCREF(&_sidl_SIDLExceptionType);
1995
return &_sidl_SIDLExceptionType;
1998
sidl_SIDLException__convert_RETURN
1999
sidl_SIDLException__convert sidl_SIDLException__convert_PROTO {
2001
struct sidl_BaseInterface__object *throwaway_exception;
2002
(*((*sidlobj)->d_epv->f_deleteRef))((*sidlobj), &throwaway_exception);
2004
*sidlobj = sidl_Cast(obj, "sidl.SIDLException");
2005
if ((!(*sidlobj)) && (obj != Py_None)) {
2006
PyErr_SetString(PyExc_TypeError,
2007
"argument is not a(n) sidl.SIDLException");
2014
_convertPython(void *sidlarray, const int *ind, PyObject *pyobj)
2016
struct sidl_SIDLException__object *sidlobj = NULL;
2017
if (sidl_SIDLException__convert(pyobj, &sidlobj)) {
2018
sidl_interface__array_set((struct sidl_interface__array *)sidlarray,
2019
ind, (struct sidl_BaseInterface__object *)sidlobj);
2021
struct sidl_BaseInterface__object *asInt = (struct \
2022
sidl_BaseInterface__object *)sidlobj;
2023
struct sidl_BaseInterface__object *throwaway_exception;
2024
(*asInt->d_epv->f_deleteRef)(asInt->d_object, &throwaway_exception);
2031
sidl_SIDLException__convert_python_array_RETURN
2032
sidl_SIDLException__convert_python_array \
2033
sidl_SIDLException__convert_python_array_PROTO {
2036
sidl__array_deleteRef((struct sidl__array *)*sidlarray);
2039
if (obj == Py_None) {
2043
PyObject *pya = PyArray_FromObject(obj, PyArray_OBJECT, 0, 0);
2045
if (PyArray_OBJECT == ((PyArrayObject *)pya)->descr->type_num) {
2046
int dimen, lower[SIDL_MAX_ARRAY_DIMENSION],
2047
upper[SIDL_MAX_ARRAY_DIMENSION],
2048
stride[SIDL_MAX_ARRAY_DIMENSION];
2049
if (sidl_array__extract_python_info
2050
(pya, &dimen, lower, upper, stride))
2052
*sidlarray = (struct \
2053
sidl_SIDLException__array*)sidl_interface__array_createRow
2054
(dimen, lower, upper);
2055
result = sidl_array__convert_python
2056
(pya, dimen, *sidlarray, _convertPython);
2057
if (*sidlarray && !result) {
2058
sidl_interface__array_deleteRef(
2059
(struct sidl_interface__array *)*sidlarray);
2071
_convertSIDL(void *sidlarray, const int *ind, PyObject **dest)
2073
struct sidl_SIDLException__object *sidlobj = (struct \
2074
sidl_SIDLException__object*)
2075
sidl_interface__array_get((struct sidl_interface__array *)
2077
*dest = sidl_SIDLException__wrap(sidlobj);
2078
return (*dest == NULL);
2081
sidl_SIDLException__convert_sidl_array_RETURN
2082
sidl_SIDLException__convert_sidl_array \
2083
sidl_SIDLException__convert_sidl_array_PROTO {
2084
PyObject *pya = NULL;
2086
const int dimen = sidlArrayDim(sidlarray);
2092
int32_t s_numelem[7];
2094
int * const lower = (int *)(sidlarray->d_lower);
2095
int * const upper = (int *)(sidlarray->d_upper);
2096
int32_t * const s_numelem = numelem;
2099
for(i = 0; i < dimen; ++i) {
2100
start[i] = sidlLower(sidlarray, i);
2102
lower[i] = sidlLower(sidlarray, i);
2103
upper[i] = sidlUpper(sidlarray, i);
2104
s_numelem[i] = sidlLength(sidlarray, i);
2106
numelem[i] = 1 + upper[i] - lower[i];
2108
pya = PyArray_FromDims(dimen, numelem, PyArray_OBJECT);
2110
if (!sidl_array__convert_sidl(pya, dimen, start,
2112
s_numelem, sidlarray, _convertSIDL))
2127
initSIDLException(void) {
2128
PyObject *module, *dict, *c_api;
2129
PyObject *_exceptionBases, *_exceptionDict, *_exceptionName;
2130
static void *ExternalAPI[sidl_SIDLException__API_NUM];
2131
struct sidl_BaseInterface__object *throwaway_exception;
2132
module = Py_InitModule3("SIDLException", _SIDLExceptionModuleMethods, "\
2134
<code>SIDLException</code> provides the basic functionality of the\n\
2135
<code>BaseException</code> interface for getting and setting error\n\
2136
messages and stack traces."
2138
dict = PyModule_GetDict(module);
2139
ExternalAPI[sidl_SIDLException__wrap_NUM] = (void*)sidl_SIDLException__wrap;
2140
ExternalAPI[sidl_SIDLException__convert_NUM] = ( \
2141
void*)sidl_SIDLException__convert;
2142
ExternalAPI[sidl_SIDLException__convert_python_array_NUM] = ( \
2143
void*)sidl_SIDLException__convert_python_array;
2144
ExternalAPI[sidl_SIDLException__convert_sidl_array_NUM] = ( \
2145
void*)sidl_SIDLException__convert_sidl_array;
2146
ExternalAPI[sidl_SIDLException__weakRef_NUM] = ( \
2147
void*)sidl_SIDLException__weakRef;
2148
ExternalAPI[sidl_SIDLException_deref_NUM] = (void*)sidl_SIDLException_deref;
2149
ExternalAPI[sidl_SIDLException__newRef_NUM] = ( \
2150
void*)sidl_SIDLException__newRef;
2151
ExternalAPI[sidl_SIDLException__addRef_NUM] = ( \
2152
void*)sidl_SIDLException__addRef;
2153
ExternalAPI[sidl_SIDLException_PyType_NUM] = ( \
2154
void*)sidl_SIDLException_PyType;
2156
ExternalAPI[sidl_SIDLException__connectI_NUM] = ( \
2157
void*)sidl_SIDLException__connectI;
2160
if (PyErr_Occurred()) {
2161
Py_FatalError("Error importing sidlObjA module.");
2163
/* Initialize to temporary value. */
2165
ExternalAPI[sidl_SIDLException__type_NUM] = Py_None;
2166
c_api = PyCObject_FromVoidPtr((void *)ExternalAPI, NULL);
2167
PyDict_SetItemString(dict, "_C_API", c_api);
2169
import_SIDLPyArrays();
2170
if (PyErr_Occurred()) {
2171
Py_FatalError("Error importing sidlPyArrays module.");
2174
if (PyErr_Occurred()) {
2175
Py_FatalError("Error importing Numeric Python module.");
2177
sidl_BaseClass__import();
2178
sidl_BaseException__import();
2179
_sidl_SIDLExceptionType.tp_base = sidl_BaseClass_PyType();
2180
_sidl_SIDLExceptionType.tp_bases = PyTuple_New(2);
2181
PyTuple_SetItem(_sidl_SIDLExceptionType.tp_bases,0, (PyObject \
2182
*)sidl_BaseClass_PyType());
2183
PyTuple_SetItem(_sidl_SIDLExceptionType.tp_bases,1, (PyObject \
2184
*)sidl_BaseException_PyType());
2185
if (PyType_Ready(&_sidl_SIDLExceptionType) < 0) {
2187
fprintf(stderr, "PyType_Ready on sidl.SIDLException failed.\n");
2190
Py_INCREF(&_sidl_SIDLExceptionType);
2191
PyDict_SetItemString(dict, "SIDLException", (PyObject \
2192
*)&_sidl_SIDLExceptionType);
2193
_exceptionBases = PyTuple_New(1);
2194
Py_INCREF(sidl_BaseException__type);
2195
PyTuple_SetItem(_exceptionBases, 0, sidl_BaseException__type);
2196
_exceptionDict = PyDict_New();
2197
PyDict_SetItemString(_exceptionDict, "__module__",
2198
PyString_InternFromString("sidl.SIDLException"));
2199
_exceptionName = PyString_InternFromString("_Exception");
2200
sidl_SIDLException__type = PyClass_New(_exceptionBases, _exceptionDict, \
2202
Py_XDECREF(_exceptionBases);
2203
Py_XDECREF(_exceptionDict);
2204
Py_XDECREF(_exceptionName);
2205
Py_XINCREF(sidl_SIDLException__type);
2206
PyDict_SetItemString(dict, "_Exception", sidl_SIDLException__type);
2207
ExternalAPI[sidl_SIDLException__type_NUM] = sidl_SIDLException__type;
2209
* If it's safe, add "Exception" for backward compatibility
2210
* with Babel 0.10.2 (and previous).
2213
if (!PyDict_GetItemString(dict, "Exception")) {
2214
Py_XINCREF(sidl_SIDLException__type);
2215
PyDict_SetItemString(dict, "Exception", sidl_SIDLException__type);
2217
_implEPV = sidl_SIDLException__externals();
2219
Py_FatalError("Cannot load implementation for sidl class \
2220
sidl.SIDLException");
2226
sidl_rmi_ConnectRegistry_registerConnect("sidl.SIDLException", ( \
2227
void*)sidl_SIDLException__IHConnect, &throwaway_exception);