summaryrefslogtreecommitdiff
path: root/TAO/IIOP/test/Orbix/factory_client/cubitC.cpp
blob: c439fc4c8008d56f6440e37c7c76fe22be4e2491 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710


#include "cubit.h"

Cubit::Cubit (char *IT_OR) {
      m_pptr = new Cubit_dispatch (IT_OR, this,(CORBA::Object*)this);
} 
Cubit::Cubit (ObjectReference *IT_OR) {
      m_pptr = new Cubit_dispatch (IT_OR, this,(CORBA::Object*)this);
} 

#ifndef CubitForwC
#define CubitForwC
CORBA::ObjectRef Cubit_getBase(void *IT_p){
    return (Cubit*) IT_p;}

void Cubit_release (Cubit_ptr IT_p, CORBA::Environment &IT_env) {
    CORBA::release(IT_p, IT_env);}

void Cubit_release (Cubit_ptr IT_p) {
    Cubit_release (IT_p, CORBA::IT_chooseDefaultEnv ()); }

Cubit_ptr Cubit_nil (CORBA::Environment &) {
    return Cubit:: _nil ();}

Cubit_ptr Cubit_nil () {
    return Cubit_nil (CORBA::IT_chooseDefaultEnv ());}

Cubit_ptr Cubit_duplicate (Cubit_ptr IT_p, CORBA::Environment &IT_env) {
    return (Cubit::_duplicate(IT_p, IT_env)); }
Cubit_ptr Cubit_duplicate (Cubit_ptr IT_p) {
    return Cubit_duplicate (IT_p, CORBA::IT_chooseDefaultEnv ()); }
#endif

Cubit_ptr Cubit::_duplicate(Cubit_ptr obj, CORBA::Environment& IT_pEnv) {
        CORBA::EnvExcRaiser IT_raise;
        CORBA::Environment &IT_env = IT_raise.registerEnv (&IT_pEnv);
       if (!obj) {
          return (obj);
       }
       Cubit_ptr IT_obj = obj->__duplicate (IT_env);
       return IT_obj;
}



Cubit* Cubit:: _bind (const char* IT_markerServer, const char* host,
		const CORBA::Context &IT_c, 
		CORBA::Environment &IT_env) {
       return (Cubit*)CORBA::Factory.New (IT_markerServer, IT_env, IT_c, host, 
		Cubit_IMPL, Cubit_IR);
}



Cubit* Cubit:: _bind (CORBA::Environment &IT_env) {
       return _bind (NULL,NULL,CORBA::Context(), IT_env); }


Cubit* Cubit:: _bind (const char* IT_markerServer, const char* host,
                CORBA::Environment &IT_env) {
       return _bind (IT_markerServer, host, CORBA::Context (), IT_env); }
Cubit* Cubit::_narrow (CORBA::Object* IT_obj, CORBA::Environment &IT_pEnv) {
        CORBA::EnvExcRaiser IT_raise;
        CORBA::Environment &IT_env = IT_raise.registerEnv (&IT_pEnv);
        if (CORBA::is_nil (IT_obj)) {
                return Cubit:: _nil();
        }

       Cubit* IT_p = (Cubit*)CORBA::Object::_castDown (IT_obj, Cubit_IR, IT_env);
        IT_p = IT_p ? IT_p->__duplicate(IT_env) : NULL;
        if ((IT_env) &&(!strcmp(IT_env.exception()->id(), "CORBA::StExcep::BAD_PARAM")) && (((CORBA::BAD_PARAM*)IT_env.exception())-> minor() == NARROW_FAILED)) {
                IT_env.exception_free();
        }
        return IT_p;
   }


#ifndef Cubit_Many_Ops
#define Cubit_Many_Ops

void Cubit::Many:: encodeOp (CORBA::Request &IT_r) const {

    IT_r.insertOctet (o);

    IT_r << l;

    IT_r << s;
}

void Cubit::Many:: decodeOp (CORBA::Request &IT_r) {

    IT_r.extractOctet (o);

    IT_r >> l;

    IT_r >> s;
}

void Cubit::Many:: decodeInOutOp (CORBA::Request &IT_r) {

    IT_r.extractOctet (o);

    IT_r >> l;

    IT_r >> s;
}

