00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file ZIOP_Stub.h 00006 * 00007 * $Id: ZIOP_Stub.h 82395 2008-07-23 12:56:26Z johnnyw $ 00008 * 00009 * This file contains the declaration for the ZIOP Stub. 00010 * 00011 * @author Johnny Willemsen <jwillemsen@remedy.nl> 00012 */ 00013 //============================================================================= 00014 00015 #ifndef TAO_ZIOP_STUB_H_ 00016 #define TAO_ZIOP_STUB_H_ 00017 00018 #include /**/ "ace/pre.h" 00019 00020 #include "tao/orbconf.h" 00021 00022 #include "tao/ZIOP/ziop_export.h" 00023 00024 #include "tao/Stub.h" 00025 00026 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00027 # pragma once 00028 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00029 00030 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0 00031 00032 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00033 00034 // Forward references. 00035 namespace TAO 00036 { 00037 class CompressorIdListPolicy; 00038 class CompressionEnablingPolicy; 00039 } 00040 00041 /** 00042 * @class TAO_ZIOP_Stub 00043 * 00044 * This class represent a stub with extended functionality, which are needed 00045 * for ZIOPCORBA. 00046 */ 00047 class TAO_ZIOP_Export TAO_ZIOP_Stub : public TAO_Stub 00048 { 00049 public: 00050 00051 TAO_ZIOP_Stub (const char *repository_id, 00052 const TAO_MProfile &profiles, 00053 TAO_ORB_Core *orb_core); 00054 00055 virtual ~TAO_ZIOP_Stub (void); 00056 00057 /** 00058 * Returns the effective policy if @a type is a known client-exposed 00059 * policy type. Returns the effective override for all other policy 00060 * types. 00061 */ 00062 CORBA::Policy_ptr get_policy (CORBA::PolicyType type); 00063 00064 CORBA::Policy_ptr get_cached_policy (TAO_Cached_Policy_Type type); 00065 00066 private: 00067 00068 /// Helper method used to parse the policies. 00069 void parse_policies (void); 00070 00071 void exposed_compression_enabling_policy (CORBA::Policy_ptr policy); 00072 00073 void exposed_compression_id_list_policy (CORBA::Policy_ptr policy); 00074 00075 CORBA::Policy_ptr exposed_compression_enabling_policy (void); 00076 00077 CORBA::Policy_ptr exposed_compression_id_list_policy (void); 00078 00079 CORBA::Policy *effective_compression_enabling_policy (void); 00080 CORBA::Policy *effective_compression_id_list_policy (void); 00081 00082 // The following attribute are used to cache 00083 // the different kind of policies and avoid to 00084 // parse the MProfile's policy list each time we 00085 // are asked about a given policy. 00086 00087 CORBA::Policy_var compression_enabling_policy_; 00088 00089 CORBA::Policy_var compression_id_list_policy_; 00090 00091 CORBA::Boolean are_policies_parsed_; 00092 00093 private: 00094 // = Disallow copying and assignment. 00095 TAO_ZIOP_Stub (const TAO_ZIOP_Stub &); 00096 TAO_ZIOP_Stub &operator = (const TAO_ZIOP_Stub &); 00097 }; 00098 00099 TAO_END_VERSIONED_NAMESPACE_DECL 00100 00101 #endif 00102 00103 #include /**/ "ace/post.h" 00104 00105 #endif /* TAO_ZIOP_STUB_FACTORY_H_ */