~ubuntu-branches/ubuntu/raring/babel/raring-proposed

« back to all changes in this revision

Viewing changes to runtime/python/sidl/sidl_SIDLException_Module.c

  • Committer: Bazaar Package Importer
  • Author(s): Adam C. Powell, IV
  • Date: 2008-08-01 07:56:58 UTC
  • mfrom: (3.1.2 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080801075658-9ezcrbh8dcs8lg70
Tags: 1.2.0.dfsg-6
Added libparsifal-dev as dependency to libsidl-dev (closes: #483324).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * File:          sidl_SIDLException_Module.c
 
3
 * Symbol:        sidl.SIDLException-v0.9.17
 
4
 * Symbol Type:   class
 
5
 * Babel Version: 1.2.0
 
6
 * Release:       $Name:  $
 
7
 * Revision:      @(#) $Id: $
 
8
 * Description:   implement a C extension type for a sidl extendable
 
9
 * 
 
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.
 
14
 * 
 
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
 
18
 * License.
 
19
 * 
 
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.
 
23
 * 
 
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.
 
28
 * 
 
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
 
32
 * 
 
33
 * WARNING: Automatically generated; changes will be lost
 
34
 * 
 
35
 */
 
36
 
 
37
/*
 
38
 * THIS CODE IS AUTOMATICALLY GENERATED BY THE BABEL
 
39
 * COMPILER. DO NOT EDIT THIS!
 
40
 * 
 
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.
 
45
 */
 
46
 
 
47
 
 
48
/**
 
49
 * Symbol "sidl.SIDLException" (version 0.9.17)
 
50
 * 
 
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.
 
54
 */
 
55
#include <Python.h>
 
56
#include <stdlib.h>
 
57
#include <string.h>
 
58
#include <stdio.h>
 
59
#ifndef included_sidl_BaseClass_h
 
60
#include "sidl_BaseClass.h"
 
61
#endif
 
62
#ifndef included_sidl_ClassInfo_h
 
63
#include "sidl_ClassInfo.h"
 
64
#endif
 
65
#ifndef included_sidl_rmi_ProtocolFactory_h
 
66
#include "sidl_rmi_ProtocolFactory.h"
 
67
#endif
 
68
#ifndef included_sidl_rmi_InstanceRegistry_h
 
69
#include "sidl_rmi_InstanceRegistry.h"
 
70
#endif
 
71
#ifndef included_sidl_rmi_InstanceHandle_h
 
72
#include "sidl_rmi_InstanceHandle.h"
 
73
#endif
 
74
#ifndef included_sidl_rmi_Invocation_h
 
75
#include "sidl_rmi_Invocation.h"
 
76
#endif
 
77
#ifndef included_sidl_rmi_Response_h
 
78
#include "sidl_rmi_Response.h"
 
79
#endif
 
80
#ifndef included_sidl_rmi_ServerRegistry_h
 
81
#include "sidl_rmi_ServerRegistry.h"
 
82
#endif
 
83
#ifndef included_sidl_rmi_ConnectRegistry_h
 
84
#include "sidl_rmi_ConnectRegistry.h"
 
85
#endif
 
86
#ifndef included_sidl_io_Serializable_h
 
87
#include "sidl_io_Serializable.h"
 
88
#endif
 
89
#ifndef included_sidl_MemAllocException_h
 
90
#include "sidl_MemAllocException.h"
 
91
#endif
 
92
#ifndef included_sidl_NotImplementedException_h
 
93
#include "sidl_NotImplementedException.h"
 
94
#endif
 
95
#include "sidl_Exception.h"
 
96
 
 
97
#ifndef NULL
 
98
#define NULL 0
 
99
#endif
 
100
 
 
101
#include "sidl_thread.h"
 
102
#ifdef HAVE_PTHREAD
 
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) */
 
107
#else
 
108
#define LOCK_STATIC_GLOBALS
 
109
#define UNLOCK_STATIC_GLOBALS
 
110
/* #define HAVE_LOCKED_STATIC_GLOBALS (1) */
 
111
#endif
 
112
 
 
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"
 
117
#endif
 
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"
 
124
#else
 
125
#error Neither Numeric Python nor NumPy installed
 
126
#endif
 
127
#ifndef included_sidl_Loader_h
 
128
#include "sidl_Loader.h"
 
129
#endif
 
130
#ifndef included_sidl_header_h
 
131
#include "sidl_header.h"
 
132
#endif
 
133
#ifndef included_sidl_interface_IOR_h
 
134
#include "sidl_interface_IOR.h"
 
135
#endif
 
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"
 
148
#include <stdlib.h>
 
149
#include <string.h>
 
150
#include <stddef.h>
 
151
#include <stdio.h>
 
152
 
 
153
/*
 
154
 * lang_inited is a boolean value showing if we have already imported all the nescessary modules
 
155
 */
 
156
 
 
157
static int lang_inited = 0;
 
158
 
 
159
#define LANG_SPECIFIC_INIT() if(!lang_inited) { \
 
160
  lang_inited = 1; \
 
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(); \
 
171
}
 
172
 
 
173
#ifdef WITH_RMI
 
174
 
 
175
/**
 
176
 * RMI connector function for the class. (no addref)
 
177
 */
 
178
struct sidl_SIDLException__object*
 
179
sidl_SIDLException__connectI(const char * url, sidl_bool ar, struct           \
 
180
  sidl_BaseInterface__object **_ex);
 
181
 
 
182
 
 
183
#endif /*WITH_RMI*/
 
184
 
 
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;
 
188
 
 
189
/* Static variables for managing EPV initialization. */
 
190
static int s_remote_initialized = 0;
 
191
 
 
192
static struct sidl_SIDLException__epv s_rem_epv__sidl_sidlexception;
 
193
 
 
194
static struct sidl_BaseClass__epv  s_rem_epv__sidl_baseclass;
 
195
 
 
196
static struct sidl_BaseException__epv s_rem_epv__sidl_baseexception;
 
197
 
 
198
static struct sidl_BaseInterface__epv  s_rem_epv__sidl_baseinterface;
 
199
 
 
200
static struct sidl_io_Serializable__epv s_rem_epv__sidl_io_serializable;
 
201
 
 
202
#ifdef WITH_RMI
 
203
 
 
204
 
 
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)
 
209
{
 
210
  int cmp;
 
211
  void* cast = NULL;
 
212
  *_ex = NULL; /* default to no exception */
 
213
  cmp = strcmp(name, "sidl.BaseInterface");
 
214
  if (!cmp) {
 
215
    (*self->d_epv->f_addRef)(self, _ex); SIDL_CHECK(*_ex);
 
216
    cast = &((*self).d_sidl_baseclass.d_sidl_baseinterface);
 
217
    return cast;
 
218
  }
 
219
  else if (cmp < 0) {
 
220
    cmp = strcmp(name, "sidl.BaseException");
 
221
    if (!cmp) {
 
222
      (*self->d_epv->f_addRef)(self, _ex); SIDL_CHECK(*_ex);
 
223
      cast = &((*self).d_sidl_baseexception);
 
224
      return cast;
 
225
    }
 
226
    else if (cmp < 0) {
 
227
      cmp = strcmp(name, "sidl.BaseClass");
 
228
      if (!cmp) {
 
229
        (*self->d_epv->f_addRef)(self, _ex); SIDL_CHECK(*_ex);
 
230
        cast = ((struct sidl_BaseClass__object*)self);
 
231
        return cast;
 
232
      }
 
233
    }
 
234
  }
 
235
  else if (cmp > 0) {
 
236
    cmp = strcmp(name, "sidl.io.Serializable");
 
237
    if (!cmp) {
 
238
      (*self->d_epv->f_addRef)(self, _ex); SIDL_CHECK(*_ex);
 
239
      cast = &((*self).d_sidl_io_serializable);
 
240
      return cast;
 
241
    }
 
242
    else if (cmp < 0) {
 
243
      cmp = strcmp(name, "sidl.SIDLException");
 
244
      if (!cmp) {
 
245
        (*self->d_epv->f_addRef)(self, _ex); SIDL_CHECK(*_ex);
 
246
        cast = ((struct sidl_SIDLException__object*)self);
 
247
        return cast;
 
248
      }
 
249
    }
 
250
  }
 
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, \
 
258
      _ex);
 
259
  }
 
260
 
 
261
  return cast;
 
262
  EXIT:
 
263
  return NULL;
 
264
}
 
265
 
 
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)
 
270
{
 
271
  *_ex = NULL;
 
272
  free((void*) self);
 
273
}
 
274
 
 
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* \
 
278
    *_ex)
 