Cubit::Many ::~Many () {
}

Cubit::Many:: Many (const Cubit::Many &IT_s) 
	 {
    o = IT_s.o;
    l = IT_s.l;
    s = IT_s.s;
}

Cubit::Many:: Many () {
}

Cubit::Many &Cubit::Many:: operator= (const Cubit::Many& IT_s) {
    if (this == &IT_s) return *this;
    o = IT_s.o;
    l = IT_s.l;
    s = IT_s.s;
    return *this;
}


#endif


#ifndef Cubit_oneof_Ops
#define Cubit_oneof_Ops
void Cubit::oneof:: encodeOp (CORBA::Request &IT_r) const {
    if (!isSet) return;
    {
    CORBA::ULong IT_0 = (CORBA::ULong) __d;
    IT_r << IT_0;
    }
    switch (__d) {
        case Cubit::e_0th: 
        IT_r.insertOctet (_o_);
        break;
        case Cubit::e_1st: 
        IT_r << _s_;
        break;
        case Cubit::e_2nd: 
        IT_r << _l_;
        break;
        case Cubit::e_3rd: 
        default: 
        (*_cm_).encodeOp (IT_r);
        break;
    }

}

void Cubit::oneof:: decodeOp (CORBA::Request &IT_r) {
    isSet = 0;
    {
    CORBA::ULong IT_1;
    IT_r >> IT_1;
    __d = Cubit::discrim(IT_1);
    }
    switch (__d) {
        case Cubit::e_0th: 
        if (!isSet) {
            isSet = 1;
        }
        IT_r.extractOctet (_o_);
        break;
        case Cubit::e_1st: 
        if (!isSet) {
            isSet = 1;
        }
        IT_r >> _s_;
        break;
        case Cubit::e_2nd: 
        if (!isSet) {
            isSet = 1;
        }
        IT_r >> _l_;
        break;
        case Cubit::e_3rd: 
        default: 
        if (!isSet) {
            _cm_ = new Cubit::Many;
            isSet = 1;
        }
        (*_cm_).decodeOp (IT_r);
        break;
    }

}
void Cubit::oneof:: decodeInOutOp (CORBA::Request &IT_r) {
    Cubit::discrim IT_d;
    {
    CORBA::ULong IT_2;
    IT_r >> IT_2;
    IT_d = Cubit::discrim(IT_2);
    }
    if (IT_d == __d)
        switch (__d) {
            case Cubit::e_0th: 
            if (!isSet) {
                isSet = 1;
            }
            IT_r.extractOctet (_o_);
            break;
            case Cubit::e_1st: 
            if (!isSet) {
                isSet = 1;
            }
            IT_r >> _s_;
            break;
            case Cubit::e_2nd: 
            if (!isSet) {
                isSet = 1;
            }
            IT_r >> _l_;
            break;
            case Cubit::e_3rd: 
            default: 
            if (!isSet) {
                _cm_ = new Cubit::Many;
                isSet = 1;
            }
            (*_cm_).decodeInOutOp (IT_r);
            break;
        }

    else {
        this->oneof:: ~oneof();
        memset(this, 0, sizeof(*this));
        __d = IT_d;
        switch (__d) {
            case Cubit::e_0th: 
            if (!isSet) {
                isSet = 1;
            }
            IT_r.extractOctet (_o_);
            break;
            case Cubit::e_1st: 
            if (!isSet) {
                isSet = 1;
            }
            IT_r >> _s_;
            break;
            case Cubit::e_2nd: 
            if (!isSet) {
                isSet = 1;
            }
            IT_r >> _l_;
            break;
            case Cubit::e_3rd: 
            default: 
            if (!isSet) {
                _cm_ = new Cubit::Many;
                isSet = 1;
            }
            (*_cm_).decodeOp (IT_r);
            break;
        }
        isSet = 1;
    }

}

Cubit::oneof:: oneof() { 
    memset(this, 0, sizeof(*this));
    isSet = 0;
}

Cubit::oneof ::~oneof() {
    if (!isSet) return;
    switch (__d) { 
        case Cubit::e_0th:         break;
        case Cubit::e_1st:         break;
        case Cubit::e_2nd:         break;
        case Cubit::e_3rd: 
        default:         if (_cm_) delete _cm_;
        break;
    }

    isSet = 0;
}

