summaryrefslogtreecommitdiff
path: root/TAO/IIOP/test/Orbix/tps/cubit.h
blob: 80e2c0590f5a6228ae5f67e0848e4279ddacbc28 (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
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
// $Id$


#ifndef cubit_hh
#define cubit_hh

#include <CORBA.h>

#include <string.h>


#ifndef _Cubit_defined
#define _Cubit_defined
class Cubit_dispatch : public virtual CORBA::PPTR {
public:

      Cubit_dispatch (void *IT_p, CORBA::Object* IT_o, const char *IT_m,
        CORBA::LoaderClass *IT_l, char *IT_i, void* IT_im)
       : PPTR (IT_p,IT_o,IT_m,IT_l,IT_i,IT_im) {}


   Cubit_dispatch (char *IT_OR, void *IT_p, CORBA::Object *IT_o)
       : PPTR (IT_OR,IT_p,IT_o) {}


   Cubit_dispatch () {}

   Cubit_dispatch (ObjectReference *IT_OR, void *IT_p, CORBA::Object *IT_o)
       : PPTR (IT_OR,IT_p,IT_o) {}


   Cubit_dispatch (void *IT_p, CORBA::Object *IT_o, const char *IT_m,
        char *IT_i, CORBA::Object* IT_ob, void* IT_im)
       : PPTR (IT_p,IT_o,IT_m,IT_i,IT_ob,IT_im) {}


   virtual unsigned char dispatch (CORBA::Request &IT_r,
        unsigned char IT_isTarget, void* IT_pp=NULL);


};

class Cubit;

#ifndef CubitPtr
#define CubitPtr

typedef Cubit* Cubit_ptr;

typedef Cubit* CubitRef;

#endif


#ifndef CubitForwH
#define CubitForwH
CORBA::ObjectRef Cubit_getBase (void *);
void Cubit_release (Cubit *, CORBA::Environment &IT_env);
void Cubit_release (Cubit_ptr);
Cubit* Cubit_duplicate (Cubit_ptr, CORBA::Environment &IT_env);
Cubit* Cubit_duplicate (Cubit_ptr );
Cubit_ptr Cubit_nil (CORBA::Environment &IT_env);
Cubit_ptr Cubit_nil ();
#endif
#define Cubit_IMPL "Cubit"


class Cubit;

typedef Cubit CubitProxy;
#define Cubit_IR "Cubit$v1.1"
#define Cubit_IMPL "Cubit"

#ifndef CubitPtr
#define CubitPtr

typedef Cubit* Cubit_ptr;

typedef Cubit* CubitRef;

#endif

class Cubit: public virtual CORBA::Object  {
public:
        Cubit (char *IT_OR);
    Cubit (ObjectReference *IT_OR);
    Cubit () : CORBA::Object  (1) {}
protected:
    Cubit_ptr __duplicate(
            CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) {
       CORBA::Object::__duplicate (IT_env);
       return this;
    }
public:
    static Cubit_ptr _duplicate(
            Cubit_ptr,
            CORBA::Environment &IT_pEnv=CORBA::IT_chooseDefaultEnv ());
public:
   static Cubit* _bind (const char* IT_markerServer, const char* host,
                const CORBA::Context &IT_c,
                CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ());
   static Cubit* _bind (CORBA::Environment &IT_env);
   static Cubit* _bind (const char* IT_markerServer=NULL, const char* host=NULL,
                 CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ());
    static Cubit* _narrow (CORBA::Object* , CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ());
    static Cubit_ptr _nil (CORBA::Environment &IT_pEnv=CORBA::IT_chooseDefaultEnv ()) {
        CORBA::EnvExcRaiser IT_raise;
        CORBA::Environment &IT_env = IT_raise.registerEnv (&IT_pEnv);
        return (Cubit_ptr) CORBA::OBJECT_NIL;}

#ifndef Cubit_Many_defined
#define Cubit_Many_defined

struct Many {
    CORBA::Octet o;
    CORBA::Long l;
    CORBA::Short s;

    void encodeOp (CORBA::Request &IT_r) const;
    void decodeOp (CORBA::Request &IT_r);
    void decodeInOutOp (CORBA::Request &IT_r);
    Many(const Many &);
    Many();
    ~Many();
    Many& operator= (const Many&);
};

#ifndef Cubit_ManyVarH
#define Cubit_ManyVarH

#ifndef Cubit_ManyvPtr
#define Cubit_ManyvPtr
typedef Many* Many_vPtr;
typedef const Many* Many_cvPtr;
#endif

class Many_var : public CORBA::_var
{
    private:

    unsigned char copyHelper (const Many_var &IT_s) {
        if (!IT_s._ptr) {
            _ptr = IT_s._ptr;
        } else
        {
            _ptr = new Many;
            *(_ptr) =  *(IT_s._ptr);
        }
        return 1;
    }

    public:

    Many_var (const Many_var &IT_s) {
        (void) copyHelper (IT_s);
    }

    Many_var () {
        _ptr =  new Many;
;
    }

    Many_var (Many *IT_p) {
        _ptr = IT_p;
    }

    Many_var &operator= (Many *IT_p) {
        if (_ptr != IT_p) {
            delete _ptr;
        }
        _ptr = IT_p;
        return (*this);
    }

    Many_var &operator= (const Many_var &IT_s) {
        if (_ptr != IT_s._ptr) {
            delete _ptr;
        }
        _ptr = new Many;
        *(_ptr) =  *(IT_s._ptr);
        return (*this);
    }

    ~Many_var () {
        delete _ptr;
    }

    Many* operator-> () {
        return _ptr;
    }

    operator Many_cvPtr () const { return _ptr;}
    operator Many_vPtr& () { return _ptr;}
    operator Many& () const { return * _ptr;}

    protected:
    Many *_ptr;
    private:
    Many_var &operator= (const CORBA::_var &IT_s);
    Many_var (const CORBA::_var &IT_s);
};

#endif


#endif

enum discrim {e_0th,e_1st,e_2nd,e_3rd,e_4th,e_5th, IT__ENUM_Cubit_discrim=CORBA_ULONG_MAX};

#ifndef Cubit_oneof_defined
#define Cubit_oneof_defined

struct oneof {
    private:

    discrim __d;
    union {
        CORBA::Octet _o_;
        CORBA::Short _s_;
        CORBA::Long _l_;
        Many * _cm_;
    };

    public:

    void encodeOp (CORBA::Request &IT_r) const;
    void decodeOp (CORBA::Request &IT_r);
    void decodeInOutOp (CORBA::Request &IT_r);

    private:

    unsigned char isSet;

    public:

    discrim _d () const { return __d; }

    CORBA::Octet o () const {
        return _o_;
    }

    void o (CORBA::Octet IT_member) {
        if (isSet && (__d != Cubit::e_0th))
        {
            this-> oneof::~oneof();
            memset(this, 0, sizeof(*this));
        }

        __d = Cubit::e_0th;
        isSet = 1;
        _o_ = IT_member;
    }

    CORBA::Short s () const {
        return _s_;
    }

    void s (CORBA::Short IT_member) {
        if (isSet && (__d != Cubit::e_1st))
        {
            this-> oneof::~oneof();
            memset(this, 0, sizeof(*this));
        }

        __d = Cubit::e_1st;
        isSet = 1;
        _s_ = IT_member;
    }

    CORBA::Long l () const {
        return _l_;
    }

    void l (CORBA::Long IT_member) {
        if (isSet && (__d != Cubit::e_2nd))
        {
            this-> oneof::~oneof();
            memset(this, 0, sizeof(*this));
        }

        __d = Cubit::e_2nd;
        isSet = 1;
        _l_ = IT_member;
    }

    Many& cm () {
        return (*_cm_);
    }

    const Many& cm () const {
        return (*_cm_);
    }

    void cm (const Many& IT_member) {
        if (isSet && (__d != Cubit::e_3rd))
        {
            this-> oneof::~oneof();
            memset(this, 0, sizeof(*this));
        }

        __d = Cubit::e_3rd;

        if (!isSet) {
            _cm_ = new Many;
            isSet = 1;
        }
        *(_cm_) = IT_member;
    }


    oneof();
    oneof(const oneof &);
    ~oneof();
    oneof& operator= (const oneof&);
};

#ifndef Cubit_oneofVarH
#define Cubit_oneofVarH

#ifndef Cubit_oneofvPtr
#define Cubit_oneofvPtr
typedef oneof* oneof_vPtr;
typedef const oneof* oneof_cvPtr;
#endif

class oneof_var : public CORBA::_var
{
    private:

    unsigned char copyHelper (const oneof_var &IT_s) {
        if (!IT_s._ptr) {
            _ptr = IT_s._ptr;
        } else
        {
            _ptr = new oneof;
            *(_ptr) =  *(IT_s._ptr);
        }
        return 1;
    }

    public:

    oneof_var (const oneof_var &IT_s) {
        (void) copyHelper (IT_s);
    }

    oneof_var () {
        _ptr = NULL;
    }

    oneof_var (oneof *IT_p) {
        _ptr = IT_p;
    }

    oneof_var &operator= (oneof *IT_p) {
        if (_ptr != IT_p) {
            delete _ptr;
        }
        _ptr = IT_p;
        return (*this);
    }

    oneof_var &operator= (const oneof_var &IT_s) {
        if (_ptr != IT_s._ptr) {
            delete _ptr;
        }
        _ptr = new oneof;
        *(_ptr) =  *(IT_s._ptr);
        return (*this);
    }

    ~oneof_var () {
        delete _ptr;
    }

    oneof* operator-> () {
        return _ptr;
    }

    operator oneof_cvPtr () const { return _ptr;}
    operator oneof_vPtr& () { return _ptr;}
    operator oneof& () const { return * _ptr;}

    protected:
    oneof *_ptr;
    private:
    oneof_var &operator= (const CORBA::_var &IT_s);
    oneof_var (const CORBA::_var &IT_s);
};

#endif


#endif
        virtual CORBA::Octet cube_octet (CORBA::Octet o, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException);
        virtual CORBA::Short cube_short (CORBA::Short s, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException);
        virtual CORBA::Long cube_long (CORBA::Long l, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException);
        virtual Many cube_struct (const Many& values, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException);
        virtual oneof cube_union (const oneof& values, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException);
        virtual void please_exit (CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException);
};

#ifndef CubitVarH
#define CubitVarH

#ifndef CubitvPtr
#define CubitvPtr
typedef Cubit* Cubit_vPtr;
typedef const Cubit* Cubit_cvPtr;
#endif

class Cubit_var : public CORBA::_var
{
    private:

    unsigned char copyHelper (const Cubit_var &IT_s) {
        {
            _ptr = Cubit_duplicate (IT_s._ptr);
        }
        return 1;
    }

    public:

    Cubit_var (const Cubit_var &IT_s) {
        (void) copyHelper (IT_s);
    }

    Cubit_var () {
        _ptr = Cubit_nil ();
    }

    Cubit_var (Cubit *IT_p) {
        _ptr = IT_p;
    }

    Cubit_var &operator= (Cubit *IT_p) {
        Cubit_release (_ptr);
        _ptr = IT_p;
        return (*this);
    }

    Cubit_var &operator= (const Cubit_var &IT_s) {
        Cubit_release (_ptr);
        _ptr = Cubit_duplicate (IT_s._ptr);
        return (*this);
    }

    ~Cubit_var () {
        Cubit_release (_ptr);
    }

    Cubit* operator-> () {
        return _ptr;
    }

    operator Cubit_cvPtr () const { return _ptr;}
    operator Cubit_vPtr& () { return _ptr;}

    protected:
    Cubit *_ptr;
    private:
    Cubit_var &operator= (const CORBA::_var &IT_s);
    Cubit_var (const CORBA::_var &IT_s);
    Cubit_var &operator= (const CORBA::_mgr &IT_s);
    Cubit_var &operator= (const CORBA::_SeqElem &IT_s);
    Cubit_var (const CORBA::_mgr &IT_s);
    Cubit_var (const CORBA::_SeqElem &IT_s);
};

#endif


#ifndef CubitMgrH
#define CubitMgrH

class Cubit_mgr : public CORBA::_mgr
{
    public:

    Cubit_mgr () {
        _ptr = Cubit_nil ();
        _release = 1;
    }

    Cubit_mgr (const Cubit_mgr &IT_s) {
        _ptr = Cubit_duplicate (IT_s._ptr);
        _release = 1;
    }

    Cubit_mgr &operator= (Cubit *IT_p) {
        if (_ptr && _release)
            Cubit_release (_ptr);
        _ptr = IT_p;
        _release = 1;
        return (*this);
    }

    Cubit_mgr &operator= (const Cubit_mgr &IT_s) {
        if (_ptr && _release)
            Cubit_release (_ptr);
        _ptr = Cubit_duplicate(IT_s._ptr);
        _release = 1;
        return (*this);
    }

    Cubit_mgr &operator= (Cubit_var &IT_s) {
        if (_ptr && _release)
            Cubit_release (_ptr);
        _ptr = Cubit_duplicate(IT_s);
        _release = 1;
        return (*this);
    }

    ~Cubit_mgr () {
        if (_release)
            Cubit_release (_ptr);
    }

    unsigned char release () {
        return _release;
    }

    void release (unsigned char rel) {
        _release = rel;
    }

    operator int () const {
        return (((CORBA::Object_ptr) _ptr) ? 1 : 0);
    }

    operator void* () const {
        return _ptr;
    }

    operator CORBA::Object * () const {
        return (CORBA::Object *) _ptr;
    }

    operator Cubit* () const {
        return (Cubit*) _ptr;
    }

    Cubit_ptr operator-> () const {
        return _ptr;
    }

    Cubit *_ptr;

    protected:

    unsigned char _release;
};

typedef Cubit_mgr Cubit_mgr_IT_const;
#endif

#ifndef CubitSeqElemH
#define CubitSeqElemH

class Cubit_SeqElem : public CORBA::_SeqElem
{
    public:

    Cubit_SeqElem (Cubit_ptr* IT_p, unsigned char rel) {
        _ptr = IT_p;
        _release = rel;
    }

    Cubit_SeqElem &operator= (Cubit_ptr IT_p) {
        if (_ptr) {
            if (*(_ptr) && _release)
                Cubit_release (*(_ptr));
            *(_ptr) = IT_p;
        }
        return (*this);
    }

    Cubit_SeqElem &operator= (const Cubit_SeqElem &IT_s) {
        if (_ptr && IT_s._ptr) {
            if (*(_ptr) && _release)
                Cubit_release (*(_ptr));
            *(_ptr) = Cubit_duplicate(*(IT_s._ptr));
        }
        return (*this);
    }

    operator Cubit_ptr () const {
        return _ptr ? (Cubit_ptr) (*_ptr) : Cubit_nil();
    }

    Cubit_ptr operator->() const { return *_ptr;}

    protected:
    Cubit_ptr *_ptr;
    unsigned char _release;
};

#endif


#define TIE_Cubit(X) Cubit##X

#define DEF_TIE_Cubit(X) \
        class Cubit##X : public virtual Cubit {         \
          X* m_obj;                                             \
        public:                                                 \
                                                                \
                                                                \
           Cubit##X  (X *objp, const char* m="", CORBA::LoaderClass *l=0)\
                : Cubit(), m_obj(objp) {        \
                m_pptr = new Cubit_dispatch             \
                        (( Cubit*)this,(CORBA::Object*)this,m,l,Cubit_IR,m_obj);        \
           }                                                            \
           Cubit##X  (CORBA::Object *IT_p, const char* IT_m="", void *IT_q=0)\
                : Cubit() {     \
                m_pptr = new Cubit_dispatch             \
                        (( Cubit*)this,(CORBA::Object*)this,IT_m,Cubit_IR,IT_p,IT_q);   \
                m_obj = (X*)(m_pptr->getImplObj ());                    \
           }                                                            \
                                                                \
           virtual ~Cubit##X  () {                              \
                if (_okToDeleteImpl ()) delete m_obj; }                                 \
           virtual void* _deref () {                                    \
                return m_obj; }                                 \
                                                                \
