summaryrefslogtreecommitdiff
path: root/performance-tests/TTCP/Orbix/ttcp.hh
blob: ff24bfe58ec780c1e72b26d1d311d9ecbf8b5957 (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

#ifndef ttcp_hh
#define ttcp_hh

#include <CORBA.h>

#include <string.h>


#ifndef _IDL_SEQUENCE_char_defined
#define _IDL_SEQUENCE_char_defined

struct IONANC__IDL_SEQUENCE_char;
struct _IDL_SEQUENCE_char {
    unsigned long _maximum;
    unsigned long _length;
    char *_buffer;

    operator IONANC__IDL_SEQUENCE_char();
    operator const IONANC__IDL_SEQUENCE_char() const;
    _IDL_SEQUENCE_char& operator= (const IONANC__IDL_SEQUENCE_char&);

    _IDL_SEQUENCE_char& operator= (const _IDL_SEQUENCE_char&);
    _IDL_SEQUENCE_char (const _IDL_SEQUENCE_char&);

    _IDL_SEQUENCE_char (unsigned long IT_size = 0);

    ~_IDL_SEQUENCE_char () { if (_buffer) delete [] _buffer; }

    char& operator [] (unsigned long IT_i) const {return  _buffer[IT_i]; }

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

struct IONANC__IDL_SEQUENCE_char {
    unsigned long _maximum;
    unsigned long _length;
    char *_buffer;

    char& operator [] (unsigned long IT_i) const;

    operator _IDL_SEQUENCE_char ();

    operator const _IDL_SEQUENCE_char () const;

};



#endif


#ifndef _ttcp_sequence_defined
#define _ttcp_sequence_defined
class ttcp_sequence_dispatch : public virtual CORBA::PPTR {
public:

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


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


   ttcp_sequence_dispatch () {}

   ttcp_sequence_dispatch (void *IT_p, CORBA::Object *IT_o, const char *IT_m, 
        char *IT_i, CORBA::Object* IT_ob, void* IT_im)
       : CORBA::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 ttcp_sequence;


#ifndef ttcp_sequenceForwH
#define ttcp_sequenceForwH
CORBA::ObjectRef ttcp_sequence_getBase (void *);
void ttcp_sequence_release (void *, CORBA::Environment &IT_env=CORBA::default_environment);
ttcp_sequence* ttcp_sequence_duplicate (void *, CORBA::Environment &IT_env=CORBA::default_environment);
#endif
#define ttcp_sequence_IMPL "ttcp_sequence"


class ttcp_sequence;
#define ttcp_sequence_IR "ttcp_sequence"
#define ttcp_sequence_IMPL "ttcp_sequence"

typedef ttcp_sequence* ttcp_sequenceRef;
typedef ttcp_sequence* ttcp_sequence_ptr;
class ttcp_sequence: public virtual CORBA::Object {
public:
    ttcp_sequence (char *IT_OR);
    ttcp_sequence () : CORBA::Object (1) {}
    ttcp_sequence* _duplicate(
            CORBA::Environment &IT_env=CORBA::default_environment) {
       CORBA::Object::_duplicate (IT_env); return this; }
   static ttcp_sequence* _bind (const char* IT_markerServer, const char* host,
		const CORBA::Context &IT_c, 
		CORBA::Environment &IT_env=CORBA::default_environment);
   static ttcp_sequence* _bind (CORBA::Environment &IT_env);
   static ttcp_sequence* _bind (const char* IT_markerServer=NULL, const char* host=NULL,
                 CORBA::Environment &IT_env=CORBA::default_environment);
    static ttcp_sequence* _narrow (CORBA::Object* , CORBA::Environment &IT_env=CORBA::default_environment);
typedef _IDL_SEQUENCE_char my_sequence;
    	virtual long send (const ttcp_sequence::my_sequence& ttcp_seq, CORBA::Environment &IT_env=CORBA::default_environment);
    	virtual void start_timer (CORBA::Environment &IT_env=CORBA::default_environment);
    	virtual void stop_timer (CORBA::Environment &IT_env=CORBA::default_environment);
};


#define TIE_ttcp_sequence(X) ttcp_sequence##X

#define DEF_TIE_ttcp_sequence(X) \
	class ttcp_sequence##X : public virtual ttcp_sequence {		\
	  X* m_obj;						\
	public:							\
								\
	   ttcp_sequence##X  (X *objp, const char* m="", CORBA::LoaderClass *l=nil)\
		: ttcp_sequence(), CORBA::Object (), m_obj(objp) {	\
		m_pptr = new ttcp_sequence_dispatch		\
			(( ttcp_sequence*)this,(CORBA::Object*)this,m,l,ttcp_sequence_IR,m_obj);	\
	   }								\
	   ttcp_sequence##X  (CORBA::Object *IT_p, const char* IT_m="", void *IT_q=nil)\
		: ttcp_sequence(), CORBA::Object () {	\
		m_pptr = new ttcp_sequence_dispatch		\
			(( ttcp_sequence*)this,(CORBA::Object*)this,IT_m,ttcp_sequence_IR,IT_p,IT_q);	\
		m_obj = (X*)(m_pptr->getImplObj ());			\
	   }								\
								\
	   virtual ~ttcp_sequence##X  () {				\
		if (_okToDeleteImpl ()) delete m_obj; }					\
								\
	   virtual void* _deref () {					\
		return m_obj; }					\
								\
	virtual long send (const ttcp_sequence::my_sequence& ttcp_seq, CORBA::Environment &IT_env) {\
return m_obj->send ( ttcp_seq,IT_env);\
}\
	\
	virtual void start_timer (CORBA::Environment &IT_env) {\
m_obj->start_timer (IT_env);\
}\
	\
	virtual void stop_timer (CORBA::Environment &IT_env) {\
m_obj->stop_timer (IT_env);\
}\
								\
	};


#define QUALS_ttcp_sequence	\
	virtual long send (const ttcp_sequence::my_sequence& ttcp_seq, CORBA::Environment &IT_env) {\
return m_obj->send ( ttcp_seq,IT_env);\
}\
	\
	virtual void start_timer (CORBA::Environment &IT_env) {\
m_obj->start_timer (IT_env);\
}\
	\
	virtual void stop_timer (CORBA::Environment &IT_env) {\
m_obj->stop_timer (IT_env);\
}\




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

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

    virtual void* New2 (); 

    virtual void* IT_castUp (void *IT_p, char* IT_s);

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

    virtual void baseInterfaces (_IDL_SEQUENCE_string&);


};

