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
|
// $Id$
#include "tao/DiffServPolicy/Server_Network_Priority_Policy.h"
#include "tao/SystemException.h"
#include "tao/ORB_Constants.h"
#include "tao/CDR.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO_Server_Network_Priority_Policy::TAO_Server_Network_Priority_Policy (void)
: ::CORBA::Object ()
, ::CORBA::Policy ()
, TAO::NetworkPriorityPolicy ()
, ::CORBA::LocalObject ()
, request_diffserv_codepoint_ (0)
, reply_diffserv_codepoint_ (0)
, network_priority_model_ (TAO::NO_NETWORK_PRIORITY)
{
}
TAO_Server_Network_Priority_Policy::~TAO_Server_Network_Priority_Policy (void)
{
}
TAO_Server_Network_Priority_Policy::TAO_Server_Network_Priority_Policy (
const TAO::DiffservCodepoint &request_diffserv_codepoint,
const TAO::DiffservCodepoint &reply_diffserv_codepoint,
TAO::NetworkPriorityModel &network_priority_model)
: ::CORBA::Object ()
, ::CORBA::Policy ()
, TAO::NetworkPriorityPolicy ()
, ::CORBA::LocalObject ()
, request_diffserv_codepoint_ (request_diffserv_codepoint)
, reply_diffserv_codepoint_ (reply_diffserv_codepoint)
, network_priority_model_ (network_priority_model)
{
}
TAO_Server_Network_Priority_Policy::TAO_Server_Network_Priority_Policy (
const TAO_Server_Network_Priority_Policy &rhs)
: ::CORBA::Object ()
, ::CORBA::Policy ()
, TAO::NetworkPriorityPolicy ()
, ::CORBA::LocalObject ()
, request_diffserv_codepoint_ (rhs.request_diffserv_codepoint_)
, reply_diffserv_codepoint_ (rhs.reply_diffserv_codepoint_)
, network_priority_model_ (rhs.network_priority_model_)
{
}
CORBA::Policy_ptr
TAO_Server_Network_Priority_Policy::create (const CORBA::Any &)
{
CORBA::Policy_ptr policy = CORBA::Policy::_nil ();
ACE_NEW_THROW_EX (policy,
TAO_Server_Network_Priority_Policy (),
CORBA::NO_MEMORY (TAO::VMCID,
CORBA::COMPLETED_NO));
return policy;
}
CORBA::PolicyType
TAO_Server_Network_Priority_Policy::policy_type (void)
{
return TAO::NETWORK_PRIORITY_TYPE;
}
TAO_Server_Network_Priority_Policy *
TAO_Server_Network_Priority_Policy::clone (void) const
{
TAO_Server_Network_Priority_Policy *copy = 0;
ACE_NEW_RETURN (copy,
TAO_Server_Network_Priority_Policy (*this),
0);
return copy;
}
TAO::DiffservCodepoint
TAO_Server_Network_Priority_Policy::request_diffserv_codepoint (void)
{
return this->request_diffserv_codepoint_;
}
void
TAO_Server_Network_Priority_Policy::request_diffserv_codepoint (
TAO::DiffservCodepoint req_dscp)
{
this->request_diffserv_codepoint_ = req_dscp;
}
TAO::DiffservCodepoint
TAO_Server_Network_Priority_Policy::reply_diffserv_codepoint (void)
{
return this->reply_diffserv_codepoint_;
}
void
TAO_Server_Network_Priority_Policy::reply_diffserv_codepoint (
TAO::DiffservCodepoint reply_dscp)
{
this->reply_diffserv_codepoint_ = reply_dscp;
}
TAO::NetworkPriorityModel
TAO_Server_Network_Priority_Policy::network_priority_model (void)
{
return this->network_priority_model_;
}
void
TAO_Server_Network_Priority_Policy::network_priority_model (
TAO::NetworkPriorityModel npm)
{
this->network_priority_model_ = npm;
}
CORBA::Policy_ptr
TAO_Server_Network_Priority_Policy::copy (void)
{
TAO_Server_Network_Priority_Policy* servant = 0;
ACE_NEW_THROW_EX (servant,
TAO_Server_Network_Priority_Policy (*this),
CORBA::NO_MEMORY ());
return servant;
}
void
TAO_Server_Network_Priority_Policy::destroy (void)
{
}
TAO_Cached_Policy_Type
TAO_Server_Network_Priority_Policy::_tao_cached_type (void) const
{
return TAO_CACHED_POLICY_NETWORK_PRIORITY;
}
TAO_Policy_Scope
TAO_Server_Network_Priority_Policy::_tao_scope (void) const
{
return static_cast<TAO_Policy_Scope> (TAO_POLICY_DEFAULT_SCOPE |
TAO_POLICY_CLIENT_EXPOSED);
}
CORBA::Boolean
TAO_Server_Network_Priority_Policy::_tao_encode (TAO_OutputCDR &out_cdr)
{
return ((out_cdr << request_diffserv_codepoint_) &&
(out_cdr << reply_diffserv_codepoint_) &&
(out_cdr << network_priority_model_));
}
CORBA::Boolean
TAO_Server_Network_Priority_Policy::_tao_decode (TAO_InputCDR &in_cdr)
{
return ((in_cdr >> request_diffserv_codepoint_) &&
(in_cdr >> reply_diffserv_codepoint_) &&
(in_cdr >> network_priority_model_));
}
TAO_END_VERSIONED_NAMESPACE_DECL
|