virtual CORBA::Octet cube_octet (CORBA::Octet o, CORBA::Environment &IT_env) throw (CORBA::SystemException){\
return m_obj->cube_octet (  o,IT_env);\
}\
        \
virtual CORBA::Short cube_short (CORBA::Short s, CORBA::Environment &IT_env) throw (CORBA::SystemException){\
return m_obj->cube_short (  s,IT_env);\
}\
        \
virtual CORBA::Long cube_long (CORBA::Long l, CORBA::Environment &IT_env) throw (CORBA::SystemException){\
return m_obj->cube_long (  l,IT_env);\
}\
        \
virtual Cubit::Many cube_struct (const Cubit::Many& values, CORBA::Environment &IT_env) throw (CORBA::SystemException){\
return m_obj->cube_struct (  values,IT_env);\
}\
        \
virtual Cubit::oneof cube_union (const Cubit::oneof& values, CORBA::Environment &IT_env) throw (CORBA::SystemException){\
return m_obj->cube_union (  values,IT_env);\
}\
        \
virtual void please_exit (CORBA::Environment &IT_env) throw (CORBA::SystemException){\
m_obj->please_exit (IT_env);\
}\
                                                                \
        };                                              \


#define QUALS_Cubit     \
virtual CORBA::Octet cube_octet (CORBA::Octet o, CORBA::Environment &IT_env) throw (CORBA::SystemException){\
return m_obj->cube_octet (  o,IT_env);\
}\
        \