extern ttcp_sequenceProxyFactoryClass ttcp_sequenceProxyFactory;



class ttcp_sequenceBOAImpl : public virtual ttcp_sequence {
public:
    ttcp_sequenceBOAImpl (const char *m="", CORBA::LoaderClass *l=NULL) {
  if (CORBA::PPTR::isOK (m_pptr, ttcp_sequence_IR))
    m_pptr = new ttcp_sequence_dispatch ( (ttcp_sequence*)this,
   	 (CORBA::Object*)this, m, l, ttcp_sequence_IR, this);
}

    	virtual long send (const ttcp_sequence::my_sequence& ttcp_seq, CORBA::Environment &IT_env=CORBA::default_environment) =0;
    	virtual void start_timer (CORBA::Environment &IT_env=CORBA::default_environment) =0;
    	virtual void stop_timer (CORBA::Environment &IT_env=CORBA::default_environment) =0;
};


#endif


#ifndef _ttcp_string_defined
#define _ttcp_string_defined
class ttcp_string_dispatch : public virtual CORBA::PPTR {
public:

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


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


   ttcp_string_dispatch () {}

   ttcp_string_dispatch (void *IT_p, CORBA::Object *IT_o, const char *IT_m, 
        char *IT_i, CORBA::Object* IT_ob, void* IT_im)
       : CORBA::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 ttcp_string;


#ifndef ttcp_stringForwH
#define ttcp_stringForwH
CORBA::ObjectRef ttcp_string_getBase (void *);
void ttcp_string_release (void *, CORBA::Environment &IT_env=CORBA::default_environment);
ttcp_string* ttcp_string_duplicate (void *, CORBA::Environment &IT_env=CORBA::default_environment);
#endif
#define ttcp_string_IMPL "ttcp_string"


class ttcp_string;
#define ttcp_string_IR "ttcp_string"
#define ttcp_string_IMPL "ttcp_string"

typedef ttcp_string* ttcp_stringRef;
typedef ttcp_string* ttcp_string_ptr;
class ttcp_string: public virtual CORBA::Object {
public:
    ttcp_string (char *IT_OR);
    ttcp_string () : CORBA::Object (1) {}
    ttcp_string* _duplicate(
            CORBA::Environment &IT_env=CORBA::default_environment) {
       CORBA::Object::_duplicate (IT_env); return this; }
   static ttcp_string* _bind (const char* IT_markerServer, const char* host,
		const CORBA::Context &IT_c, 
		CORBA::Environment &IT_env=CORBA::default_environment);
   static ttcp_string* _bind (CORBA::Environment &IT_env);
   static ttcp_string* _bind (const char* IT_markerServer=NULL, const char* host=NULL,
                 CORBA::Environment &IT_env=CORBA::default_environment);
    static ttcp_string* _narrow (CORBA::Object* , CORBA::Environment &IT_env=CORBA::default_environment);
    	virtual long send (const char * ttcp_str, CORBA::Environment &IT_env=CORBA::default_environment);
    	virtual void start_timer (CORBA::Environment &IT_env=CORBA::default_environment);
    	virtual void stop_timer (CORBA::Environment &IT_env=CORBA::default_environment);
};


#define TIE_ttcp_string(X) ttcp_string##X

#define DEF_TIE_ttcp_string(X) \
	class ttcp_string##X : public virtual ttcp_string {		\
	  X* m_obj;						\
	public:							\
								\
	   ttcp_string##X  (X *objp, const char* m="", CORBA::LoaderClass *l=nil)\
		: ttcp_string(), CORBA::Object (), m_obj(objp) {	\
		m_pptr = new ttcp_string_dispatch		\
			(( ttcp_string*)this,(CORBA::Object*)this,m,l,ttcp_string_IR,m_obj);	\
	   }								\
	   ttcp_string##X  (CORBA::Object *IT_p, const char* IT_m="", void *IT_q=nil)\
		: ttcp_string(), CORBA::Object () {	\
		m_pptr = new ttcp_string_dispatch		\
			(( ttcp_string*)this,(CORBA::Object*)this,IT_m,ttcp_string_IR,IT_p,IT_q);	\
		m_obj = (X*)(m_pptr->getImplObj ());			\
	   }								\
								\
	   virtual ~ttcp_string##X  () {				\
		if (_okToDeleteImpl ()) delete m_obj; }					\
								\
	   virtual void* _deref () {					\
		return m_obj; }					\
								\
	virtual long send (const char * ttcp_str, CORBA::Environment &IT_env) {\
return m_obj->send ( ttcp_str,IT_env);\
}\
	\
	virtual void start_timer (CORBA::Environment &IT_env) {\
m_obj->start_timer (IT_env);\
}\
	\
	virtual void stop_timer (CORBA::Environment &IT_env) {\
m_obj->stop_timer (IT_env);\
}\
								\
	};