279
{
 
280
  struct sidl_rmi_InstanceHandle__object *conn = ((struct                     \
 
281
    sidl_SIDLException__remote*)self->d_data)->d_ih;
 
282
  *_ex = NULL;
 
283
  if(conn != NULL) {
 
284
    return sidl_rmi_InstanceHandle_getObjectURL(conn, _ex);
 
285
  }
 
286
  return NULL;
 
287
}
 
288
 
 
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*  \
 
292
    *_ex)
 
293
{
 
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);
 
306
  if(netex != NULL) {
 
307
    *_ex = (struct sidl_BaseInterface__object*)netex;
 
308
    return;
 
309
  }
 
310
 
 
311
  /* cleanup and return */
 
312
  EXIT:
 
313
  if(_inv) { sidl_rmi_Invocation_deleteRef(_inv,&_throwaway); }
 
314
  if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp,&_throwaway); }
 
315
  return;
 
316
}
 
317
 
 
318
/* REMOTE ISREMOTE: returns true if this object is Remote (it is). */
 
319
static sidl_bool
 
320
remote_sidl_SIDLException__isRemote(
 
321
    struct sidl_SIDLException__object* self, 
 
322
    struct sidl_BaseInterface__object* *_ex) {
 
323
  *_ex = NULL;
 
324
  return TRUE;
 
325
}
 
326
 
 
327
/* REMOTE METHOD STUB:_set_hooks */
 
328
static void
 
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)
 
333
{
 
334
  LANG_SPECIFIC_INIT();
 
335
  *_ex = NULL;
 
336
  {
 
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);
 
345
 
 
346
    /* pack in and inout arguments */
 
347
    sidl_rmi_Invocation_packBool( _inv, "on", on, _ex);SIDL_CHECK(*_ex);
 
348
 
 
349
    /* send actual RMI request */
 
350
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
351
 
 
352
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
353
    if(_be != NULL) {
 
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);
 
358
      goto EXIT;
 
359
    }
 
360
 
 
361
    /* unpack out and inout arguments */
 
362
 
 
363
    /* cleanup and return */
 
364
    EXIT:
 
365
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
366
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
367
    return;
 
368
  }
 
369
}
 
370
 
 
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)
 
377
{
 
378
  *_ex = NULL;
 
379
}
 
380
 
 
381
/* REMOTE METHOD STUB:addRef */
 
382
static void
 
383
remote_sidl_SIDLException_addRef(
 
384
  /* in */ struct sidl_SIDLException__object *self ,
 
385
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
386
{
 
387
  LANG_SPECIFIC_INIT();
 
388
  *_ex = NULL;
 
389
  {
 
390
    struct sidl_SIDLException__remote* r_obj = (struct                        \
 
391
      sidl_SIDLException__remote*)self->d_data;
 
392
    LOCK_STATIC_GLOBALS;
 
393
    r_obj->d_refcount++;
 
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;
 
398
  }
 
399
}
 
400
 
 
401
/* REMOTE METHOD STUB:deleteRef */
 
402
static void
 
403
remote_sidl_SIDLException_deleteRef(
 
404
  /* in */ struct sidl_SIDLException__object *self ,
 
405
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
406
{
 
407
  LANG_SPECIFIC_INIT();
 
408
  *_ex = NULL;
 
409
  {
 
410
    struct sidl_SIDLException__remote* r_obj = (struct                        \
 
411
      sidl_SIDLException__remote*)self->d_data;
 
412
    LOCK_STATIC_GLOBALS;
 
413
    r_obj->d_refcount--;
 
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);
 
419
      free(r_obj);
 
420
      free(self);
 
421
    }
 
422
    UNLOCK_STATIC_GLOBALS;
 
423
  }
 
424
}
 
425
 
 
426
/* REMOTE METHOD STUB:isSame */
 
427
static sidl_bool
 
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)
 
432
{
 
433
  LANG_SPECIFIC_INIT();
 
434
  *_ex = NULL;
 
435
  {
 
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);
 
445
 
 
446
    /* pack in and inout arguments */
 
447
    if(iobj){
 
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(    \
 
451
        *_ex);
 
452
      free((void*)_url);
 
453
    } else {
 
454
      sidl_rmi_Invocation_packString( _inv, "iobj", NULL, _ex);SIDL_CHECK(    \
 
455
        *_ex);
 
456
    }
 
457
 
 
458
    /* send actual RMI request */
 
459
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
460
 
 
461
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
462
    if(_be != NULL) {
 
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);
 
467
      goto EXIT;
 
468
    }
 
469
 
 
470
    /* extract return value */
 
471
    sidl_rmi_Response_unpackBool( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(\
 
472
      *_ex);
 
473
 
 
474
    /* unpack out and inout arguments */
 
475
 
 
476
    /* cleanup and return */
 
477
    EXIT:
 
478
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
479
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
480
    return _retval;
 
481
  }
 
482
}
 
483
 
 
484
/* REMOTE METHOD STUB:isType */
 
485
static sidl_bool
 
486
remote_sidl_SIDLException_isType(
 
487
  /* in */ struct sidl_SIDLException__object *self ,
 
488
  /* in */ const char* name,
 
489
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
490
{
 
491
  LANG_SPECIFIC_INIT();
 
492
  *_ex = NULL;
 
493
  {
 
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);
 
503
 
 
504
    /* pack in and inout arguments */
 
505
    sidl_rmi_Invocation_packString( _inv, "name", name, _ex);SIDL_CHECK(*_ex);
 
506
 
 
507
    /* send actual RMI request */
 
508
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
509
 
 
510
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
511
    if(_be != NULL) {
 
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);
 
516
      goto EXIT;
 
517
    }
 
518
 
 
519
    /* extract return value */
 
520
    sidl_rmi_Response_unpackBool( _rsvp, "_retval", &_retval, _ex);SIDL_CHECK(\
 
521
      *_ex);
 
522
 
 
523
    /* unpack out and inout arguments */
 
524
 
 
525
    /* cleanup and return */
 
526
    EXIT:
 
527
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
528
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
529
    return _retval;
 
530
  }
 
531
}
 
532
 
 
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)
 
538
{
 
539
  LANG_SPECIFIC_INIT();
 
540
  *_ex = NULL;
 
541
  {
 
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);
 
552
 
 
553
    /* pack in and inout arguments */
 
554
 
 
555
    /* send actual RMI request */
 
556
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
557
 
 
558
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
559
    if(_be != NULL) {
 
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);
 
564
      goto EXIT;
 
565
    }
 
566
 
 
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(   \
 
571
      *_ex);
 
572
 
 
573
    /* unpack out and inout arguments */
 
574
 
 
575
    /* cleanup and return */
 
576
    EXIT:
 
577
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
578
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
579
    return _retval;
 
580
  }
 
581
}
 
582
 
 
583
/* REMOTE METHOD STUB:getNote */
 
584
static char*
 
585
remote_sidl_SIDLException_getNote(
 
586
  /* in */ struct sidl_SIDLException__object *self ,
 
587
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
588
{
 
589
  LANG_SPECIFIC_INIT();
 
590
  *_ex = NULL;
 
591
  {
 
592
    /* initialize a new invocation */
 
593
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
594
    sidl_BaseException _be = NULL;
 
595
    sidl_rmi_Response _rsvp = NULL;
 
596
    char* _retval = 0;
 
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);
 
601
 
 
602
    /* pack in and inout arguments */
 
603
 
 
604
    /* send actual RMI request */
 
605
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
606
 
 
607
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
608
    if(_be != NULL) {
 
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);
 
613
      goto EXIT;
 
614
    }
 
615
 
 
616
    /* extract return value */
 
617
    sidl_rmi_Response_unpackString( _rsvp, "_retval", &_retval,               \
 
618
      _ex);SIDL_CHECK(*_ex);
 
619
 
 
620
    /* unpack out and inout arguments */
 
621
 
 
622
    /* cleanup and return */
 
623
    EXIT:
 
624
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
625
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
626
    return _retval;
 
627
  }
 
628
}
 
629
 
 
630
/* REMOTE METHOD STUB:setNote */
 
631
static void
 
632
remote_sidl_SIDLException_setNote(
 
633
  /* in */ struct sidl_SIDLException__object *self ,
 
634
  /* in */ const char* message,
 
635
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
636
{
 
637
  LANG_SPECIFIC_INIT();
 
638
  *_ex = NULL;
 
639
  {
 
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);
 
648
 
 
649
    /* pack in and inout arguments */
 
650
    sidl_rmi_Invocation_packString( _inv, "message", message, _ex);SIDL_CHECK(\
 
651
      *_ex);
 
652
 
 
653
    /* send actual RMI request */
 
654
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
655
 
 
656
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
657
    if(_be != NULL) {
 
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);
 
662
      goto EXIT;
 
663
    }
 
664
 
 
665
    /* unpack out and inout arguments */
 
666
 
 
667
    /* cleanup and return */
 
668
    EXIT:
 
669
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
670
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
671
    return;
 
672
  }
 