virtual CORBA::Short cube_short (CORBA::Short s, CORBA::Environment &IT_env) throw (CORBA::SystemException){\
return m_obj->cube_short (  s,IT_env);\
}\
        \
virtual CORBA::Long cube_long (CORBA::Long l, CORBA::Environment &IT_env) throw (CORBA::SystemException){\
return m_obj->cube_long (  l,IT_env);\
}\
        \
virtual Many cube_struct (const Many& values, CORBA::Environment &IT_env) throw (CORBA::SystemException){\
return m_obj->cube_struct (  values,IT_env);\
}\
        \
virtual oneof cube_union (const oneof& values, CORBA::Environment &IT_env) throw (CORBA::SystemException){\
return m_obj->cube_union (  values,IT_env);\
}\
        \
virtual void please_exit (CORBA::Environment &IT_env) throw (CORBA::SystemException){\
m_obj->please_exit (IT_env);\
}\




class CubitProxyFactoryClass : public virtual CORBA::ObjectFactoryClass {
public:
   CubitProxyFactoryClass (unsigned char IT_p=0)
                : CORBA::ProxyFactory (Cubit_IR, IT_p) {}

    virtual void* New (char *IT_OR, CORBA::Environment&);

    virtual void* New (ObjectReference *IT_OR, CORBA::Environment&);

