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