#define QUALS_ttcp_string	\
	virtual long send (const char * ttcp_str, CORBA::Environment &IT_env) {\
return m_obj->send ( ttcp_str,IT_env);\
}\
	\
	virtual void start_timer (CORBA::Environment &IT_env) {\
m_obj->start_timer (IT_env);\
}\
	\
	virtual void stop_timer (CORBA::Environment &IT_env) {\
m_obj->stop_timer (IT_env);\
}\




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

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

    virtual void* New2 (); 

    virtual void* IT_castUp (void *IT_p, char* IT_s);

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

    virtual void baseInterfaces (_IDL_SEQUENCE_string&);


};

extern ttcp_stringProxyFactoryClass ttcp_stringProxyFactory;



class ttcp_stringBOAImpl : public virtual ttcp_string {
public:
    ttcp_stringBOAImpl (const char *m="", CORBA::LoaderClass *l=NULL) {
  if (CORBA::PPTR::isOK (m_pptr, ttcp_string_IR))
    m_pptr = new ttcp_string_dispatch ( (ttcp_string*)this,
   	 (CORBA::Object*)this, m, l, ttcp_string_IR, this);
}

    	virtual long send (const char * ttcp_str, CORBA::Environment &IT_env=CORBA::default_environment) =0;
    	virtual void start_timer (CORBA::Environment &IT_env=CORBA::default_environment) =0;
    	virtual void stop_timer (CORBA::Environment &IT_env=CORBA::default_environment) =0;
};


#endif


#endif