    virtual void* New2 ();

    virtual CORBA::Object* NewObject (char *IT_OR, CORBA::Environment&);

    virtual CORBA::Object* NewObject (ObjectReference *IT_OR, CORBA::Environment&);

    virtual CORBA::Object* New2Object ();

    virtual void* IT_castUp (void *IT_p, char* IT_s, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ());

    virtual CORBA::PPTR* pptr (void *IT_p);

    virtual void baseInterfaces (_IDL_SEQUENCE_string&);


};

extern CubitProxyFactoryClass CubitProxyFactory;

class CubitBOAImpl : public virtual Cubit  {
public:
    CubitBOAImpl (const char *m="", CORBA::LoaderClass *l=NULL) {
  if (CORBA::PPTR::isOK (m_pptr, Cubit_IR))
    m_pptr = new Cubit_dispatch ( (Cubit*)this,
         (CORBA::Object*)this, m, l, Cubit_IR, this);
}

        virtual CORBA::Octet cube_octet (CORBA::Octet o, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException) =0;
        virtual CORBA::Short cube_short (CORBA::Short s, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException) =0;
        virtual CORBA::Long cube_long (CORBA::Long l, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException) =0;
        virtual Many cube_struct (const Many& values, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException) =0;
        virtual oneof cube_union (const oneof& values, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException) =0;
        virtual void please_exit (CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException) =0;
};


