00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef _TAO_IDL_ORIG_POLICYC_H_
00032 #define _TAO_IDL_ORIG_POLICYC_H_
00033
00034 #include "ace/pre.h"
00035
00036
00037 #include "ace/config-all.h"
00038
00039 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00040 # pragma once
00041 #endif
00042
00043 #include "tao/TAO_Export.h"
00044 #include "tao/ORB.h"
00045 #include "tao/Environment.h"
00046 #include "tao/Object.h"
00047 #include "tao/Objref_VarOut_T.h"
00048
00049 #include "tao/UShortSeqC.h"
00050 #include "tao/CurrentC.h"
00051 #include "tao/Policy_ForwardC.h"
00052
00053 #if defined (TAO_EXPORT_MACRO)
00054 #undef TAO_EXPORT_MACRO
00055 #endif
00056 #define TAO_EXPORT_MACRO TAO_Export
00057
00058 #if defined(_MSC_VER)
00059 #pragma warning(push)
00060 #pragma warning(disable:4250)
00061 #endif
00062
00063 #if defined (__BORLANDC__)
00064 #pragma option push -w-rvl -w-rch -w-ccc -w-inl
00065 #endif
00066
00067 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00068
00069
00070
00071
00072 namespace TAO
00073 {
00074 class Collocation_Proxy_Broker;
00075 template<typename T> class Narrow_Utils;
00076 }
00077
00078
00079
00080
00081 namespace CORBA
00082 {
00083
00084
00085
00086
00087 typedef CORBA::Short PolicyErrorCode;
00088 typedef CORBA::Short_out PolicyErrorCode_out;
00089
00090
00091
00092
00093 const CORBA::PolicyErrorCode BAD_POLICY = 0;
00094
00095
00096
00097
00098 const CORBA::PolicyErrorCode UNSUPPORTED_POLICY = 1;
00099
00100
00101
00102
00103 const CORBA::PolicyErrorCode BAD_POLICY_TYPE = 2;
00104
00105
00106
00107
00108 const CORBA::PolicyErrorCode BAD_POLICY_VALUE = 3;
00109
00110
00111
00112
00113 const CORBA::PolicyErrorCode UNSUPPORTED_POLICY_VALUE = 4;
00114
00115
00116
00117
00118 #if !defined (_CORBA_POLICYERROR_CH_)
00119 #define _CORBA_POLICYERROR_CH_
00120
00121 class TAO_Export PolicyError : public CORBA::UserException
00122 {
00123 public:
00124
00125 CORBA::PolicyErrorCode reason;
00126 PolicyError (void);
00127 PolicyError (const PolicyError &);
00128 ~PolicyError (void);
00129
00130 PolicyError &operator= (const PolicyError &);
00131
00132 static void _tao_any_destructor (void *);
00133
00134 static PolicyError *_downcast (CORBA::Exception *);
00135 static const PolicyError *_downcast (CORBA::Exception const *);
00136
00137 static CORBA::Exception *_alloc (void);
00138
00139 virtual CORBA::Exception *_tao_duplicate (void) const;
00140
00141 virtual void _raise (void) const;
00142
00143 virtual void _tao_encode (
00144 TAO_OutputCDR &
00145
00146 ) const;
00147
00148 virtual void _tao_decode (
00149 TAO_InputCDR &
00150
00151 );
00152
00153
00154
00155
00156 PolicyError (
00157 ::CORBA::PolicyErrorCode _tao_reason
00158 );
00159
00160
00161
00162
00163 virtual CORBA::TypeCode_ptr _tao_type (void) const;
00164 };
00165
00166 #endif
00167
00168
00169
00170
00171 #if !defined (_CORBA_INVALIDPOLICIES_CH_)
00172 #define _CORBA_INVALIDPOLICIES_CH_
00173
00174 class TAO_Export InvalidPolicies : public CORBA::UserException
00175 {
00176 public:
00177
00178 CORBA::UShortSeq indices;
00179 InvalidPolicies (void);
00180 InvalidPolicies (const InvalidPolicies &);
00181 ~InvalidPolicies (void);
00182
00183 InvalidPolicies &operator= (const InvalidPolicies &);
00184
00185 static void _tao_any_destructor (void *);
00186
00187 static InvalidPolicies *_downcast (CORBA::Exception *);
00188 static const InvalidPolicies *_downcast (CORBA::Exception const *);
00189
00190 static CORBA::Exception *_alloc (void);
00191
00192 virtual CORBA::Exception *_tao_duplicate (void) const;
00193
00194 virtual void _raise (void) const;
00195
00196 virtual void _tao_encode (
00197 TAO_OutputCDR &
00198
00199 ) const;
00200
00201 virtual void _tao_decode (
00202 TAO_InputCDR &
00203
00204 );
00205
00206
00207
00208
00209 InvalidPolicies (
00210 const ::CORBA::UShortSeq & _tao_indices
00211 );
00212
00213
00214
00215
00216 virtual CORBA::TypeCode_ptr _tao_type (void) const;
00217 };
00218
00219 #endif
00220
00221
00222
00223
00224 #if !defined (_CORBA_POLICY__VAR_OUT_CH_)
00225 #define _CORBA_POLICY__VAR_OUT_CH_
00226
00227 class Policy;
00228 typedef Policy *Policy_ptr;
00229
00230 typedef
00231 TAO_Objref_Var_T<
00232 Policy
00233 >
00234 Policy_var;
00235
00236 typedef
00237 TAO_Objref_Out_T<
00238 Policy
00239 >
00240 Policy_out;
00241
00242 #endif
00243
00244
00245
00246
00247 #if !defined (_CORBA_POLICY_CH_)
00248 #define _CORBA_POLICY_CH_
00249
00250 class TAO_Export Policy
00251 : public virtual CORBA::Object
00252 {
00253 public:
00254 friend class TAO::Narrow_Utils<Policy>;
00255 typedef Policy_ptr _ptr_type;
00256 typedef Policy_var _var_type;
00257 typedef Policy_out _out_type;
00258
00259
00260 static Policy_ptr _duplicate (Policy_ptr obj);
00261
00262 static void _tao_release (Policy_ptr obj);
00263
00264 static Policy_ptr _narrow (
00265 CORBA::Object_ptr obj
00266
00267 );
00268
00269 static Policy_ptr _unchecked_narrow (
00270 CORBA::Object_ptr obj
00271
00272 );
00273
00274 static Policy_ptr _nil (void)
00275 {
00276 return static_cast<Policy_ptr> (0);
00277 }
00278
00279 static void _tao_any_destructor (void *);
00280
00281
00282
00283
00284 virtual CORBA::PolicyType policy_type (
00285 void
00286 );
00287
00288
00289
00290
00291 virtual ::CORBA::Policy_ptr copy (
00292 void
00293 );
00294
00295
00296
00297
00298 virtual void destroy (
00299 void
00300 );
00301
00302
00303
00304
00305 virtual CORBA::Boolean _is_a (
00306 const char *type_id
00307
00308 );
00309
00310 virtual const char* _interface_repository_id (void) const;
00311 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00312
00313
00314
00315 virtual CORBA::Boolean _tao_encode (TAO_OutputCDR &);
00316 virtual CORBA::Boolean _tao_decode (TAO_InputCDR &);
00317 virtual TAO_Cached_Policy_Type _tao_cached_type (void) const;
00318 virtual TAO_Policy_Scope _tao_scope (void) const;
00319
00320
00321 private:
00322 TAO::Collocation_Proxy_Broker *the_TAO_Policy_Proxy_Broker_;
00323
00324 protected:
00325
00326 Policy (void);
00327
00328
00329
00330 virtual void CORBA_Policy_setup_collocation (void);
00331
00332
00333 Policy (
00334 IOP::IOR *ior,
00335 TAO_ORB_Core *orb_core = 0
00336 );
00337
00338
00339 Policy (
00340 TAO_Stub *objref,
00341 CORBA::Boolean _tao_collocated = 0,
00342 TAO_Abstract_ServantBase *servant = 0,
00343 TAO_ORB_Core *orb_core = 0
00344 );
00345
00346 virtual ~Policy (void);
00347
00348 private:
00349
00350 Policy (const Policy &);
00351
00352 void operator= (const Policy &);
00353 };
00354
00355 #endif
00356
00357
00358
00359
00360 }
00361
00362
00363
00364
00365
00366
00367 extern TAO_Export
00368 TAO::Collocation_Proxy_Broker *
00369 (*CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer) (
00370 CORBA::Object_ptr obj
00371 );
00372
00373
00374
00375
00376
00377 namespace TAO
00378 {
00379
00380 #if !defined (_CORBA_POLICY__TRAITS_)
00381 #define _CORBA_POLICY__TRAITS_
00382
00383 template<>
00384 struct TAO_Export Objref_Traits< ::CORBA::Policy>
00385 {
00386 static ::CORBA::Policy_ptr duplicate (
00387 ::CORBA::Policy_ptr
00388 );
00389 static void release (
00390 ::CORBA::Policy_ptr
00391 );
00392 static ::CORBA::Policy_ptr nil (void);
00393 static CORBA::Boolean marshal (
00394 const ::CORBA::Policy_ptr p,
00395 TAO_OutputCDR & cdr
00396 );
00397 };
00398
00399 #endif
00400 }
00401
00402
00403
00404
00405 TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const CORBA::PolicyError &);
00406 TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, CORBA::PolicyError &);
00407
00408
00409
00410
00411 TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const CORBA::InvalidPolicies &);
00412 TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, CORBA::InvalidPolicies &);
00413
00414
00415
00416
00417 TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const CORBA::Policy_ptr );
00418 TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, CORBA::Policy_ptr &);
00419
00420
00421
00422
00423 TAO_END_VERSIONED_NAMESPACE_DECL
00424
00425 #if defined (__ACE_INLINE__)
00426 #include "tao/PolicyC.inl"
00427 #endif
00428
00429 #if defined(_MSC_VER)
00430 #pragma warning(pop)
00431 #endif
00432
00433 #if defined (__BORLANDC__)
00434 #pragma option pop
00435 #endif
00436
00437 #include "ace/post.h"
00438
00439 #endif
00440
00441