Cubit::oneof:: oneof (const Cubit::oneof &IT_s) {
    isSet = 0;
    memset(this, 0, sizeof(*this));
    __d = IT_s.__d;
    switch (__d) {
        case Cubit::e_0th:         isSet = 1;
        _o_ = IT_s._o_;
        break;
        case Cubit::e_1st:         isSet = 1;
        _s_ = IT_s._s_;
        break;
        case Cubit::e_2nd:         isSet = 1;
        _l_ = IT_s._l_;
        break;
        case Cubit::e_3rd: 
        default: 
        if (!isSet) {
            _cm_ = new Cubit::Many;
            isSet = 1;
        }
        *(_cm_) = *(IT_s._cm_);
        break;
    }
    isSet = 1;
}

Cubit::oneof& Cubit::oneof:: operator= (const Cubit::oneof & IT_s) {
    if (this == &IT_s) return *this;
    if (isSet && (__d != IT_s.__d))
    {
        this-> oneof::~oneof();
        memset(this, 0, sizeof(*this));
    }

    __d = IT_s.__d;
    switch (__d) {
        case Cubit::e_0th:         isSet = 1;
        _o_ = IT_s._o_;
        break;
        case Cubit::e_1st:         isSet = 1;
        _s_ = IT_s._s_;
        break;
        case Cubit::e_2nd:         isSet = 1;
        _l_ = IT_s._l_;
        break;
        case Cubit::e_3rd: 
        default: 
        if (!isSet) {
            _cm_ = new Cubit::Many;
            isSet = 1;
        }
        *(_cm_) = *(IT_s._cm_);
        break;
    }
    isSet = 1;
    return *this;
}


#endif

void* CubitProxyFactoryClass::New (char *IT_OR, CORBA::Environment&) {
        return  new class Cubit(IT_OR);}

void* CubitProxyFactoryClass::New (ObjectReference *IT_OR, CORBA::Environment&) {
        return  new class Cubit(IT_OR);}

void* CubitProxyFactoryClass::New2 () {
        return  new class Cubit((char*)0);}

CORBA::Object* CubitProxyFactoryClass::NewObject (char *IT_OR, CORBA::Environment&) {
        return  new class Cubit(IT_OR);}

CORBA::Object* CubitProxyFactoryClass::NewObject (ObjectReference *IT_OR, CORBA::Environment&) {
        return  new class Cubit(IT_OR);}

CORBA::Object* CubitProxyFactoryClass::New2Object () {
        return  new class Cubit((char*)0);}

void* CubitProxyFactoryClass::IT_castUp (void *IT_p, char* IT_s, CORBA::Environment &IT_env) {
      void *IT_l;
      if (!CORBA::_interfaceCmp (IT_s,Cubit_IR, IT_env))
         return IT_p;
      else if (IT_l=CORBA::ObjectFactoryClass::IT_castUp((CORBA::Object*)((class Cubit*)IT_p),IT_s, IT_env))
         return IT_l;
      else return NULL;
    }


CORBA::PPTR* CubitProxyFactoryClass::pptr (void *IT_p) {
       return ((class Cubit*)IT_p)->_pptr ();}

void CubitProxyFactoryClass::baseInterfaces (_IDL_SEQUENCE_string& seq) {
      add (seq, Cubit_IR);
      CORBA::ObjectFactoryClass::baseInterfaces (seq);
}

CubitProxyFactoryClass CubitProxyFactory(1);

CORBA::Octet Cubit:: cube_octet (CORBA::Octet o, CORBA::Environment &IT_pEnv) throw (CORBA::SystemException) {

    CORBA::EnvExcRaiser IT_raise;
    CORBA::Environment &IT_env = IT_raise.registerEnv (&IT_pEnv);
    if (IT_env || m_isNull) {
        return 0;
    }
    CORBA::Request IT_r (this, "cube_octet",IT_env,1,0);
    if (!IT_r.isException (IT_env)) {

        IT_r.insertOctet (o);
    }

    IT_r.invoke (CORBA::Flags(0),IT_env);
    if (!IT_r.isException (IT_env)) {
        CORBA::Octet IT_result;
        IT_r.extractOctet (IT_result);
        IT_r.checkEnv (IT_env);
        return IT_result;
    }
    if (IT_r.exceptionKind () == CORBA::SYSTEM_EXCEPTION) {
        IT_r.checkEnv (IT_env);
    }
    return 0;
}