#endif


#ifndef _Cubit_Factory_defined
#define _Cubit_Factory_defined
class Cubit_Factory_dispatch : public virtual CORBA::PPTR {
public:

      Cubit_Factory_dispatch (void *IT_p, CORBA::Object* IT_o, const char *IT_m,
        CORBA::LoaderClass *IT_l, char *IT_i, void* IT_im)
       : PPTR (IT_p,IT_o,IT_m,IT_l,IT_i,IT_im) {}


   Cubit_Factory_dispatch (char *IT_OR, void *IT_p, CORBA::Object *IT_o)
       : PPTR (IT_OR,IT_p,IT_o) {}


   Cubit_Factory_dispatch () {}

   Cubit_Factory_dispatch (ObjectReference *IT_OR, void *IT_p, CORBA::Object *IT_o)
       : PPTR (IT_OR,IT_p,IT_o) {}


   Cubit_Factory_dispatch (void *IT_p, CORBA::Object *IT_o, const char *IT_m,
        char *IT_i, CORBA::Object* IT_ob, void* IT_im)
       : PPTR (IT_p,IT_o,IT_m,IT_i,IT_ob,IT_im) {}


   virtual unsigned char dispatch (CORBA::Request &IT_r,
        unsigned char IT_isTarget, void* IT_pp=NULL);


};

