summaryrefslogtreecommitdiff
path: root/TAO/tao/diffs/PolicyC.cpp.diff
blob: 5e7c4c0631f37cc2292f6e9c70199f52ece86984 (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
--- PolicyC.cpp	Fri Jul 14 06:06:05 2000
+++ PolicyC.cpp.mod	Fri Jul 14 06:02:43 2000
@@ -7,52 +7,40 @@
 // Information about TAO is available at:
 //                 http://www.cs.wustl.edu/~schmidt/TAO.html
 
-#include "PolicyC.h"
+#include "tao/PolicyC.h"
+#include "tao/Stub.h"
+#include "tao/Invocation.h"
+#include "tao/NVList.h"
 
 #if !defined (__ACE_INLINE__)
-#include "PolicyC.i"
+#include "tao/PolicyC.i"
 #endif /* !defined INLINE */
 
-static const CORBA::Long _oc_CORBA_PolicyErrorCode[] =
-{
-  TAO_ENCAP_BYTE_ORDER, // byte order
-  38, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x412f506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x4572726f), ACE_NTOHL (0x72436f64), ACE_NTOHL (0x653a312e), ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CORBA/PolicyErrorCode:1.0
-  16, ACE_NTOHL (0x506f6c69), ACE_NTOHL (0x63794572), ACE_NTOHL (0x726f7243), ACE_NTOHL (0x6f646500),  // name = PolicyErrorCode
-  CORBA::tk_short,
+// ****************************************************************
 
-};
-static CORBA::TypeCode _tc_TAO_tc_CORBA_PolicyErrorCode (CORBA::tk_alias, sizeof (_oc_CORBA_PolicyErrorCode), (char *) &_oc_CORBA_PolicyErrorCode, 0, sizeof (CORBA::PolicyErrorCode));
-TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
+TAO_NAMESPACE_TYPE (const CORBA::PolicyErrorCode)
 TAO_NAMESPACE_BEGIN (CORBA)
-TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_PolicyErrorCode, &_tc_TAO_tc_CORBA_PolicyErrorCode)
+TAO_NAMESPACE_DEFINE (const CORBA::PolicyErrorCode, BAD_POLICY, 0)
 TAO_NAMESPACE_END
-static const CORBA::Long _oc_CORBA_PolicyType[] =
-{
-  TAO_ENCAP_BYTE_ORDER, // byte order
-  33, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x412f506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x54797065), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CORBA/PolicyType:1.0
-  11, ACE_NTOHL (0x506f6c69), ACE_NTOHL (0x63795479), ACE_NTOHL (0x70650000),  // name = PolicyType
-  CORBA::tk_ulong,
-
-};
-static CORBA::TypeCode _tc_TAO_tc_CORBA_PolicyType (CORBA::tk_alias, sizeof (_oc_CORBA_PolicyType), (char *) &_oc_CORBA_PolicyType, 0, sizeof (CORBA::PolicyType));
-TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
+TAO_NAMESPACE_TYPE (const CORBA::PolicyErrorCode)
 TAO_NAMESPACE_BEGIN (CORBA)
-TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_PolicyType, &_tc_TAO_tc_CORBA_PolicyType)
+TAO_NAMESPACE_DEFINE (const CORBA::PolicyErrorCode, UNSUPPORTED_POLICY, 1)
 TAO_NAMESPACE_END
-static const CORBA::Long _oc_CORBA_SetOverrideType[] =
-{
-  TAO_ENCAP_BYTE_ORDER, // byte order
-  38, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x412f5365), ACE_NTOHL (0x744f7665), ACE_NTOHL (0x72726964), ACE_NTOHL (0x65547970), ACE_NTOHL (0x653a312e), ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CORBA/SetOverrideType:1.0
-  16, ACE_NTOHL (0x5365744f), ACE_NTOHL (0x76657272), ACE_NTOHL (0x69646554), ACE_NTOHL (0x79706500),  // name = SetOverrideType
-  2, // member count
-  13, ACE_NTOHL (0x5345545f), ACE_NTOHL (0x4f564552), ACE_NTOHL (0x52494445), ACE_NTOHL (0x0),  // name = SET_OVERRIDE
-  13, ACE_NTOHL (0x4144445f), ACE_NTOHL (0x4f564552), ACE_NTOHL (0x52494445), ACE_NTOHL (0x0),  // name = ADD_OVERRIDE
-};
-static CORBA::TypeCode _tc_TAO_tc_CORBA_SetOverrideType (CORBA::tk_enum, sizeof (_oc_CORBA_SetOverrideType), (char *) &_oc_CORBA_SetOverrideType, 0, sizeof (CORBA::SetOverrideType));
-TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
+TAO_NAMESPACE_TYPE (const CORBA::PolicyErrorCode)
+TAO_NAMESPACE_BEGIN (CORBA)
+TAO_NAMESPACE_DEFINE (const CORBA::PolicyErrorCode, BAD_POLICY_TYPE, 2)
+TAO_NAMESPACE_END
+TAO_NAMESPACE_TYPE (const CORBA::PolicyErrorCode)
 TAO_NAMESPACE_BEGIN (CORBA)
-TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_SetOverrideType, &_tc_TAO_tc_CORBA_SetOverrideType)
+TAO_NAMESPACE_DEFINE (const CORBA::PolicyErrorCode, BAD_POLICY_VALUE, 3)
 TAO_NAMESPACE_END
+TAO_NAMESPACE_TYPE (const CORBA::PolicyErrorCode)
+TAO_NAMESPACE_BEGIN (CORBA)
+TAO_NAMESPACE_DEFINE (const CORBA::PolicyErrorCode, UNSUPPORTED_POLICY_VALUE, 4)
+TAO_NAMESPACE_END
+
+// ****************************************************************
+
 // default constructor
 CORBA_PolicyError::CORBA_PolicyError (void)
   : CORBA_UserException (::_tc_CORBA_PolicyError)
@@ -91,7 +79,7 @@
 CORBA_PolicyError *
 CORBA_PolicyError::_downcast (CORBA::Exception *exc)
 {
-  if (!ACE_OS::strcmp ("IDL:omg.org/CORBA_PolicyError:1.0", exc->_id ())) // same type
+  if (!ACE_OS::strcmp ("IDL:omg.org/CORBA/PolicyError:1.0", exc->_id ())) // same type
     return ACE_dynamic_cast (CORBA_PolicyError *, exc);
   else
     return 0;
@@ -292,7 +280,7 @@
 CORBA_InvalidPolicies *
 CORBA_InvalidPolicies::_downcast (CORBA::Exception *exc)
 {
-  if (!ACE_OS::strcmp ("IDL:omg.org/CORBA_InvalidPolicies:1.0", exc->_id ())) // same type
+  if (!ACE_OS::strcmp ("IDL:omg.org/CORBA/InvalidPolicies:1.0", exc->_id ())) // same type
     return ACE_dynamic_cast (CORBA_InvalidPolicies *, exc);
   else
     return 0;
@@ -382,7 +370,7 @@
     return CORBA_Policy::_nil ();
   if (! obj->_is_local ())
     {
-      CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CORBA_Policy:1.0", ACE_TRY_ENV);
+      CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CORBA/Policy:1.0", ACE_TRY_ENV);
       ACE_CHECK_RETURN (CORBA_Policy::_nil ());
       if (is_a == 0)
         return CORBA_Policy::_nil ();
@@ -409,12 +397,8 @@
           default_proxy = _TAO_collocation_CORBA_Policy_Stub_Factory_function_pointer (obj);
         }
       if (CORBA::is_nil (default_proxy))
-        ACE_NEW_RETURN (default_proxy, ::CORBA_Policy (stub), CORBA_Policy::_nil ());
-      #if (TAO_HAS_SMART_PROXIES == 1)
-        return TAO_CORBA_Policy_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy);
-      #else 
+        ACE_NEW_RETURN (default_proxy, CORBA_Policy (stub), CORBA_Policy::_nil ());
         return default_proxy;
-      #endif /*TAO_HAS_SMART_PROXIES == 1*/
     }
   else 
     return