CORBA::Short Cubit:: cube_short (CORBA::Short s, CORBA::Environment &IT_pEnv) throw (CORBA::SystemException) {

    CORBA::EnvExcRaiser IT_raise;
    CORBA::Environment &IT_env = IT_raise.registerEnv (&IT_pEnv);
    if (IT_env || m_isNull) {
        return 0;
    }
    CORBA::Request IT_r (this, "cube_short",IT_env,1,0);
    if (!IT_r.isException (IT_env)) {

        IT_r << s;
    }

    IT_r.invoke (CORBA::Flags(0),IT_env);
    if (!IT_r.isException (IT_env)) {
        CORBA::Short IT_result;
        IT_r >> IT_result;
        IT_r.checkEnv (IT_env);
        return IT_result;
    }
    if (IT_r.exceptionKind () == CORBA::SYSTEM_EXCEPTION) {
        IT_r.checkEnv (IT_env);
    }
    return 0;
}

CORBA::Long Cubit:: cube_long (CORBA::Long l, CORBA::Environment &IT_pEnv) throw (CORBA::SystemException) {

    CORBA::EnvExcRaiser IT_raise;
    CORBA::Environment &IT_env = IT_raise.registerEnv (&IT_pEnv);
    if (IT_env || m_isNull) {
        return 0;
    }
    CORBA::Request IT_r (this, "cube_long",IT_env,1,0);
    if (!IT_r.isException (IT_env)) {

        IT_r << l;
    }

    IT_r.invoke (CORBA::Flags(0),IT_env);
    if (!IT_r.isException (IT_env)) {
        CORBA::Long IT_result;
        IT_r >> IT_result;
        IT_r.checkEnv (IT_env);
        return IT_result;
    }
    if (IT_r.exceptionKind () == CORBA::SYSTEM_EXCEPTION) {
        IT_r.checkEnv (IT_env);
    }
    return 0;
}

Cubit::Many Cubit:: cube_struct (const Cubit::Many& values, CORBA::Environment &IT_pEnv) throw (CORBA::SystemException) {

    CORBA::EnvExcRaiser IT_raise;
    CORBA::Environment &IT_env = IT_raise.registerEnv (&IT_pEnv);
    if (IT_env || m_isNull) {
        { 
            Cubit::Many IT_l0;
            return IT_l0;
        }
    }
    CORBA::Request IT_r (this, "cube_struct",IT_env,1,0);
    if (!IT_r.isException (IT_env)) {

        values.encodeOp (IT_r);
    }

    IT_r.invoke (CORBA::Flags(0),IT_env);
    if (!IT_r.isException (IT_env)) {
        Cubit::Many IT_result;
        IT_result.decodeOp (IT_r);
        IT_r.checkEnv (IT_env);
        return IT_result;
    }
    if (IT_r.exceptionKind () == CORBA::SYSTEM_EXCEPTION) {
        IT_r.checkEnv (IT_env);
    }
    { 
        Cubit::Many IT_l1;
        return IT_l1;
    }
}

Cubit::oneof Cubit:: cube_union (const Cubit::oneof& values, CORBA::Environment &IT_pEnv) throw (CORBA::SystemException) {

    CORBA::EnvExcRaiser IT_raise;
    CORBA::Environment &IT_env = IT_raise.registerEnv (&IT_pEnv);
    if (IT_env || m_isNull) {
        { 
            Cubit::oneof IT_l0;
            return IT_l0;
        }
    }
    CORBA::Request IT_r (this, "cube_union",IT_env,1,0);
    if (!IT_r.isException (IT_env)) {

        values.encodeOp (IT_r);
    }

    IT_r.invoke (CORBA::Flags(0),IT_env);
    if (!IT_r.isException (IT_env)) {
        Cubit::oneof IT_result;
        IT_result.decodeOp (IT_r);
        IT_r.checkEnv (IT_env);
        return IT_result;
    }
    if (IT_r.exceptionKind () == CORBA::SYSTEM_EXCEPTION) {
        IT_r.checkEnv (IT_env);
    }
    { 
        Cubit::oneof IT_l1;
        return IT_l1;
    }
}