673
}
 
674
 
 
675
/* REMOTE METHOD STUB:getTrace */
 
676
static char*
 
677
remote_sidl_SIDLException_getTrace(
 
678
  /* in */ struct sidl_SIDLException__object *self ,
 
679
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
680
{
 
681
  LANG_SPECIFIC_INIT();
 
682
  *_ex = NULL;
 
683
  {
 
684
    /* initialize a new invocation */
 
685
    struct sidl_BaseInterface__object* _throwaway = NULL;
 
686
    sidl_BaseException _be = NULL;
 
687
    sidl_rmi_Response _rsvp = NULL;
 
688
    char* _retval = 0;
 
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);
 
693
 
 
694
    /* pack in and inout arguments */
 
695
 
 
696
    /* send actual RMI request */
 
697
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
698
 
 
699
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
700
    if(_be != NULL) {
 
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);
 
705
      goto EXIT;
 
706
    }
 
707
 
 
708
    /* extract return value */
 
709
    sidl_rmi_Response_unpackString( _rsvp, "_retval", &_retval,               \
 
710
      _ex);SIDL_CHECK(*_ex);
 
711
 
 
712
    /* unpack out and inout arguments */
 
713
 
 
714
    /* cleanup and return */
 
715
    EXIT:
 
716
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
717
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
718
    return _retval;
 
719
  }
 
720
}
 
721
 
 
722
/* REMOTE METHOD STUB:addLine */
 
723
static void
 
724
remote_sidl_SIDLException_addLine(
 
725
  /* in */ struct sidl_SIDLException__object *self ,
 
726
  /* in */ const char* traceline,
 
727
  /* out */ struct sidl_BaseInterface__object * *_ex)
 
728
{
 
729
  LANG_SPECIFIC_INIT();
 
730
  *_ex = NULL;
 
731
  {
 
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);
 
740
 
 
741
    /* pack in and inout arguments */
 
742
    sidl_rmi_Invocation_packString( _inv, "traceline", traceline,             \
 
743
      _ex);SIDL_CHECK(*_ex);
 
744
 
 
745
    /* send actual RMI request */
 
746
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
747
 
 
748
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
749
    if(_be != NULL) {
 
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);
 
754
      goto EXIT;
 
755
    }
 
756
 
 
757
    /* unpack out and inout arguments */
 
758
 
 
759
    /* cleanup and return */
 
760
    EXIT:
 
761
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
762
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
763
    return;
 
764
  }
 
765
}
 
766
 
 
767
/* REMOTE METHOD STUB:add */
 
768
static void
 
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)
 
775
{
 
776
  LANG_SPECIFIC_INIT();
 
777
  *_ex = NULL;
 
778
  {
 
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);
 
787
 
 
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(     \
 
792
      *_ex);
 
793
    sidl_rmi_Invocation_packString( _inv, "methodname", methodname,           \
 
794
      _ex);SIDL_CHECK(*_ex);
 
795
 
 
796
    /* send actual RMI request */
 
797
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
798
 
 
799
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
800
    if(_be != NULL) {
 
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);
 
805
      goto EXIT;
 
806
    }
 
807
 
 
808
    /* unpack out and inout arguments */
 
809
 
 
810
    /* cleanup and return */
 
811
    EXIT:
 
812
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
813
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
814
    return;
 
815
  }
 
816
}
 
817
 
 
818
/* REMOTE METHOD STUB:packObj */
 
819
static void
 
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)
 
824
{
 
825
  LANG_SPECIFIC_INIT();
 
826
  *_ex = NULL;
 
827
  {
 
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);
 
836
 
 
837
    /* pack in and inout arguments */
 
838
    if(ser){
 
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(     \
 
842
        *_ex);
 
843
      free((void*)_url);
 
844
    } else {
 
845
      sidl_rmi_Invocation_packString( _inv, "ser", NULL, _ex);SIDL_CHECK(     \
 
846
        *_ex);
 
847
    }
 
848
 
 
849
    /* send actual RMI request */
 
850
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
851
 
 
852
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
853
    if(_be != NULL) {
 
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);
 
858
      goto EXIT;
 
859
    }
 
860
 
 
861
    /* unpack out and inout arguments */
 
862
 
 
863
    /* cleanup and return */
 
864
    EXIT:
 
865
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
866
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
867
    return;
 
868
  }
 
869
}
 
870
 
 
871
/* REMOTE METHOD STUB:unpackObj */
 
872
static void
 
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)
 
877
{
 
878
  LANG_SPECIFIC_INIT();
 
879
  *_ex = NULL;
 
880
  {
 
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);
 
889
 
 
890
    /* pack in and inout arguments */
 
891
    if(des){
 
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(     \
 
895
        *_ex);
 
896
      free((void*)_url);
 
897
    } else {
 
898
      sidl_rmi_Invocation_packString( _inv, "des", NULL, _ex);SIDL_CHECK(     \
 
899
        *_ex);
 
900
    }
 
901
 
 
902
    /* send actual RMI request */
 
903
    _rsvp = sidl_rmi_Invocation_invokeMethod(_inv, _ex);SIDL_CHECK(*_ex);
 
904
 
 
905
    _be = sidl_rmi_Response_getExceptionThrown(_rsvp, _ex);SIDL_CHECK(*_ex);
 
906
    if(_be != NULL) {
 
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);
 
911
      goto EXIT;
 
912
    }
 
913
 
 
914
    /* unpack out and inout arguments */
 
915
 
 
916
    /* cleanup and return */
 
917
    EXIT:
 
918
    if(_inv) { sidl_rmi_Invocation_deleteRef(_inv, &_throwaway); }
 
919
    if(_rsvp) { sidl_rmi_Response_deleteRef(_rsvp, &_throwaway); }
 
920
    return;
 
921
  }
 
922
}
 
923
 
 
924
/* REMOTE EPV: create remote entry point vectors (EPVs). */
 
925
static void sidl_SIDLException__init_remote_epv(void)
 
926
{
 
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;
 
933
 
 
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;
 
941
  epv->f__ctor             = NULL;
 
942
  epv->f__ctor2            = NULL;
 
943
  epv->f__dtor             = 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;
 
956
 
 
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 **))        \
 
978
    epv->f_isSame;
 
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 **))            \
 
983
    epv->f_getClassInfo;
 
984
 
 
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**))  \
 
988
    epv->f__delete;
 
989
  e1->f__getURL      = (char* (*)(void*,struct sidl_BaseInterface__object**)) \
 
990
    epv->f__getURL;
 
991
  e1->f__raddRef     = (void (*)(void*,struct sidl_BaseInterface__object**))  \
 
992
    epv->f__raddRef;
 
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 **)) \
 
1015
    epv->f_addRef;
 
1016
  e1->f_deleteRef    = (void (*)(void*,struct sidl_BaseInterface__object **)) \
 
1017
    epv->f_deleteRef;
 
1018
  e1->f_isSame       = (sidl_bool (*)(void*,struct                            \
 
1019
    sidl_BaseInterface__object*,struct sidl_BaseInterface__object **))        \
 
1020
    epv->f_isSame;
 
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;
 
1025
 
 
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**))  \
 
1029
    epv->f__delete;
 
1030
  e2->f__getURL      = (char* (*)(void*,struct sidl_BaseInterface__object**)) \
 
1031
    epv->f__getURL;
 
1032
  e2->f__raddRef     = (void (*)(void*,struct sidl_BaseInterface__object**))  \
 
1033
    epv->f__raddRef;
 
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 **)) \
 
1042
    epv->f_addRef;
 
1043
  e2->f_deleteRef    = (void (*)(void*,struct sidl_BaseInterface__object **)) \
 
1044
    epv->f_deleteRef;
 
1045
  e2->f_isSame       = (sidl_bool (*)(void*,struct                            \
 
1046
    sidl_BaseInterface__object*,struct sidl_BaseInterface__object **))        \
 
1047
    epv->f_isSame;
 
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;
 
1052
 
 
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**))  \
 
1056
    epv->f__delete;
 
1057
  e3->f__getURL      = (char* (*)(void*,struct sidl_BaseInterface__object**)) \
 
1058
    epv->f__getURL;
 
1059
  e3->f__raddRef     = (void (*)(void*,struct sidl_BaseInterface__object**))  \
 
1060
    epv->f__raddRef;
 
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 **)) \
 
1073
    epv->f_addRef;
 
1074
  e3->f_deleteRef    = (void (*)(void*,struct sidl_BaseInterface__object **)) \
 
1075
    epv->f_deleteRef;
 