class Cubit_Factory;

#ifndef Cubit_FactoryPtr
#define Cubit_FactoryPtr

typedef Cubit_Factory* Cubit_Factory_ptr;

typedef Cubit_Factory* Cubit_FactoryRef;

#endif


#ifndef Cubit_FactoryForwH
#define Cubit_FactoryForwH
CORBA::ObjectRef Cubit_Factory_getBase (void *);
void Cubit_Factory_release (Cubit_Factory *, CORBA::Environment &IT_env);
void Cubit_Factory_release (Cubit_Factory_ptr);
Cubit_Factory* Cubit_Factory_duplicate (Cubit_Factory_ptr, CORBA::Environment &IT_env);
Cubit_Factory* Cubit_Factory_duplicate (Cubit_Factory_ptr );
Cubit_Factory_ptr Cubit_Factory_nil (CORBA::Environment &IT_env);
Cubit_Factory_ptr Cubit_Factory_nil ();
#endif
#define Cubit_Factory_IMPL "Cubit_Factory"


class Cubit_Factory;

typedef Cubit_Factory Cubit_FactoryProxy;
#define Cubit_Factory_IR "Cubit_Factory"
#define Cubit_Factory_IMPL "Cubit_Factory"

#ifndef Cubit_FactoryPtr
#define Cubit_FactoryPtr

typedef Cubit_Factory* Cubit_Factory_ptr;

typedef Cubit_Factory* Cubit_FactoryRef;

#endif

class Cubit_Factory: public virtual CORBA::Object  {
public:
        Cubit_Factory (char *IT_OR);
    Cubit_Factory (ObjectReference *IT_OR);
    Cubit_Factory () : CORBA::Object  (1) {}
protected:
    Cubit_Factory_ptr __duplicate(
            CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) {
       CORBA::Object::__duplicate (IT_env);
       return this;
    }
public:
    static Cubit_Factory_ptr _duplicate(
            Cubit_Factory_ptr,
            CORBA::Environment &IT_pEnv=CORBA::IT_chooseDefaultEnv ());
public:
   static Cubit_Factory* _bind (const char* IT_markerServer, const char* host,
                const CORBA::Context &IT_c,
                CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ());
   static Cubit_Factory* _bind (CORBA::Environment &IT_env);
   static Cubit_Factory* _bind (const char* IT_markerServer=NULL, const char* host=NULL,
                 CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ());
    static Cubit_Factory* _narrow (CORBA::Object* , CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ());
    static Cubit_Factory_ptr _nil (CORBA::Environment &IT_pEnv=CORBA::IT_chooseDefaultEnv ()) {
        CORBA::EnvExcRaiser IT_raise;
        CORBA::Environment &IT_env = IT_raise.registerEnv (&IT_pEnv);
        return (Cubit_Factory_ptr) CORBA::OBJECT_NIL;}
        virtual Cubit_ptr create_cubit (const char * name, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException);
};

#ifndef Cubit_FactoryVarH
#define Cubit_FactoryVarH

#ifndef Cubit_FactoryvPtr
#define Cubit_FactoryvPtr
typedef Cubit_Factory* Cubit_Factory_vPtr;
typedef const Cubit_Factory* Cubit_Factory_cvPtr;
#endif

class Cubit_Factory_var : public CORBA::_var
{
    private:

    unsigned char copyHelper (const Cubit_Factory_var &IT_s) {
        {
            _ptr = Cubit_Factory_duplicate (IT_s._ptr);
        }
        return 1;
    }