void Cubit:: please_exit (CORBA::Environment &IT_pEnv) throw (CORBA::SystemException) {

    CORBA::EnvExcRaiser IT_raise;
    CORBA::Environment &IT_env = IT_raise.registerEnv (&IT_pEnv);
    if (IT_env || m_isNull) {
        return ;
    }
    CORBA::Request IT_r (this, "please_exit",IT_env,1,1);

    IT_r.invoke (CORBA::Flags(CORBA::INV_NO_RESPONSE), IT_env);
    if (IT_r.exceptionKind () == CORBA::SYSTEM_EXCEPTION) {
        IT_r.checkEnv (IT_env);
    }
}





#ifndef Cubit_dispatch_impl

unsigned char Cubit_dispatch::dispatch (CORBA::Request &IT_r, 
    unsigned char, void *) {
      IT_r.makeRuntimeException1 ("Cubit");
      return 0;
}
 
#endif

Cubit_Factory::Cubit_Factory (char *IT_OR) {
      m_pptr = new Cubit_Factory_dispatch (IT_OR, this,(CORBA::Object*)this);
} 
Cubit_Factory::Cubit_Factory (ObjectReference *IT_OR) {
      m_pptr = new Cubit_Factory_dispatch (IT_OR, this,(CORBA::Object*)this);
} 

#ifndef Cubit_FactoryForwC
#define Cubit_FactoryForwC
CORBA::ObjectRef Cubit_Factory_getBase(void *IT_p){
    return (Cubit_Factory*) IT_p;}

void Cubit_Factory_release (Cubit_Factory_ptr IT_p, CORBA::Environment &IT_env) {
    CORBA::release(IT_p, IT_env);}

void Cubit_Factory_release (Cubit_Factory_ptr IT_p) {
    Cubit_Factory_release (IT_p, CORBA::IT_chooseDefaultEnv ()); }

Cubit_Factory_ptr Cubit_Factory_nil (CORBA::Environment &) {
    return Cubit_Factory:: _nil ();}

Cubit_Factory_ptr Cubit_Factory_nil () {
    return Cubit_Factory_nil (CORBA::IT_chooseDefaultEnv ());}

Cubit_Factory_ptr Cubit_Factory_duplicate (Cubit_Factory_ptr IT_p, CORBA::Environment &IT_env) {
    return (Cubit_Factory::_duplicate(IT_p, IT_env)); }
Cubit_Factory_ptr Cubit_Factory_duplicate (Cubit_Factory_ptr IT_p) {
    return Cubit_Factory_duplicate (IT_p, CORBA::IT_chooseDefaultEnv ()); }
#endif

Cubit_Factory_ptr Cubit_Factory::_duplicate(Cubit_Factory_ptr obj, CORBA::Environment& IT_pEnv) {
        CORBA::EnvExcRaiser IT_raise;
        CORBA::Environment &IT_env = IT_raise.registerEnv (&IT_pEnv);
       if (!obj) {
          return (obj);
       }
       Cubit_Factory_ptr IT_obj = obj->__duplicate (IT_env);
       return IT_obj;
}



Cubit_Factory* Cubit_Factory:: _bind (const char* IT_markerServer, const char* host,
		const CORBA::Context &IT_c, 
		CORBA::Environment &IT_env) {
       return (Cubit_Factory*)CORBA::Factory.New (IT_markerServer, IT_env, IT_c, host, 
		Cubit_Factory_IMPL, Cubit_Factory_IR);
}



Cubit_Factory* Cubit_Factory:: _bind (CORBA::Environment &IT_env) {
       return _bind (NULL,NULL,CORBA::Context(), IT_env); }


Cubit_Factory* Cubit_Factory:: _bind (const char* IT_markerServer, const char* host,
                CORBA::Environment &IT_env) {
       return _bind (IT_markerServer, host, CORBA::Context (), IT_env); }