1076
  e3->f_isSame       = (sidl_bool (*)(void*,struct                            \
 
1077
    sidl_BaseInterface__object*,struct sidl_BaseInterface__object **))        \
 
1078
    epv->f_isSame;
 
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;
 
1083
 
 
1084
  s_remote_initialized = 1;
 
1085
}
 
1086
 
 
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)
 
1091
{
 
1092
  struct sidl_SIDLException__object* self = NULL;
 
1093
 
 
1094
  struct sidl_SIDLException__object* s0;
 
1095
  struct sidl_BaseClass__object* s1;
 
1096
 
 
1097
  struct sidl_SIDLException__remote* r_obj = NULL;
 
1098
  sidl_rmi_InstanceHandle instance = NULL;
 
1099
  char* objectID = NULL;
 
1100
  objectID = NULL;
 
1101
  *_ex = NULL;
 
1102
  if(url == NULL) {return NULL;}
 
1103
  objectID = sidl_rmi_ServerRegistry_isLocalObject(url, _ex);
 
1104
  if(objectID) {
 
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);
 
1113
    if(!ar) { 
 
1114
      (*bi->d_epv->f_deleteRef)(bi->d_object, &throwaway_exception);
 
1115
    }
 
1116
    return retobj;
 
1117
  }
 
1118
  instance = sidl_rmi_ProtocolFactory_connectInstance(url,                    \
 
1119
    "sidl.SIDLException", ar, _ex ); SIDL_CHECK(*_ex);
 
1120
  if ( instance == NULL) { return NULL; }
 
1121
  self =
 
1122
    (struct sidl_SIDLException__object*) malloc(
 
1123
      sizeof(struct sidl_SIDLException__object));
 
1124
 
 
1125
  r_obj =
 
1126
    (struct sidl_SIDLException__remote*) malloc(
 
1127
      sizeof(struct sidl_SIDLException__remote));
 
1128
 
 
1129
  if(!self || !r_obj) {
 
1130
    sidl_MemAllocException ex = sidl_MemAllocException_getSingletonException( \
 
1131
      _ex);
 
1132
    SIDL_CHECK(*_ex);
 
1133
    sidl_MemAllocException_setNote(ex, "Out of memory.", _ex); SIDL_CHECK(    \
 
1134
      *_ex);
 
1135
    sidl_MemAllocException_add(ex, __FILE__, __LINE__,                        \
 
1136
      "sidl.SIDLException.EPVgeneration", _ex);
 
1137
    SIDL_CHECK(*_ex);
 
1138
    *_ex = (struct sidl_BaseInterface__object*)ex;
 
1139
    goto EXIT;
 
1140
  }
 
1141
 
 
1142
  r_obj->d_refcount = 1;
 
1143
  r_obj->d_ih = instance;
 
1144
  s0 =                              self;
 
1145
  s1 =                              &s0->d_sidl_baseclass;
 
1146
 
 
1147
  LOCK_STATIC_GLOBALS;
 
1148
  if (!s_remote_initialized) {
 
1149
    sidl_SIDLException__init_remote_epv();
 
1150
  }
 
1151
  UNLOCK_STATIC_GLOBALS;
 
1152
 
 
1153
  s1->d_sidl_baseinterface.d_epv    = &s_rem_epv__sidl_baseinterface;
 
1154
  s1->d_sidl_baseinterface.d_object = (void*) self;
 
1155
 
 
1156
  s1->d_data = (void*) r_obj;
 
1157
  s1->d_epv  = &s_rem_epv__sidl_baseclass;
 
1158
 
 
1159
  s0->d_sidl_baseexception.d_epv    = &s_rem_epv__sidl_baseexception;
 
1160
  s0->d_sidl_baseexception.d_object = (void*) self;
 
1161
 
 
1162
  s0->d_sidl_io_serializable.d_epv    = &s_rem_epv__sidl_io_serializable;
 
1163
  s0->d_sidl_io_serializable.d_object = (void*) self;
 
1164
 
 
1165
  s0->d_data = (void*) r_obj;
 
1166
  s0->d_epv  = &s_rem_epv__sidl_sidlexception;
 
1167
 
 
1168
  self->d_data = (void*) r_obj;
 
1169
 
 
1170
  return self;
 
1171
  EXIT:
 
1172
  if(self) { free(self); }
 
1173
  if(r_obj) { free(r_obj); }
 
1174
  return NULL;
 
1175
}
 
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)
 
1181
{
 
1182
  struct sidl_SIDLException__object* self = NULL;
 
1183
 
 
1184
  struct sidl_SIDLException__object* s0;
 
1185
  struct sidl_BaseClass__object* s1;
 
1186
 
 
1187
  struct sidl_SIDLException__remote* r_obj = NULL;
 
1188
  self =
 
1189
    (struct sidl_SIDLException__object*) malloc(
 
1190
      sizeof(struct sidl_SIDLException__object));
 
1191
 
 
1192
  r_obj =
 
1193
    (struct sidl_SIDLException__remote*) malloc(
 
1194
      sizeof(struct sidl_SIDLException__remote));
 
1195
 
 
1196
  if(!self || !r_obj) {
 
1197
    sidl_MemAllocException ex = sidl_MemAllocException_getSingletonException( \
 
1198
      _ex);
 
1199
    SIDL_CHECK(*_ex);
 
1200
    sidl_MemAllocException_setNote(ex, "Out of memory.", _ex); SIDL_CHECK(    \
 
1201
      *_ex);
 
1202
    sidl_MemAllocException_add(ex, __FILE__, __LINE__,                        \
 
1203
      "sidl.SIDLException.EPVgeneration", _ex);
 
1204
    SIDL_CHECK(*_ex);
 
1205
    *_ex = (struct sidl_BaseInterface__object*)ex;
 
1206
    goto EXIT;
 
1207
  }
 
1208
 
 
1209
  r_obj->d_refcount = 1;
 
1210
  r_obj->d_ih = instance;
 
1211
  s0 =                              self;
 
1212
  s1 =                              &s0->d_sidl_baseclass;
 
1213
 
 
1214
  LOCK_STATIC_GLOBALS;
 
1215
  if (!s_remote_initialized) {
 
1216
    sidl_SIDLException__init_remote_epv();
 
1217
  }
 
1218
  UNLOCK_STATIC_GLOBALS;
 
1219
 
 
1220
  s1->d_sidl_baseinterface.d_epv    = &s_rem_epv__sidl_baseinterface;
 
1221
  s1->d_sidl_baseinterface.d_object = (void*) self;
 
1222
 
 
1223
  s1->d_data = (void*) r_obj;
 
1224
  s1->d_epv  = &s_rem_epv__sidl_baseclass;
 
1225
 
 
1226
  s0->d_sidl_baseexception.d_epv    = &s_rem_epv__sidl_baseexception;
 
1227
  s0->d_sidl_baseexception.d_object = (void*) self;
 
1228
 
 
1229
  s0->d_sidl_io_serializable.d_epv    = &s_rem_epv__sidl_io_serializable;
 
1230
  s0->d_sidl_io_serializable.d_object = (void*) self;
 
1231
 
 
1232
  s0->d_data = (void*) r_obj;
 
1233
  s0->d_epv  = &s_rem_epv__sidl_sidlexception;
 
1234
 
 
1235
  self->d_data = (void*) r_obj;
 
1236
 
 
1237
  sidl_rmi_InstanceHandle_addRef(instance,_ex);SIDL_CHECK(*_ex);
 
1238
  return self;
 
1239
  EXIT:
 
1240
  if(self) { free(self); }
 
1241
  if(r_obj) { free(r_obj); }
 
1242
  return NULL;
 
1243
}
 
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)
 
1248
{
 
1249
  struct sidl_BaseInterface__object* _throwaway_exception = NULL;
 
1250
  struct sidl_SIDLException__object* self = NULL;
 
1251
 
 
1252
  struct sidl_SIDLException__object* s0;
 
1253
  struct sidl_BaseClass__object* s1;
 
1254
 
 
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; }
 
1259
  self =
 
1260
    (struct sidl_SIDLException__object*) malloc(
 
1261
      sizeof(struct sidl_SIDLException__object));
 
1262
 
 
1263
  r_obj =
 
1264
    (struct sidl_SIDLException__remote*) malloc(
 
1265
      sizeof(struct sidl_SIDLException__remote));
 
1266
 
 
1267
  if(!self || !r_obj) {
 
1268
    sidl_MemAllocException ex = sidl_MemAllocException_getSingletonException( \
 
1269
      _ex);
 
1270
    SIDL_CHECK(*_ex);
 
1271
    sidl_MemAllocException_setNote(ex, "Out of memory.", _ex); SIDL_CHECK(    \
 
1272
      *_ex);
 
1273
    sidl_MemAllocException_add(ex, __FILE__, __LINE__,                        \
 
1274
      "sidl.SIDLException.EPVgeneration", _ex);
 
1275
    SIDL_CHECK(*_ex);
 
1276
    *_ex = (struct sidl_BaseInterface__object*)ex;
 
1277
    goto EXIT;
 
1278
  }
 
