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/SystemException.h"
00046 #include "tao/Environment.h"
00047 #include "tao/Object.h"
00048 #include "tao/Objref_VarOut_T.h"
00049 
00050 #include "tao/UShortSeqC.h"
00051 #include "tao/CurrentC.h"
00052 #include "tao/Policy_ForwardC.h"
00053 
00054 #if defined (TAO_EXPORT_MACRO)
00055 #undef TAO_EXPORT_MACRO
00056 #endif
00057 #define TAO_EXPORT_MACRO TAO_Export
00058 
00059 #if defined(_MSC_VER)
00060 #pragma warning(push)
00061 #pragma warning(disable:4250)
00062 #endif 
00063 
00064 #if defined (__BORLANDC__)
00065 #pragma option push -w-rvl -w-rch -w-ccc -w-inl
00066 #endif 
00067 
00068 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00069 
00070 
00071 
00072 
00073 namespace TAO
00074 {
00075   class Collocation_Proxy_Broker;
00076   template<typename T> class Narrow_Utils;
00077 }
00078 
00079 
00080 
00081 
00082 namespace CORBA
00083 {
00084 
00085   
00086   
00087 
00088   typedef CORBA::Short PolicyErrorCode;
00089   typedef CORBA::Short_out PolicyErrorCode_out;
00090 
00091   
00092   
00093 
00094   const CORBA::PolicyErrorCode BAD_POLICY = 0;
00095 
00096   
00097   
00098 
00099   const CORBA::PolicyErrorCode UNSUPPORTED_POLICY = 1;
00100 
00101   
00102   
00103 
00104   const CORBA::PolicyErrorCode BAD_POLICY_TYPE = 2;
00105 
00106   
00107   
00108 
00109   const CORBA::PolicyErrorCode BAD_POLICY_VALUE = 3;
00110 
00111   
00112   
00113 
00114   const CORBA::PolicyErrorCode UNSUPPORTED_POLICY_VALUE = 4;
00115 
00116   
00117   
00118 
00119 #if !defined (_CORBA_POLICYERROR_CH_)
00120 #define _CORBA_POLICYERROR_CH_
00121 
00122   class TAO_Export PolicyError : public CORBA::UserException
00123   {
00124   public:
00125 
00126     CORBA::PolicyErrorCode reason;
00127     PolicyError (void);
00128     PolicyError (const PolicyError &);
00129     ~PolicyError (void);
00130 
00131     PolicyError &operator= (const PolicyError &);
00132 
00133     static void _tao_any_destructor (void *);
00134 
00135     static PolicyError *_downcast (CORBA::Exception *);
00136     static const PolicyError *_downcast (CORBA::Exception const *);
00137 
00138     static CORBA::Exception *_alloc (void);
00139 
00140     virtual CORBA::Exception *_tao_duplicate (void) const;
00141 
00142     virtual void _raise (void) const;
00143 
00144     virtual void _tao_encode (
00145         TAO_OutputCDR &
00146         ACE_ENV_ARG_DECL
00147       ) const;
00148 
00149     virtual void _tao_decode (
00150         TAO_InputCDR &
00151         ACE_ENV_ARG_DECL
00152       );
00153 
00154     
00155     
00156 
00157     PolicyError (
00158         ::CORBA::PolicyErrorCode _tao_reason
00159       );
00160 
00161     
00162     
00163 
00164     virtual CORBA::TypeCode_ptr _tao_type (void) const;
00165   };
00166 
00167 #endif 
00168 
00169   
00170   
00171 
00172 #if !defined (_CORBA_INVALIDPOLICIES_CH_)
00173 #define _CORBA_INVALIDPOLICIES_CH_
00174 
00175   class TAO_Export InvalidPolicies : public CORBA::UserException
00176   {
00177   public:
00178 
00179     CORBA::UShortSeq indices;
00180     InvalidPolicies (void);
00181     InvalidPolicies (const InvalidPolicies &);
00182     ~InvalidPolicies (void);
00183 
00184     InvalidPolicies &operator= (const InvalidPolicies &);
00185 
00186     static void _tao_any_destructor (void *);
00187 
00188     static InvalidPolicies *_downcast (CORBA::Exception *);
00189     static const InvalidPolicies *_downcast (CORBA::Exception const *);
00190 
00191     static CORBA::Exception *_alloc (void);
00192 
00193     virtual CORBA::Exception *_tao_duplicate (void) const;
00194 
00195     virtual void _raise (void) const;
00196 
00197     virtual void _tao_encode (
00198         TAO_OutputCDR &
00199         ACE_ENV_ARG_DECL
00200       ) const;
00201 
00202     virtual void _tao_decode (
00203         TAO_InputCDR &
00204         ACE_ENV_ARG_DECL
00205       );
00206 
00207     
00208     
00209 
00210     InvalidPolicies (
00211         const ::CORBA::UShortSeq & _tao_indices
00212       );
00213 
00214     
00215     
00216 
00217     virtual CORBA::TypeCode_ptr _tao_type (void) const;
00218   };
00219 
00220 #endif 
00221 
00222   
00223   
00224 
00225 #if !defined (_CORBA_POLICY__VAR_OUT_CH_)
00226 #define _CORBA_POLICY__VAR_OUT_CH_
00227 
00228   class Policy;
00229   typedef Policy *Policy_ptr;
00230 
00231   typedef
00232     TAO_Objref_Var_T<
00233         Policy
00234       >
00235     Policy_var;
00236 
00237   typedef
00238     TAO_Objref_Out_T<
00239         Policy
00240       >
00241     Policy_out;
00242 
00243 #endif 
00244 
00245   
00246   
00247 
00248 #if !defined (_CORBA_POLICY_CH_)
00249 #define _CORBA_POLICY_CH_
00250 
00251   class TAO_Export Policy
00252     : public virtual CORBA::Object
00253   {
00254   public:
00255     friend class TAO::Narrow_Utils<Policy>;
00256     typedef Policy_ptr _ptr_type;
00257     typedef Policy_var _var_type;
00258     typedef Policy_out _out_type;
00259 
00260     
00261     static Policy_ptr _duplicate (Policy_ptr obj);
00262 
00263     static void _tao_release (Policy_ptr obj);
00264 
00265     static Policy_ptr _narrow (
00266         CORBA::Object_ptr obj
00267         ACE_ENV_ARG_DECL_WITH_DEFAULTS
00268       );
00269 
00270     static Policy_ptr _unchecked_narrow (
00271         CORBA::Object_ptr obj
00272         ACE_ENV_ARG_DECL_WITH_DEFAULTS
00273       );
00274 
00275     static Policy_ptr _nil (void)
00276     {
00277       return static_cast<Policy_ptr> (0);
00278     }
00279 
00280     static void _tao_any_destructor (void *);
00281 
00282     
00283     
00284 
00285     virtual CORBA::PolicyType policy_type (
00286         ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
00287       )
00288       ACE_THROW_SPEC ((
00289         CORBA::SystemException
00290       ));
00291 
00292     
00293     
00294 
00295     virtual ::CORBA::Policy_ptr copy (
00296         ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
00297       )
00298       ACE_THROW_SPEC ((
00299         CORBA::SystemException
00300       ));
00301 
00302     
00303     
00304 
00305     virtual void destroy (
00306         ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
00307       )
00308       ACE_THROW_SPEC ((
00309         CORBA::SystemException
00310       ));
00311 
00312     
00313     
00314 
00315     virtual CORBA::Boolean _is_a (
00316         const char *type_id
00317         ACE_ENV_ARG_DECL_WITH_DEFAULTS
00318       );
00319 
00320     virtual const char* _interface_repository_id (void) const;
00321     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00322 
00323     
00324     
00325     virtual CORBA::Boolean _tao_encode (TAO_OutputCDR &);
00326     virtual CORBA::Boolean _tao_decode (TAO_InputCDR &);
00327     virtual TAO_Cached_Policy_Type _tao_cached_type (void) const;
00328     virtual TAO_Policy_Scope _tao_scope (void) const;
00329     
00330 
00331   private:
00332     TAO::Collocation_Proxy_Broker *the_TAO_Policy_Proxy_Broker_;
00333 
00334   protected:
00335     
00336     Policy (void);
00337 
00338     
00339     
00340     virtual void CORBA_Policy_setup_collocation (void);
00341 
00342     
00343     Policy (
00344         IOP::IOR *ior,
00345         TAO_ORB_Core *orb_core = 0
00346       );
00347 
00348     
00349     Policy (
00350         TAO_Stub *objref,
00351         CORBA::Boolean _tao_collocated = 0,
00352         TAO_Abstract_ServantBase *servant = 0,
00353         TAO_ORB_Core *orb_core = 0
00354       );
00355 
00356     virtual ~Policy (void);
00357 
00358   private:
00359     
00360     Policy (const Policy &);
00361 
00362     void operator= (const Policy &);
00363   };
00364 
00365 #endif 
00366 
00367   
00368   
00369 
00370 #if !defined (_CORBA_POLICYMANAGER__VAR_OUT_CH_)
00371 #define _CORBA_POLICYMANAGER__VAR_OUT_CH_
00372 
00373   class PolicyManager;
00374   typedef PolicyManager *PolicyManager_ptr;
00375 
00376   typedef
00377     TAO_Objref_Var_T<
00378         PolicyManager
00379       >
00380     PolicyManager_var;
00381 
00382   typedef
00383     TAO_Objref_Out_T<
00384         PolicyManager
00385       >
00386     PolicyManager_out;
00387 
00388 #endif 
00389 
00390   
00391   
00392 
00393 #if !defined (_CORBA_POLICYMANAGER_CH_)
00394 #define _CORBA_POLICYMANAGER_CH_
00395 
00396   class TAO_Export PolicyManager
00397     : public virtual CORBA::Object
00398   {
00399   public:
00400     typedef PolicyManager_ptr _ptr_type;
00401     typedef PolicyManager_var _var_type;
00402 
00403     
00404     static PolicyManager_ptr _duplicate (PolicyManager_ptr obj);
00405 
00406     static void _tao_release (PolicyManager_ptr obj);
00407 
00408     static PolicyManager_ptr _narrow (
00409         CORBA::Object_ptr obj
00410         ACE_ENV_ARG_DECL_WITH_DEFAULTS
00411       );
00412 
00413     static PolicyManager_ptr _unchecked_narrow (
00414         CORBA::Object_ptr obj
00415         ACE_ENV_ARG_DECL_WITH_DEFAULTS
00416       );
00417 
00418     static PolicyManager_ptr _nil (void)
00419     {
00420       return static_cast<PolicyManager_ptr> (0);
00421     }
00422 
00423     static void _tao_any_destructor (void *);
00424 
00425     
00426     
00427 
00428     virtual ::CORBA::PolicyList * get_policy_overrides (
00429         const ::CORBA::PolicyTypeSeq & ts
00430         ACE_ENV_ARG_DECL_WITH_DEFAULTS
00431       )
00432       ACE_THROW_SPEC ((
00433         CORBA::SystemException
00434       )) = 0;
00435 
00436     
00437     
00438 
00439     virtual void set_policy_overrides (
00440         const ::CORBA::PolicyList & policies,
00441         ::CORBA::SetOverrideType set_add
00442         ACE_ENV_ARG_DECL_WITH_DEFAULTS
00443       )
00444       ACE_THROW_SPEC ((
00445         CORBA::SystemException,
00446         ::CORBA::InvalidPolicies
00447       )) = 0;
00448 
00449     
00450     
00451 
00452     virtual CORBA::Boolean _is_a (
00453         const char *type_id
00454         ACE_ENV_ARG_DECL_WITH_DEFAULTS
00455       );
00456 
00457     virtual const char* _interface_repository_id (void) const;
00458     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00459 
00460   protected:
00461     
00462     PolicyManager (void);
00463 
00464     virtual ~PolicyManager (void);
00465 
00466   private:
00467     
00468     PolicyManager (const PolicyManager &);
00469 
00470     void operator= (const PolicyManager &);
00471   };
00472 
00473 #endif 
00474 
00475   
00476   
00477 
00478 #if !defined (_CORBA_POLICYCURRENT__VAR_OUT_CH_)
00479 #define _CORBA_POLICYCURRENT__VAR_OUT_CH_
00480 
00481   class PolicyCurrent;
00482   typedef PolicyCurrent *PolicyCurrent_ptr;
00483 
00484   typedef
00485     TAO_Objref_Var_T<
00486         PolicyCurrent
00487       >
00488     PolicyCurrent_var;
00489 
00490   typedef
00491     TAO_Objref_Out_T<
00492         PolicyCurrent
00493       >
00494     PolicyCurrent_out;
00495 
00496 #endif 
00497 
00498   
00499   
00500 
00501 #if !defined (_CORBA_POLICYCURRENT_CH_)
00502 #define _CORBA_POLICYCURRENT_CH_
00503 
00504   class TAO_Export PolicyCurrent
00505     : public virtual ::CORBA::PolicyManager,
00506       public virtual ::CORBA::Current
00507   {
00508   public:
00509     typedef PolicyCurrent_ptr _ptr_type;
00510     typedef PolicyCurrent_var _var_type;
00511 
00512     
00513     static PolicyCurrent_ptr _duplicate (PolicyCurrent_ptr obj);
00514 
00515     static void _tao_release (PolicyCurrent_ptr obj);
00516 
00517     static PolicyCurrent_ptr _narrow (
00518         CORBA::Object_ptr obj
00519         ACE_ENV_ARG_DECL_WITH_DEFAULTS
00520       );
00521 
00522     static PolicyCurrent_ptr _unchecked_narrow (
00523         CORBA::Object_ptr obj
00524         ACE_ENV_ARG_DECL_WITH_DEFAULTS
00525       );
00526 
00527     static PolicyCurrent_ptr _nil (void)
00528     {
00529       return static_cast<PolicyCurrent_ptr> (0);
00530     }
00531 
00532     static void _tao_any_destructor (void *);
00533 
00534     
00535     
00536 
00537     virtual CORBA::Boolean _is_a (
00538         const char *type_id
00539         ACE_ENV_ARG_DECL_WITH_DEFAULTS
00540       );
00541 
00542     virtual const char* _interface_repository_id (void) const;
00543     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00544 
00545   protected:
00546     
00547     PolicyCurrent (void);
00548 
00549     virtual ~PolicyCurrent (void);
00550 
00551   private:
00552     
00553     PolicyCurrent (const PolicyCurrent &);
00554 
00555     void operator= (const PolicyCurrent &);
00556   };
00557 
00558 #endif 
00559 
00560 
00561 
00562 
00563 } 
00564 
00565 
00566 
00567 
00568 
00569 
00570 extern TAO_Export
00571 TAO::Collocation_Proxy_Broker *
00572 (*CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer) (
00573     CORBA::Object_ptr obj
00574   );
00575 
00576 
00577 
00578 
00579 
00580 namespace TAO
00581 {
00582 
00583 #if !defined (_CORBA_POLICY__TRAITS_)
00584 #define _CORBA_POLICY__TRAITS_
00585 
00586   template<>
00587   struct TAO_Export Objref_Traits< ::CORBA::Policy>
00588   {
00589     static ::CORBA::Policy_ptr duplicate (
00590         ::CORBA::Policy_ptr
00591       );
00592     static void release (
00593         ::CORBA::Policy_ptr
00594       );
00595     static ::CORBA::Policy_ptr nil (void);
00596     static CORBA::Boolean marshal (
00597         const ::CORBA::Policy_ptr p,
00598         TAO_OutputCDR & cdr
00599       );
00600   };
00601 
00602 #endif 
00603 
00604 #if !defined (_CORBA_POLICYMANAGER__TRAITS_CH_)
00605 #define _CORBA_POLICYMANAGER__TRAITS_CH_
00606 
00607   template<>
00608   struct TAO_Export Objref_Traits< ::CORBA::PolicyManager>
00609   {
00610     static ::CORBA::PolicyManager_ptr duplicate (
00611         ::CORBA::PolicyManager_ptr
00612       );
00613     static void release (
00614         ::CORBA::PolicyManager_ptr
00615       );
00616     static ::CORBA::PolicyManager_ptr nil (void);
00617     static CORBA::Boolean marshal (
00618         const ::CORBA::PolicyManager_ptr p,
00619         TAO_OutputCDR & cdr
00620       );
00621   };
00622 
00623 #endif 
00624 
00625 #if !defined (_CORBA_POLICYCURRENT__TRAITS_)
00626 #define _CORBA_POLICYCURRENT__TRAITS_
00627 
00628   template<>
00629   struct TAO_Export Objref_Traits< ::CORBA::PolicyCurrent>
00630   {
00631     static ::CORBA::PolicyCurrent_ptr duplicate (
00632         ::CORBA::PolicyCurrent_ptr
00633       );
00634     static void release (
00635         ::CORBA::PolicyCurrent_ptr
00636       );
00637     static ::CORBA::PolicyCurrent_ptr nil (void);
00638     static CORBA::Boolean marshal (
00639         const ::CORBA::PolicyCurrent_ptr p,
00640         TAO_OutputCDR & cdr
00641       );
00642   };
00643 
00644 #endif 
00645 }
00646 
00647 
00648 
00649 
00650 TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const CORBA::PolicyError &);
00651 TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, CORBA::PolicyError &);
00652 
00653 
00654 
00655 
00656 TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const CORBA::InvalidPolicies &);
00657 TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, CORBA::InvalidPolicies &);
00658 
00659 
00660 
00661 
00662 TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const CORBA::Policy_ptr );
00663 TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, CORBA::Policy_ptr &);
00664 
00665 
00666 
00667 
00668 TAO_END_VERSIONED_NAMESPACE_DECL
00669 
00670 #if defined (__ACE_INLINE__)
00671 #include "tao/PolicyC.inl"
00672 #endif 
00673 
00674 #if defined(_MSC_VER)
00675 #pragma warning(pop)
00676 #endif 
00677 
00678 #if defined (__BORLANDC__)
00679 #pragma option pop
00680 #endif 
00681 
00682 #include  "ace/post.h"
00683 
00684 #endif 
00685 
00686