Cubit_Factory* Cubit_Factory::_narrow (CORBA::Object* IT_obj, CORBA::Environment &IT_pEnv) {
        CORBA::EnvExcRaiser IT_raise;
        CORBA::Environment &IT_env = IT_raise.registerEnv (&IT_pEnv);
        if (CORBA::is_nil (IT_obj)) {
                return Cubit_Factory:: _nil();
        }

       Cubit_Factory* IT_p = (Cubit_Factory*)CORBA::Object::_castDown (IT_obj, Cubit_Factory_IR, IT_env);
        IT_p = IT_p ? IT_p->__duplicate(IT_env) : NULL;
        if ((IT_env) &&(!strcmp(IT_env.exception()->id(), "CORBA::StExcep::BAD_PARAM")) && (((CORBA::BAD_PARAM*)IT_env.exception())-> minor() == NARROW_FAILED)) {
                IT_env.exception_free();
        }
        return IT_p;
   }

void* Cubit_FactoryProxyFactoryClass::New (char *IT_OR, CORBA::Environment&) {
        return  new class Cubit_Factory(IT_OR);}

void* Cubit_FactoryProxyFactoryClass::New (ObjectReference *IT_OR, CORBA::Environment&) {
        return  new class Cubit_Factory(IT_OR);}

void* Cubit_FactoryProxyFactoryClass::New2 () {
        return  new class Cubit_Factory((char*)0);}

CORBA::Object* Cubit_FactoryProxyFactoryClass::NewObject (char *IT_OR, CORBA::Environment&) {
        return  new class Cubit_Factory(IT_OR);}

CORBA::Object* Cubit_FactoryProxyFactoryClass::NewObject (ObjectReference *IT_OR, CORBA::Environment&) {
        return  new class Cubit_Factory(IT_OR);}

CORBA::Object* Cubit_FactoryProxyFactoryClass::New2Object () {
        return  new class Cubit_Factory((char*)0);}

void* Cubit_FactoryProxyFactoryClass::IT_castUp (void *IT_p, char* IT_s, CORBA::Environment &IT_env) {
      void *IT_l;
      if (!CORBA::_interfaceCmp (IT_s,Cubit_Factory_IR, IT_env))
         return IT_p;
      else if (IT_l=CORBA::ObjectFactoryClass::IT_castUp((CORBA::Object*)((class Cubit_Factory*)IT_p),IT_s, IT_env))
         return IT_l;
      else return NULL;
    }


CORBA::PPTR* Cubit_FactoryProxyFactoryClass::pptr (void *IT_p) {
       return ((class Cubit_Factory*)IT_p)->_pptr ();}

void Cubit_FactoryProxyFactoryClass::baseInterfaces (_IDL_SEQUENCE_string& seq) {
      add (seq, Cubit_Factory_IR);
      CORBA::ObjectFactoryClass::baseInterfaces (seq);
}

Cubit_FactoryProxyFactoryClass Cubit_FactoryProxyFactory(1);

Cubit_ptr Cubit_Factory:: create_cubit (const char * name, CORBA::Environment &IT_pEnv) throw (CORBA::SystemException) {

    CORBA::EnvExcRaiser IT_raise;
    CORBA::Environment &IT_env = IT_raise.registerEnv (&IT_pEnv);
    if (IT_env || m_isNull) {
        return new Cubit;
    }
    CORBA::Request IT_r (this, "create_cubit",IT_env,1,0);
    if (!IT_r.isException (IT_env)) {

        IT_r.encodeStringOp (name);
    }

    IT_r.invoke (CORBA::Flags(0),IT_env);
    if (!IT_r.isException (IT_env)) {
        Cubit_ptr IT_result;
        IT_result = (Cubit*) IT_r.decodeObjRef (Cubit_IR);
        IT_r.checkEnv (IT_env);
        return IT_result;
    }
    if (IT_r.exceptionKind () == CORBA::SYSTEM_EXCEPTION) {
        IT_r.checkEnv (IT_env);
    }
    return new Cubit;
}





#ifndef Cubit_Factory_dispatch_impl

unsigned char Cubit_Factory_dispatch::dispatch (CORBA::Request &IT_r, 
    unsigned char, void *) {
      IT_r.makeRuntimeException1 ("Cubit_Factory");
      return 0;
}
 
#endif