summaryrefslogtreecommitdiff
path: root/TAO/Benchmark/benchmark/marshal_options.i
blob: cb3506aa35fe4565aeda76cb7d378d2c1f06459c (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
// ============================================================================
//
// = LIBRARY
//    CORBA Benchmark/Marshal
// 
// = FILENAME
//    marshal_options.i
//
// = AUTHOR
//    Aniruddha Gokhale
// 
// ============================================================================

// constructor
ACE_INLINE
CORBA_Marshal_Options::CORBA_Marshal_Options (void)
  : object_name_ (0),
    data_type_ (CORBA_Marshal_Options::NO_DATATYPE),
    proxy_type_ (CORBA_Marshal_Options::NO_PROXY),
    policy_ (CORBA_Marshal_Options::NO_POLICY),
    role_ (CORBA_Marshal_Options::NO_ROLE),
    rcv_socket_queue_size_ (-1),
    snd_socket_queue_size_ (-1),
    disable_nagle_ (0),
    debug_ (0),
    hostname_ (0),
    port_ (-1),
    iterations_ (0)
{
}

    
// destructor
ACE_INLINE
CORBA_Marshal_Options::~CORBA_Marshal_Options (void)
{
}

// set the data type to be transferred
ACE_INLINE void
CORBA_Marshal_Options::data_type (CORBA_Marshal_Options::DATATYPE dt)
{
  data_type_ = dt;
}

// get the data type to be transferred
ACE_INLINE CORBA_Marshal_Options::DATATYPE
CORBA_Marshal_Options::data_type (void)
{
  return data_type_;
}

// set the proxy type to be transferred
ACE_INLINE void
CORBA_Marshal_Options::proxy_type (CORBA_Marshal_Options::PROXY_TYPE pt)
{
  proxy_type_ = pt;
}

// get the data type to be transferred
ACE_INLINE CORBA_Marshal_Options::PROXY_TYPE
CORBA_Marshal_Options::proxy_type (void)
{
  return proxy_type_;
}

// set the policy type to be transferred
ACE_INLINE void
CORBA_Marshal_Options::policy (CORBA_Marshal_Options::POLICY inv)
{
  policy_ = inv;
}

// get the policy type to be transferred
ACE_INLINE CORBA_Marshal_Options::POLICY
CORBA_Marshal_Options::policy (void)
{
  return policy_;
}

// set the role type to be transferred
ACE_INLINE void
CORBA_Marshal_Options::role (CORBA_Marshal_Options::ROLE my_role)
{
  role_ = my_role;
}

// get the role type to be transferred
ACE_INLINE CORBA_Marshal_Options::ROLE
CORBA_Marshal_Options::role (void)
{
  return role_;
}

// set the hostname
ACE_INLINE void
CORBA_Marshal_Options::hostname (const char *hname)
{
  hostname_ = hname;
}

// get the hostname
ACE_INLINE const char*
CORBA_Marshal_Options::hostname (void)
{
  return hostname_;
}

// set the post
ACE_INLINE void
CORBA_Marshal_Options::port (short portnum)
{
  port_ = portnum;
}

// get the port
ACE_INLINE short
CORBA_Marshal_Options::port (void)
{
  return port_;
}

// set the object name
ACE_INLINE void
CORBA_Marshal_Options::object_name (const char *objname)
{
  object_name_ = objname;
}

// get the object name
ACE_INLINE const char *
CORBA_Marshal_Options::object_name (void)
{
  return object_name_;
}

// set the service name
ACE_INLINE void
CORBA_Marshal_Options::service_name (const char *srvname)
{
  service_name_ = srvname;
}

// get the service name
ACE_INLINE const char *
CORBA_Marshal_Options::service_name (void)
{
  return service_name_;
}

// set the receive sock size
ACE_INLINE void
CORBA_Marshal_Options::rcv_socket_queue_size (int socksize)
{
  rcv_socket_queue_size_ = socksize;
}

// get the receive sock size
ACE_INLINE int
CORBA_Marshal_Options::rcv_socket_queue_size (void)
{
  return rcv_socket_queue_size_;
}

// set the sender sock size
ACE_INLINE void
CORBA_Marshal_Options::snd_socket_queue_size (int socksize)
{
  snd_socket_queue_size_ = socksize;
}

// get the snd sock size
ACE_INLINE int
CORBA_Marshal_Options::snd_socket_queue_size (void)
{
  return snd_socket_queue_size_;
}

// set whether Nagle algo is to be disabled
ACE_INLINE void
CORBA_Marshal_Options::disable_nagle (unsigned short val)
{
  disable_nagle_ = (val ? 1 : 0);
}

// get whether Nagle algo is disabled
ACE_INLINE unsigned short
CORBA_Marshal_Options::disable_nagle (void)
{
  return disable_nagle_;
}

// set whether debug is to be disabled
ACE_INLINE void
CORBA_Marshal_Options::debug (unsigned short val)
{
  debug_ = (val ? 1 : 0);
}

// get whether debug is disabled
ACE_INLINE unsigned short
CORBA_Marshal_Options::debug (void)
{
  return debug_;
}

// set the filename
ACE_INLINE void
CORBA_Marshal_Options::filename (const char *fname)
{
  filename_ = fname;
}

// get the filename
ACE_INLINE const char*
CORBA_Marshal_Options::filename (void)
{
  return filename_;
}

// set the iterations
ACE_INLINE void
CORBA_Marshal_Options::iterations (int iter)
{
  iterations_ = iter;
}

// get the iterations
ACE_INLINE int
CORBA_Marshal_Options::iterations (void)
{
  return iterations_;
}