1279
 
 
1280
  r_obj->d_refcount = 1;
 
1281
  r_obj->d_ih = instance;
 
1282
  s0 =                              self;
 
1283
  s1 =                              &s0->d_sidl_baseclass;
 
1284
 
 
1285
  LOCK_STATIC_GLOBALS;
 
1286
  if (!s_remote_initialized) {
 
1287
    sidl_SIDLException__init_remote_epv();
 
1288
  }
 
1289
  UNLOCK_STATIC_GLOBALS;
 
1290
 
 
1291
  s1->d_sidl_baseinterface.d_epv    = &s_rem_epv__sidl_baseinterface;
 
1292
  s1->d_sidl_baseinterface.d_object = (void*) self;
 
1293
 
 
1294
  s1->d_data = (void*) r_obj;
 
1295
  s1->d_epv  = &s_rem_epv__sidl_baseclass;
 
1296
 
 
1297
  s0->d_sidl_baseexception.d_epv    = &s_rem_epv__sidl_baseexception;
 
1298
  s0->d_sidl_baseexception.d_object = (void*) self;
 
1299
 
 
1300
  s0->d_sidl_io_serializable.d_epv    = &s_rem_epv__sidl_io_serializable;
 
1301
  s0->d_sidl_io_serializable.d_object = (void*) self;
 
1302
 
 
1303
  s0->d_data = (void*) r_obj;
 
1304
  s0->d_epv  = &s_rem_epv__sidl_sidlexception;
 
1305
 
 
1306
  self->d_data = (void*) r_obj;
 
1307
 
 
1308
  return self;
 
1309
  EXIT:
 
1310
  if(instance) { sidl_rmi_InstanceHandle_deleteRef(instance,                  \
 
1311
    &_throwaway_exception); }
 
1312
  if(self) { free(self); }
 
1313
  if(r_obj) { free(r_obj); }
 
1314
  return NULL;
 
1315
}
 
1316
/*
 
1317
 * RMI connector function for the class.
 
1318
 */
 
1319
 
 
1320
struct sidl_SIDLException__object*
 
1321
sidl_SIDLException__connectI(const char* url, sidl_bool ar, struct            \
 
1322
  sidl_BaseInterface__object **_ex)
 
1323
{
 
1324
  return sidl_SIDLException__remoteConnect(url, ar, _ex);
 
1325
}
 
1326
 
 
1327
 
 
1328
#endif /*WITH_RMI*/
 
1329
#ifdef WITH_RMI
 
1330
 
 
1331
static PyObject *
 
1332
pStub_SIDLException__connect(PyObject *_ignored, PyObject *_args, PyObject    \
 
1333
  *_kwdict) {
 
1334
  PyObject *_return_value = NULL;
 
1335
  struct sidl_SIDLException__object* self = NULL;
 
1336
  char* url = NULL;
 
1337
  struct sidl_BaseInterface__object *_exception = NULL;
 
1338
  static char *_kwlist[] = {
 
1339
    "url",
 
1340
    NULL
 
1341
  };
 
1342
  int _okay;
 
1343
  sidl_rmi_NetworkException__import();
 
1344
  _okay = PyArg_ParseTupleAndKeywords(
 
1345
    _args, _kwdict, 
 
1346
    "z", _kwlist,
 
1347
    &url);
 
1348
  if (_okay) {
 
1349
    self = sidl_SIDLException__remoteConnect(url,1,&_exception);
 
1350
    if (_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);
 
1360
        Py_XDECREF(_obj);
 
1361
        (*(_exception->d_epv->f_deleteRef))(_exception->d_object,             \
 
1362
          &throwaway_exception);
 
1363
        Py_XDECREF(_eargs);
 
1364
      }
 
1365
    }
 
1366
    else {
 
1367
      _return_value = Py_BuildValue(
 
1368
        "O&",
 
1369
        (void *)sidl_SIDLException__wrap, self);
 
1370
    }
 
1371
  }
 
1372
  return _return_value;
 
1373
}
 
1374
 
 
1375
 
 
1376
#endif /*WITH_RMI*/
 
1377
staticforward PyTypeObject _sidl_SIDLExceptionType;
 
1378
 
 
1379
static const struct sidl_SIDLException__external *_implEPV = NULL;
 
1380
 
 
1381
static PyObject *
 
1382
pStub_SIDLException__exec(PyObject *_self, PyObject *_args, PyObject          \
 
1383
  *_kwdict) {
 
1384
  PyObject *_return_value = NULL;
 
1385
  struct sidl_SIDLException__object *_self_ior =
 
1386
    ((struct sidl_SIDLException__object *)
 
1387
     sidl_Cast(_self, "sidl.SIDLException"));
 
1388
  if (_self_ior) {
 
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[] = {
 
1394
      "methodName",
 
1395
      "inArgs",
 
1396
      "outArgs",
 
1397
      NULL
 
1398
    };
 
1399
    int _okay;
 
1400
    sidl_RuntimeException__import();
 
1401
    sidl_rmi_Call__import();
 
1402
    sidl_rmi_Return__import();
 
1403
    _okay = PyArg_ParseTupleAndKeywords(
 
1404
      _args, _kwdict, 
 
1405
      "zO&O&", _kwlist,
 
1406
      &methodName,
 
1407
      (void *)sidl_rmi_Call__convert, &inArgs,
 
1408
      (void *)sidl_rmi_Return__convert, &outArgs);
 
1409
    if (_okay) {
 
1410
      (*(_self_ior->d_epv->f__exec))(_self_ior, methodName, inArgs, outArgs,  \
 
1411
        &_exception);
 
1412
      if (_exception) {
 
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);
 
1422
          Py_XDECREF(_obj);
 
1423
          (*(_exception->d_epv->f_deleteRef))(_exception->d_object,           \
 
1424
            &throwaway_exception);
 
1425
          Py_XDECREF(_eargs);
 
1426
        }
 
1427
      }
 
1428
      else {
 
1429
        _return_value = Py_None;
 
1430
        Py_INCREF(_return_value);
 
1431
      }
 
1432
      sidl_rmi_Call_deref(inArgs);
 
1433
      sidl_rmi_Return_deref(outArgs);
 
1434
    }
 
1435
    {
 
1436
      struct sidl_BaseInterface__object *throwaway_exception;
 
1437
      (*(_self_ior->d_epv->f_deleteRef))(_self_ior, &throwaway_exception);
 
1438
    }
 
1439
  }
 
1440
  else {
 
1441
    PyErr_SetString(PyExc_TypeError, 
 
1442
      "self pointer is not a sidl.SIDLException");
 
1443
  }
 
1444
  return _return_value;
 
1445
}
 
1446
 
 
1447
static PyObject *
 
1448
pStub_SIDLException__getURL(PyObject *_self, PyObject *_args, PyObject        \
 
1449
  *_kwdict) {
 
1450
  PyObject *_return_value = NULL;
 
1451
  struct sidl_SIDLException__object *_self_ior =
 
1452
    ((struct sidl_SIDLException__object *)
 
1453
     sidl_Cast(_self, "sidl.SIDLException"));
 
1454
  if (_self_ior) {
 
1455
    struct sidl_BaseInterface__object *_exception = NULL;
 
1456
    static char *_kwlist[] = {
 
1457
      NULL
 
1458
    };
 
1459
    int _okay;
 
1460
    sidl_RuntimeException__import();
 
1461
    _okay = PyArg_ParseTupleAndKeywords(
 
1462
      _args, _kwdict, 
 
1463
      "", _kwlist);
 
1464
    if (_okay) {
 
1465
      char* _return = NULL;
 
1466
      _return = (*(_self_ior->d_epv->f__getURL))(_self_ior, &_exception);
 
1467
      if (_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);
 
1477
          Py_XDECREF(_obj);
 
1478
          (*(_exception->d_epv->f_deleteRef))(_exception->d_object,           \
 
1479
            &throwaway_exception);
 
1480
          Py_XDECREF(_eargs);
 
1481
        }
 
1482
      }
 
1483
      else {
 
1484
        _return_value = Py_BuildValue(
 
1485
          "z",
 
1486
          _return);
 
1487
        free((void *)_return);
 
1488
      }
 
1489
    }
 
1490
    {
 
1491
      struct sidl_BaseInterface__object *throwaway_exception;
 
1492
      (*(_self_ior->d_epv->f_deleteRef))(_self_ior, &throwaway_exception);
 
1493
    }
 
1494
  }
 