@@ -786,7 +770,7 @@
 CORBA::Boolean CORBA_Policy::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV)
 {
   if (
-    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA_Policy:1.0")) ||
+    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Policy:1.0")) ||
     (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0")))
   return 1; // success using local knowledge
   else
@@ -811,7 +795,19 @@
 
 const char* CORBA_Policy::_interface_repository_id (void) const
 {
-  return "IDL:omg.org/CORBA_Policy:1.0";
+  return "IDL:omg.org/CORBA/Policy:1.0";
+}
+
+CORBA::Boolean
+CORBA_Policy::_tao_encode (TAO_OutputCDR &)
+{
+  return 0;
+}
+
+CORBA::Boolean
+CORBA_Policy::_tao_decode (TAO_InputCDR &)
+{
+  return 0;
 }
 
 static const CORBA::Long _oc_CORBA_Policy[] =
@@ -1156,75 +1152,7 @@
 
 const char* CORBA_PolicyManager::_interface_repository_id (void) const
 {
-  return "IDL:omg.org/CORBA_PolicyManager:1.0";
-}
-
-
-// default constructor
-CORBA_Current::CORBA_Current (void)
-{}
-
-// destructor
-CORBA_Current::~CORBA_Current (void)
-{}
-
-CORBA_Current_ptr CORBA_Current::_narrow (
-    CORBA::Object_ptr obj,
-    CORBA::Environment &ACE_TRY_ENV
-  )
-{
-  return CORBA_Current::_unchecked_narrow (obj, ACE_TRY_ENV);
-}
-
-CORBA_Current_ptr CORBA_Current::_unchecked_narrow (
-    CORBA::Object_ptr obj,
-    CORBA::Environment &
-  )
-{
-  if (CORBA::is_nil (obj))
-    return CORBA_Current::_nil ();
-  return
-      ACE_reinterpret_cast
-        (
-          CORBA_Current_ptr,
-            obj->_tao_QueryInterface
-              (
-                ACE_reinterpret_cast
-                  (
-                    ptr_arith_t,
-                    &CORBA_Current::_narrow
-                  )
-              )
-        );
-}
-
-CORBA_Current_ptr
-CORBA_Current::_duplicate (CORBA_Current_ptr obj)
-{
-  if (!CORBA::is_nil (obj))
-    obj->_add_ref ();
-  return obj;
-}
-
-void *CORBA_Current::_tao_QueryInterface (ptr_arith_t type)
-{
-  void *retv = 0;
-  if (type == ACE_reinterpret_cast
-    (ptr_arith_t,
-      &CORBA_Current::_narrow))
-    retv = ACE_reinterpret_cast (void*, this);
-  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow))
-    retv = ACE_reinterpret_cast (void *,
-      ACE_static_cast (CORBA::Object_ptr, this));
-    
-  if (retv)
-    this->_add_ref ();
-  return retv;
-}
-
-const char* CORBA_Current::_interface_repository_id (void) const
-{
-  return "IDL:omg.org/CORBA_Current:1.0";
+  return "IDL:omg.org/CORBA/PolicyManager:1.0";
 }
 
 
@@ -1316,7 +1244,7 @@
 
 const char* CORBA_PolicyCurrent::_interface_repository_id (void) const
 {
-  return "IDL:omg.org/CORBA_PolicyCurrent:1.0";
+  return "IDL:omg.org/CORBA/PolicyCurrent:1.0";
 }
 
 void operator<<= (CORBA::Any &_tao_any, CORBA::SetOverrideType _tao_elem)
@@ -1419,7 +1347,7 @@
         return 0;
       if (ACE_OS::strcmp (
           interface_repository_id.in (),
-          "IDL:omg.org/CORBA_PolicyError:1.0"))
+          "IDL:omg.org/CORBA/PolicyError:1.0"))
         return 0;
       if (stream >> *tmp)
       {
@@ -1507,7 +1435,7 @@
         return 0;
       if (ACE_OS::strcmp (
           interface_repository_id.in (),
-          "IDL:omg.org/CORBA_InvalidPolicies:1.0"))
+          "IDL:omg.org/CORBA/InvalidPolicies:1.0"))
         return 0;
       if (stream >> *tmp)
       {
@@ -1782,13 +1710,6 @@
 
 #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
     defined (ACE_HAS_GNU_REPO)
-    template class TAO_Object_Manager<CORBA_Current,CORBA_Current_var>;
-  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-  #  pragma instantiate TAO_Object_Manager<CORBA_Current,CORBA_Current_var>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
-    defined (ACE_HAS_GNU_REPO)
     template class TAO_Object_Manager<CORBA_PolicyCurrent,CORBA_PolicyCurrent_var>;
   #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
   #  pragma instantiate TAO_Object_Manager<CORBA_PolicyCurrent,CORBA_PolicyCurrent_var>
@@ -1905,4 +1826,3 @@
   }
   return 0; // error
 }
-