    public:

    Cubit_Factory_var (const Cubit_Factory_var &IT_s) {
        (void) copyHelper (IT_s);
    }

    Cubit_Factory_var () {
        _ptr = Cubit_Factory_nil ();
    }

    Cubit_Factory_var (Cubit_Factory *IT_p) {
        _ptr = IT_p;
    }

    Cubit_Factory_var &operator= (Cubit_Factory *IT_p) {
        Cubit_Factory_release (_ptr);
        _ptr = IT_p;
        return (*this);
    }

    Cubit_Factory_var &operator= (const Cubit_Factory_var &IT_s) {
        Cubit_Factory_release (_ptr);
        _ptr = Cubit_Factory_duplicate (IT_s._ptr);
        return (*this);
    }

    ~Cubit_Factory_var () {
        Cubit_Factory_release (_ptr);
    }

    Cubit_Factory* operator-> () {
        return _ptr;
    }

    operator Cubit_Factory_cvPtr () const { return _ptr;}
    operator Cubit_Factory_vPtr& () { return _ptr;}

    protected:
    Cubit_Factory *_ptr;
    private:
    Cubit_Factory_var &operator= (const CORBA::_var &IT_s);
    Cubit_Factory_var (const CORBA::_var &IT_s);
    Cubit_Factory_var &operator= (const CORBA::_mgr &IT_s);
    Cubit_Factory_var &operator= (const CORBA::_SeqElem &IT_s);
    Cubit_Factory_var (const CORBA::_mgr &IT_s);
    Cubit_Factory_var (const CORBA::_SeqElem &IT_s);
};

#endif


#ifndef Cubit_FactoryMgrH
#define Cubit_FactoryMgrH

class Cubit_Factory_mgr : public CORBA::_mgr
{
    public:

    Cubit_Factory_mgr () {
        _ptr = Cubit_Factory_nil ();
        _release = 1;
    }

    Cubit_Factory_mgr (const Cubit_Factory_mgr &IT_s) {
        _ptr = Cubit_Factory_duplicate (IT_s._ptr);
        _release = 1;
    }

    Cubit_Factory_mgr &operator= (Cubit_Factory *IT_p) {
        if (_ptr && _release)
            Cubit_Factory_release (_ptr);
        _ptr = IT_p;
        _release = 1;
        return (*this);
    }

    Cubit_Factory_mgr &operator= (const Cubit_Factory_mgr &IT_s) {
        if (_ptr && _release)
            Cubit_Factory_release (_ptr);
        _ptr = Cubit_Factory_duplicate(IT_s._ptr);
        _release = 1;
        return (*this);
    }

    Cubit_Factory_mgr &operator= (Cubit_Factory_var &IT_s) {
        if (_ptr && _release)
            Cubit_Factory_release (_ptr);
        _ptr = Cubit_Factory_duplicate(IT_s);
        _release = 1;
        return (*this);
    }

    ~Cubit_Factory_mgr () {
        if (_release)
            Cubit_Factory_release (_ptr);
    }

    unsigned char release () {
        return _release;
    }

    void release (unsigned char rel) {
        _release = rel;
    }

    operator int () const {
        return (((CORBA::Object_ptr) _ptr) ? 1 : 0);
    }

    operator void* () const {
        return _ptr;
    }

    operator CORBA::Object * () const {
        return (CORBA::Object *) _ptr;
    }

    operator Cubit_Factory* () const {
        return (Cubit_Factory*) _ptr;
    }

    Cubit_Factory_ptr operator-> () const {
        return _ptr;
    }

    Cubit_Factory *_ptr;

    protected:

    unsigned char _release;
};

typedef Cubit_Factory_mgr Cubit_Factory_mgr_IT_const;
#endif

#ifndef Cubit_FactorySeqElemH
#define Cubit_FactorySeqElemH

class Cubit_Factory_SeqElem : public CORBA::_SeqElem
{
    public:

    Cubit_Factory_SeqElem (Cubit_Factory_ptr* IT_p, unsigned char rel) {
        _ptr = IT_p;
        _release = rel;
    }

    Cubit_Factory_SeqElem &operator= (Cubit_Factory_ptr IT_p) {
        if (_ptr) {
            if (*(_ptr) && _release)
                Cubit_Factory_release (*(_ptr));
            *(_ptr) = IT_p;
        }
        return (*this);
    }