1495
  else {
 
1496
    PyErr_SetString(PyExc_TypeError, 
 
1497
      "self pointer is not a sidl.SIDLException");
 
1498
  }
 
1499
  return _return_value;
 
1500
}
 
1501
 
 
1502
static PyObject *
 
1503
pStub_SIDLException__isLocal(PyObject *_self, PyObject *_args, PyObject       \
 
1504
  *_kwdict) {
 
1505
  PyObject *_return_value = NULL;
 
1506
  struct sidl_SIDLException__object *_self_ior =
 
1507
    ((struct sidl_SIDLException__object *)
 
1508
     sidl_Cast(_self, "sidl.SIDLException"));
 
1509
  if (_self_ior) {
 
1510
    struct sidl_BaseInterface__object *_exception = NULL;
 
1511
    static char *_kwlist[] = {
 
1512
      NULL
 
1513
    };
 
1514
    int _okay;
 
1515
    sidl_RuntimeException__import();
 
1516
    _okay = PyArg_ParseTupleAndKeywords(
 
1517
      _args, _kwdict, 
 
1518
      "", _kwlist);
 
1519
    if (_okay) {
 
1520
      sidl_bool _return = (sidl_bool) 0;
 
1521
      int _proxy__return;
 
1522
      _return = !(*(_self_ior->d_epv->f__isRemote))(_self_ior, &_exception);
 
1523
      _proxy__return = _return;
 
1524
      if (_exception) {
 
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);
 
1534
          Py_XDECREF(_obj);
 
1535
          (*(_exception->d_epv->f_deleteRef))(_exception->d_object,           \
 
1536
            &throwaway_exception);
 
1537
          Py_XDECREF(_eargs);
 
1538
        }
 
1539
      }
 
1540
      else {
 
1541
        _return_value = Py_BuildValue(
 
1542
          "i",
 
1543
          _proxy__return);
 
1544
      }
 
1545
    }
 
1546
    {
 
1547
      struct sidl_BaseInterface__object *throwaway_exception;
 
1548
      (*(_self_ior->d_epv->f_deleteRef))(_self_ior, &throwaway_exception);
 
1549
    }
 
1550
  }
 
1551
  else {
 
1552
    PyErr_SetString(PyExc_TypeError, 
 
1553
      "self pointer is not a sidl.SIDLException");
 
1554
  }
 
1555
  return _return_value;
 
1556
}
 
1557
 
 
1558
static PyObject *
 
1559
pStub_SIDLException__isRemote(PyObject *_self, PyObject *_args, PyObject      \
 
1560
  *_kwdict) {
 
1561
  PyObject *_return_value = NULL;
 
1562
  struct sidl_SIDLException__object *_self_ior =
 
1563
    ((struct sidl_SIDLException__object *)
 
1564
     sidl_Cast(_self, "sidl.SIDLException"));
 
1565
  if (_self_ior) {
 
1566
    struct sidl_BaseInterface__object *_exception = NULL;
 
1567
    static char *_kwlist[] = {
 
1568
      NULL
 
1569
    };
 
1570
    int _okay;
 
1571
    sidl_RuntimeException__import();
 
1572
    _okay = PyArg_ParseTupleAndKeywords(
 
1573
      _args, _kwdict, 
 
1574
      "", _kwlist);
 
1575
    if (_okay) {
 
1576
      sidl_bool _return = (sidl_bool) 0;
 
1577
      int _proxy__return;
 
1578
      _return = (*(_self_ior->d_epv->f__isRemote))(_self_ior, &_exception);
 
1579
      _proxy__return = _return;
 
1580
      if (_exception) {
 
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);
 
1590
          Py_XDECREF(_obj);
 
1591
          (*(_exception->d_epv->f_deleteRef))(_exception->d_object,           \
 
1592
            &throwaway_exception);
 
1593
          Py_XDECREF(_eargs);
 
1594
        }
 
1595
      }
 
1596
      else {
 
1597
        _return_value = Py_BuildValue(
 
1598
          "i",
 
1599
          _proxy__return);
 
1600
      }
 
1601
    }
 
1602
    {
 
1603
      struct sidl_BaseInterface__object *throwaway_exception;
 
1604
      (*(_self_ior->d_epv->f_deleteRef))(_self_ior, &throwaway_exception);
 
1605
    }
 
1606
  }
 
1607
  else {
 
1608
    PyErr_SetString(PyExc_TypeError, 
 
1609
      "self pointer is not a sidl.SIDLException");
 
1610
  }
 
1611
  return _return_value;
 
1612
}
 
1613
 
 
1614
static PyObject *
 
1615
pStub_SIDLException__set_hooks(PyObject *_self, PyObject *_args, PyObject     \
 
1616
  *_kwdict) {
 
1617
  PyObject *_return_value = NULL;
 
1618
  struct sidl_SIDLException__object *_self_ior =
 
1619
    ((struct sidl_SIDLException__object *)
 
1620
     sidl_Cast(_self, "sidl.SIDLException"));
 
1621
  if (_self_ior) {
 
1622
    sidl_bool on = (sidl_bool) 0;
 
1623
    struct sidl_BaseInterface__object *_exception = NULL;
 
1624
    int _proxy_on;
 
1625
    static char *_kwlist[] = {
 
1626
      "on",
 
1627
      NULL
 
1628
    };
 
1629
    int _okay;
 
1630
    sidl_RuntimeException__import();
 
1631
    _okay = PyArg_ParseTupleAndKeywords(
 
1632
      _args, _kwdict, 
 
1633
      "i", _kwlist,
 
1634
      &_proxy_on);
 
1635
    if (_okay) {
 
1636
      on = (_proxy_on ? (TRUE) : (FALSE));
 
1637
      (*(_self_ior->d_epv->f__set_hooks))(_self_ior, on, &_exception);
 
1638
      if (_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);
 
1648
          Py_XDECREF(_obj);
 
1649
          (*(_exception->d_epv->f_deleteRef))(_exception->d_object,           \
 
1650
            &throwaway_exception);
 
1651
          Py_XDECREF(_eargs);
 
1652
        }
 
1653
      }
 
1654
      else {
 
1655
        _return_value = Py_None;
 
1656
        Py_INCREF(_return_value);
 
1657
      }
 
1658
    }
 
1659
    {
 
1660
      struct sidl_BaseInterface__object *throwaway_exception;
 
1661
      (*(_self_ior->d_epv->f_deleteRef))(_self_ior, &throwaway_exception);
 
1662
    }
 
1663
  }
 
1664
  else {
 
1665
    PyErr_SetString(PyExc_TypeError, 
 
1666
      "self pointer is not a sidl.SIDLException");
 
1667
  }
 
1668
  return _return_value;
 
1669
}
 
1670
 
 
1671
static int
 
1672
sidl_SIDLException_createCast(PyObject *self, PyObject *args, PyObject *kwds) \
 
1673
  {
 
1674
  struct sidl_SIDLException__object *optarg = NULL;
 
1675
  char* url = 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);
 
1680
  if (_okay) {
 
1681
    if (!optarg && !url && !implObj) {
 
1682
      struct sidl_BaseInterface__object *_exception;
 
1683
      optarg = (*(_implEPV->createObject))(NULL,&_exception);
 
1684
      if (_exception) {
 
1685
        sidl_RuntimeException__import();
 
1686
        {
 
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);
 
1696
            Py_XDECREF(_obj);
 
1697
            (*(_exception->d_epv->f_deleteRef))(_exception->d_object,         \
 
1698
              &throwaway_exception);
 
1699
            Py_XDECREF(_eargs);
 
1700
          }
 
1701
          return -1;
 
1702
        }
 
1703
      }
 
1704
    }
 
1705
    else if (!optarg && !url && implObj) {
 
1706
      struct sidl_BaseInterface__object *_exception;
 
1707
      Py_INCREF(implObj);
 
1708
      optarg = (*(_implEPV->createObject))((void*)implObj,&_exception);
 
1709
      if (_exception) {
 
1710
        sidl_RuntimeException__import();
 
1711
        {
 
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);
 
1721
            Py_XDECREF(_obj);
 
1722
            (*(_exception->d_epv->f_deleteRef))(_exception->d_object,         \
 
1723
              &throwaway_exception);
 
1724
            Py_XDECREF(_eargs);
 
1725
          }
 
1726
          return -1;
 
1727
        }
 
1728
      }
 
1729
  }
 
1730
 
 
1731
#ifdef WITH_RMI
 
1732
 
 
1733
  else if(url && !optarg && !implObj) {
 
1734
    struct sidl_BaseInterface__object *_exception = NULL;
 
1735
    optarg = sidl_SIDLException__remoteCreate(url,&_exception);
 
1736
    if (_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);
 
1747
        Py_XDECREF(_obj);
 
1748
        (*(_exception->d_epv->f_deleteRef))(_exception->d_object,             \
 
1749
          &throwaway_exception);
 
1750
        Py_XDECREF(_eargs);
 
1751
      }
 
