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
|
// $Id$
// ============================================================================
//
// = LIBRARY
// CORBA Marshal Visibroker Benchmark
//
// = FILENAME
// visi_marshal_client.h
//
// = AUTHOR
// Aniruddha Gokhale
//
// ============================================================================
#ifndef _VISI_MARSHAL_CLIENT_H_
#define _VISI_MARSHAL_CLIENT_H_
// benchmark library includes
#include "benchmark/marshal_options.h"
#include "benchmark/marshal_results.h"
#include "benchmark/marshal_proxy.h"
// include VisiBroker specific include files
#include "marshalC.h" // generated by IDL compiler
#include "pmcext.h" // VisiBroker extensions
#if 0
// Define an event handler specific to this class
class marshal_event_handler: public PMC_EXT::ClientEventHandler
{
// =TITLE
// marshal_event_handler
// =DESCRIPTION
// event handler. Specifically, we use this to set socket buffer and no delay
// flags
public:
void bind_succeeded(CORBA::Object_ptr obj,
const PMC_EXT::ConnectionInfo &);
// on success from a bind call, set the desired quantities
};
#endif
class Visi_Marshal_Client_Proxy : public CORBA_Marshal_Proxy
{
// =TITLE
// Visi_Marshal_Client_Proxy
// =DESCRIPTION
// VisiBroker client size specialization of the CORBA Marshal proxy class
public:
Visi_Marshal_Client_Proxy (void);
// constructor
~Visi_Marshal_Client_Proxy (void);
// destructor
virtual int run (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
// do the actual work
virtual int use_sii (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
// use the static invocation interface
virtual int use_dii (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
// use the dynamic invocation interface
private:
// =helper functions
int sii_test_short (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int sii_test_long (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int sii_test_octet (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int sii_test_char (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int sii_test_double (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int sii_test_struct (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int sii_test_union (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int sii_test_any (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int sii_test_sequence (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int sii_test_recursive (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
// all the DII helpers
int dii_test_short (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int dii_test_long (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int dii_test_octet (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int dii_test_char (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int dii_test_double (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int dii_test_struct (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int dii_test_union (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int dii_test_any (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int dii_test_sequence (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
int dii_test_recursive (CORBA_Marshal_Proxy::OPTIONS &options,
CORBA_Marshal_Proxy::RESULTS &results);
CORBA::ORB_ptr orb_;
// handle to the underlying orb
Marshal_ptr ref_;
// the object reference
};
#if defined (__ACE_INLINE__)
#include "visi_marshal_client.i"
#endif /* __ACE_INLINE__ */
#endif
|