    Cubit_Factory_SeqElem &operator= (const Cubit_Factory_SeqElem &IT_s) {
        if (_ptr && IT_s._ptr) {
            if (*(_ptr) && _release)
                Cubit_Factory_release (*(_ptr));
            *(_ptr) = Cubit_Factory_duplicate(*(IT_s._ptr));
        }
        return (*this);
    }

    operator Cubit_Factory_ptr () const {
        return _ptr ? (Cubit_Factory_ptr) (*_ptr) : Cubit_Factory_nil();
    }

    Cubit_Factory_ptr operator->() const { return *_ptr;}

    protected:
    Cubit_Factory_ptr *_ptr;
    unsigned char _release;
};

#endif


#define TIE_Cubit_Factory(X) Cubit_Factory##X

#define DEF_TIE_Cubit_Factory(X) \
        class Cubit_Factory##X : public virtual Cubit_Factory {         \
          X* m_obj;                                             \
        public:                                                 \
                                                                \
                                                                \
           Cubit_Factory##X  (X *objp, const char* m="", CORBA::LoaderClass *l=0)\
                : Cubit_Factory(), m_obj(objp) {        \
                m_pptr = new Cubit_Factory_dispatch             \
                        (( Cubit_Factory*)this,(CORBA::Object*)this,m,l,Cubit_Factory_IR,m_obj);        \
           }                                                            \
           Cubit_Factory##X  (CORBA::Object *IT_p, const char* IT_m="", void *IT_q=0)\
                : Cubit_Factory() {     \
                m_pptr = new Cubit_Factory_dispatch             \
                        (( Cubit_Factory*)this,(CORBA::Object*)this,IT_m,Cubit_Factory_IR,IT_p,IT_q);   \
                m_obj = (X*)(m_pptr->getImplObj ());                    \
           }                                                            \
                                                                \
           virtual ~Cubit_Factory##X  () {                              \
                if (_okToDeleteImpl ()) delete m_obj; }                                 \
           virtual void* _deref () {                                    \
                return m_obj; }                                 \
                                                                \
virtual Cubit_ptr create_cubit (const char * name, CORBA::Environment &IT_env) throw (CORBA::SystemException){\
return m_obj->create_cubit (  name,IT_env);\
}\
                                                                \
        };                                              \


#define QUALS_Cubit_Factory     \
virtual Cubit_ptr create_cubit (const char * name, CORBA::Environment &IT_env) throw (CORBA::SystemException){\
return m_obj->create_cubit (  name,IT_env);\
}\




class Cubit_FactoryProxyFactoryClass : public virtual CORBA::ObjectFactoryClass {
public:
   Cubit_FactoryProxyFactoryClass (unsigned char IT_p=0)
                : CORBA::ProxyFactory (Cubit_Factory_IR, IT_p) {}

    virtual void* New (char *IT_OR, CORBA::Environment&);

    virtual void* New (ObjectReference *IT_OR, CORBA::Environment&);

    virtual void* New2 ();

    virtual CORBA::Object* NewObject (char *IT_OR, CORBA::Environment&);

    virtual CORBA::Object* NewObject (ObjectReference *IT_OR, CORBA::Environment&);

    virtual CORBA::Object* New2Object ();

    virtual void* IT_castUp (void *IT_p, char* IT_s, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ());

    virtual CORBA::PPTR* pptr (void *IT_p);

    virtual void baseInterfaces (_IDL_SEQUENCE_string&);


};

extern Cubit_FactoryProxyFactoryClass Cubit_FactoryProxyFactory;

class Cubit_FactoryBOAImpl : public virtual Cubit_Factory  {
public:
    Cubit_FactoryBOAImpl (const char *m="", CORBA::LoaderClass *l=NULL) {
  if (CORBA::PPTR::isOK (m_pptr, Cubit_Factory_IR))
    m_pptr = new Cubit_Factory_dispatch ( (Cubit_Factory*)this,
         (CORBA::Object*)this, m, l, Cubit_Factory_IR, this);
}

        virtual Cubit_ptr create_cubit (const char * name, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException) =0;
};


#endif


#endif