1752
      return -1;
 
1753
    }
 
1754
  }
 
1755
 
 
1756
#endif /*WITH_RMI*/
 
1757
 
 
1758
  /* OK, but fall though */
 
1759
  else if(!url && optarg && !implObj) {}
 
1760
  /* Error case. */
 
1761
  else {
 
1762
    return -1;
 
1763
  }
 
1764
  return sidl_Object_Init(
 
1765
    (SPObject *)self,
 
1766
    (struct sidl_BaseInterface__object *)optarg,
 
1767
    sidl_PyStealRef);
 
1768
}
 
1769
return -1;
 
1770
}
 
1771
 
 
1772
static PyMethodDef _SIDLExceptionModuleMethods[] = {
 
1773
 
 
1774
#ifdef WITH_RMI
 
1775
 
 
1776
  { "_connect", (PyCFunction)pStub_SIDLException__connect,
 
1777
  (METH_VARARGS | METH_KEYWORDS),
 
1778
"\
 
1779
_connect( in string url)\n\
 
1780
RETURNS\n\
 
1781
   ( out sidl.SIDLException self)\n\
 
1782
RAISES\n\
 
1783
    sidl.rmi.NetworkException\n\
 
1784
"
 
1785
   },
 
1786
 
 
1787
#endif /*WITH_RMI*/
 
1788
 
 
1789
  { NULL, NULL }
 
1790
};
 
1791
 
 
1792
static PyMethodDef _SIDLExceptionObjectMethods[] = {
 
1793
  { "_exec", (PyCFunction)pStub_SIDLException__exec,
 
1794
  (METH_VARARGS | METH_KEYWORDS),
 
1795
"\
 
1796
_exec( in string methodName,\n\
 
1797
       in sidl.rmi.Call inArgs,\n\
 
1798
       in sidl.rmi.Return outArgs)\n\
 
1799
RETURNS\n\
 
1800
    None\n\
 
1801
RAISES\n\
 
1802
    sidl.RuntimeException\n\
 
1803
\n\
 
1804
\
 
1805
Select and execute a method by name"
 
1806
   },
 
1807
  { "_getURL", (PyCFunction)pStub_SIDLException__getURL,
 
1808
  (METH_VARARGS | METH_KEYWORDS),
 
1809
"\
 
1810
_getURL()\n\
 
1811
RETURNS\n\
 
1812
   (string _return)\n\
 
1813
RAISES\n\
 
1814
    sidl.RuntimeException\n\
 
1815
\n\
 
1816
\
 
1817
Get the URL of the Implementation of this object (for RMI)"
 
1818
   },
 
1819
  { "_isLocal", (PyCFunction)pStub_SIDLException__isLocal,
 
1820
  (METH_VARARGS | METH_KEYWORDS),
 
1821
"\
 
1822
_isLocal()\n\
 
1823
RETURNS\n\
 
1824
   (bool _return)\n\
 
1825
RAISES\n\
 
1826
    sidl.RuntimeException\n\
 
1827
\n\
 
1828
\
 
1829
TRUE if this object is local, false if remote"
 
1830
   },
 
1831
  { "_isRemote", (PyCFunction)pStub_SIDLException__isRemote,
 
1832
  (METH_VARARGS | METH_KEYWORDS),
 
1833
"\
 
1834
_isRemote()\n\
 
1835
RETURNS\n\
 
1836
   (bool _return)\n\
 
1837
RAISES\n\
 
1838
    sidl.RuntimeException\n\
 
1839
\n\
 
1840
\
 
1841
TRUE if this object is remote, false if local"
 
1842
   },
 
1843
  { "_set_hooks", (PyCFunction)pStub_SIDLException__set_hooks,
 
1844
  (METH_VARARGS | METH_KEYWORDS),
 
1845
"\
 
1846
_set_hooks( in bool on)\n\
 
1847
RETURNS\n\
 
1848
    None\n\
 
1849
RAISES\n\
 
1850
    sidl.RuntimeException\n\
 
1851
\n\
 
1852
\
 
1853
Method to set whether or not method hooks should be invoked."
 
1854
   },
 
1855
  { NULL, NULL }
 
1856
};
 
1857
 
 
1858
static PyTypeObject _sidl_SIDLExceptionType = {
 
1859
  PyObject_HEAD_INIT(NULL)
 
1860
  0,      /* ob_size */
 
1861
  "sidl.SIDLException.SIDLException", /* tp_name */
 
1862
  0,      /* tp_basicsize */
 
1863
  0,      /* tp_itemsize */
 
1864
  0,      /* tp_dealloc */
 
1865
  0,      /* tp_print */
 
1866
  0,      /* tp_getattr */
 
1867
  0,      /* tp_setattr */
 
1868
  0,      /* tp_compare */
 
1869
  0,      /* tp_repr */
 
1870
  0,      /* tp_as_number */
 
1871
  0,      /* tp_as_sequence */
 
1872
  0,      /* tp_as_mapping */
 
1873
  0,      /* tp_hash  */
 
1874
  0,      /* tp_call */
 
1875
  0,      /* tp_str */
 
1876
  0,      /* tp_getattro */
 
1877
  0,      /* tp_setattro */
 
1878
  0,      /* tp_as_buffer */
 
1879
  Py_TPFLAGS_DEFAULT, /* tp_flags */
 
1880
  "\
 
1881
\
 
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 */
 
1886
  0,       /* tp_clear */
 
1887
  0,       /* tp_richcompare */
 
1888
  0,       /* tp_weaklistoffset */
 
1889
  0,       /* tp_iter */
 
1890
  0,       /* tp_iternext */
 
1891
  _SIDLExceptionObjectMethods, /* tp_methods */
 
1892
  0,       /* tp_members */
 
1893
  0,       /* tp_getset */
 
1894
  0,       /* tp_base */
 
1895
  0,       /* tp_dict */
 
1896
  0,       /* tp_descr_get */
 
1897
  0,       /* tp_descr_set */
 
1898
  0,       /* tp_dictoffset */
 
1899
  sidl_SIDLException_createCast,   /* tp_init */
 
1900
  0,       /* tp_alloc */
 
1901
  0,       /* tp_new */
 
1902
};
 
1903
 
 
1904
sidl_SIDLException__wrap_RETURN
 
1905
sidl_SIDLException__wrap sidl_SIDLException__wrap_PROTO {
 
1906
  PyObject *result;
 
1907
  if (sidlobj) {
 
1908
    result = _sidl_SIDLExceptionType.tp_new(&_sidl_SIDLExceptionType, NULL,   \
 
1909
      NULL);
 
1910
    if (result) {
 
1911
      if (sidl_Object_Init(
 
1912
        (SPObject *)result,
 
1913
        (struct sidl_BaseInterface__object *)(sidlobj),
 
1914
        sidl_PyStealRef))
 
1915
      {
 
1916
        Py_DECREF(result);
 
1917
        result = NULL;
 
1918
      }
 
1919
    }
 
1920
  }
 
1921
  else {
 
1922
    result = Py_None;
 
1923
    Py_INCREF(result);
 
1924
  }
 
1925
  return result;
 
1926
}
 
1927
 
 
1928
sidl_SIDLException__weakRef_RETURN
 
1929
sidl_SIDLException__weakRef sidl_SIDLException__weakRef_PROTO {
 
1930
  PyObject *result;
 
1931
  if (sidlobj) {
 
1932
    result = _sidl_SIDLExceptionType.tp_new(&_sidl_SIDLExceptionType, NULL,   \
 
1933
      NULL);
 
1934
    if (result) {
 
1935
      if (sidl_Object_Init(
 
1936
        (SPObject *)result,
 
1937
        (struct sidl_BaseInterface__object *)(sidlobj),
 
1938
        sidl_PyWeakRef))
 
1939
      {
 
1940
        Py_DECREF(result);
 
1941
        result = NULL;
 
1942
      }
 
1943
    }
 
1944
  }
 
1945
  else {
 
1946
    result = Py_None;
 
1947
    Py_INCREF(result);
 
1948
  }
 
1949
  return result;
 
1950
}
 
1951
 
 
1952
sidl_SIDLException_deref_RETURN
 
1953
sidl_SIDLException_deref sidl_SIDLException_deref_PROTO {
 
1954
  if (sidlobj) {
 
1955
    struct sidl_BaseInterface__object *throwaway_exception;
 
1956
    (*(sidlobj->d_epv->f_deleteRef))(sidlobj, &throwaway_exception);
 
1957
  }
 
1958
}
 
1959
 
 
1960
sidl_SIDLException__newRef_RETURN
 
1961
sidl_SIDLException__newRef sidl_SIDLException__newRef_PROTO {
 
1962
  PyObject *result;
 
1963
  if (sidlobj) {
 
1964
    result = _sidl_SIDLExceptionType.tp_new(&_sidl_SIDLExceptionType, NULL,   \
 
1965
      NULL);
 
1966
    if (result) {
 
1967
      if (sidl_Object_Init(
 
1968
        (SPObject *)result,
 
1969
        (struct sidl_BaseInterface__object *)(sidlobj),
 
1970
        sidl_PyNewRef))
 
1971
      {
 
1972
        Py_DECREF(result);
 
1973
        result = NULL;
 
1974
      }
 
1975
    }
 
1976
  }
 
1977
  else {
 
1978
    result = Py_None;
 
1979
    Py_INCREF(result);
 
1980
  }
 
1981
  return result;
 
1982
}
 
1983
 
 
1984
sidl_SIDLException__addRef_RETURN
 
1985
sidl_SIDLException__addRef sidl_SIDLException__addRef_PROTO {
 
1986
  if (sidlobj) {
 
1987
    struct sidl_BaseInterface__object *throwaway_exception;
 
1988
    (*(sidlobj->d_epv->f_addRef))(sidlobj, &throwaway_exception);
 
1989
  }
 
1990
}
 
1991
 
 
1992
sidl_SIDLException_PyType_RETURN
 
1993
sidl_SIDLException_PyType sidl_SIDLException_PyType_PROTO {
 
1994
  Py_INCREF(&_sidl_SIDLExceptionType);
 
1995
  return &_sidl_SIDLExceptionType;
 
1996
}
 
1997
 
 
1998
sidl_SIDLException__convert_RETURN
 
1999
sidl_SIDLException__convert sidl_SIDLException__convert_PROTO {
 
2000
  if (*sidlobj) {
 
2001
    struct sidl_BaseInterface__object *throwaway_exception;
 
2002
    (*((*sidlobj)->d_epv->f_deleteRef))((*sidlobj), &throwaway_exception);
 
2003
  }
 
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");
 
2008
    return 0;
 
2009
  }
 
2010
  return 1;
 
2011
}
 
2012
 
 
2013
static int
 
2014
_convertPython(void *sidlarray, const int *ind, PyObject *pyobj)
 
2015
{
 
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);
 
2020
    if (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);
 
2025
    }
 
2026
    return FALSE;
 
2027
  }
 
2028
  return TRUE;
 
2029
}
 
2030
 
 
2031
sidl_SIDLException__convert_python_array_RETURN
 
2032
sidl_SIDLException__convert_python_array                                      \
 
2033
  sidl_SIDLException__convert_python_array_PROTO {
 
2034
  int result = 0;
 
2035
  if (*sidlarray) {
 
2036
    sidl__array_deleteRef((struct sidl__array *)*sidlarray);
 
2037
    *sidlarray = NULL;
 
2038
  }
 
2039
  if (obj == Py_None) {
 
2040
    result = TRUE;
 
2041
  }
 
2042
  else {
 
2043
    PyObject *pya = PyArray_FromObject(obj, PyArray_OBJECT, 0, 0);
 
2044
    if (pya) {
 
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))
 
2051
        {
 
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);
 
2060
            *sidlarray = NULL;
 
2061
          }
 
2062
        }
 
2063
      }
 
2064
      Py_DECREF(pya);
 
2065
    }
 
2066
  }
 
2067
  return result;
 
2068
}
 
2069
 
 
2070
static int
 
2071
_convertSIDL(void *sidlarray, const int *ind, PyObject **dest)
 
2072
{
 
2073
  struct sidl_SIDLException__object *sidlobj = (struct                        \
 
2074
    sidl_SIDLException__object*)
 
2075
  sidl_interface__array_get((struct sidl_interface__array *)
 
2076
    sidlarray, ind);
 
2077
  *dest = sidl_SIDLException__wrap(sidlobj);
 
2078
  return (*dest == NULL);
 
2079
}
 
2080
 
 
2081
sidl_SIDLException__convert_sidl_array_RETURN
 
2082
sidl_SIDLException__convert_sidl_array                                        \
 
2083
  sidl_SIDLException__convert_sidl_array_PROTO {
 
2084
  PyObject *pya = NULL;
 
2085
  if (sidlarray) {
 
2086
    const int dimen = sidlArrayDim(sidlarray);
 
2087
    int numelem[7];
 
2088
    int32_t start[7];
 
2089
#if SIZEOF_INT != 4
 
2090
    int lower[7];
 
2091
    int upper[7];
 
2092
    int32_t s_numelem[7];
 
2093
#else
 
2094
    int * const lower = (int *)(sidlarray->d_lower);
 
2095
    int * const upper = (int *)(sidlarray->d_upper);
 
2096
    int32_t * const s_numelem = numelem;
 
2097
#endif
 
2098
    int i;
 
2099
    for(i = 0; i < dimen; ++i) {
 
2100
      start[i] = sidlLower(sidlarray, i);
 
2101
#if SIZEOF_INT != 4
 
2102
      lower[i] = sidlLower(sidlarray, i);
 
2103
      upper[i] = sidlUpper(sidlarray, i);
 
2104
      s_numelem[i] = sidlLength(sidlarray, i);
 
2105
#endif
 
2106
      numelem[i] = 1 + upper[i] - lower[i];
 
2107
    }
 
2108
    pya = PyArray_FromDims(dimen, numelem, PyArray_OBJECT);
 
2109
    if (pya) {
 
2110
      if (!sidl_array__convert_sidl(pya, dimen, start,
 
2111
        sidlarray->d_upper,
 
2112
        s_numelem, sidlarray, _convertSIDL))
 
2113
      {
 
2114
        Py_DECREF(pya);
 
2115
        pya = NULL;
 
2116
      }
 
2117
    }
 
2118
  }
 
2119
  else {
 
2120
    Py_INCREF(Py_None);
 
2121
    pya = Py_None;
 
2122
  }
 
2123
  return pya;
 
2124
}
 
2125
 
 
2126
void
 
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, "\
 
2133
\
 
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."
 
2137
  );
 
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;
 
2155
#ifdef WITH_RMI
 
2156
  ExternalAPI[sidl_SIDLException__connectI_NUM] = (                           \
 
2157
    void*)sidl_SIDLException__connectI;
 
2158
#endif /*WITH_RMI*/
 
2159
  import_SIDLObjA();
 
2160
  if (PyErr_Occurred()) {
 
2161
    Py_FatalError("Error importing sidlObjA module.");
 
2162
  }
 
2163
  /* Initialize to temporary value. */
 
2164
  Py_INCREF(Py_None);
 
2165
  ExternalAPI[sidl_SIDLException__type_NUM] = Py_None;
 
2166
  c_api = PyCObject_FromVoidPtr((void *)ExternalAPI, NULL);
 
2167
  PyDict_SetItemString(dict, "_C_API", c_api);
 
2168
  Py_XDECREF(c_api);
 
2169
  import_SIDLPyArrays();
 
2170
  if (PyErr_Occurred()) {
 
2171
    Py_FatalError("Error importing sidlPyArrays module.");
 
2172
  }
 
2173
  import_array();
 
2174
  if (PyErr_Occurred()) {
 
2175
    Py_FatalError("Error importing Numeric Python module.");
 
2176
  }
 
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) {
 
2186
    PyErr_Print();
 
2187
    fprintf(stderr, "PyType_Ready on sidl.SIDLException failed.\n");
 
2188
    return;
 
2189
  }
 
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,     \
 
2201
    _exceptionName);
 
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;
 
2208
  /*
 
2209
   * If it's safe, add "Exception" for backward compatibility
 
2210
   * with Babel 0.10.2 (and previous).
 
2211
   */
 
2212
 
 
2213
  if (!PyDict_GetItemString(dict, "Exception")) {
 
2214
    Py_XINCREF(sidl_SIDLException__type);
 
2215
    PyDict_SetItemString(dict, "Exception", sidl_SIDLException__type);
 
2216
  }
 
2217
  _implEPV = sidl_SIDLException__externals();
 
2218
  if (!_implEPV) {
 
2219
    Py_FatalError("Cannot load implementation for sidl class                  \
 
2220
      sidl.SIDLException");
 
2221
  }
 
2222
 
 
2223
#ifdef WITH_RMI
 
2224
 
 
2225
 
 
2226
  sidl_rmi_ConnectRegistry_registerConnect("sidl.SIDLException", (            \
 
2227
    void*)sidl_SIDLException__IHConnect, &throwaway_exception);
 
2228
 
 
2229
#endif /*WITH_RMI*/
 
2230
 
 
2231
}