00001 /* -*- C++ -*- */ 00002 /** 00003 * @file ETCL_FilterFactory.h 00004 * 00005 * $Id: ETCL_FilterFactory.h 84820 2009-03-13 23:39:08Z mesnier_p $ 00006 * 00007 * @author Pradeep Gore <pradeep@oomworks.com> 00008 * 00009 * 00010 */ 00011 00012 #ifndef TAO_Notify_ETCL_FILTERFACTORY_H 00013 #define TAO_Notify_ETCL_FILTERFACTORY_H 00014 00015 #include /**/ "ace/pre.h" 00016 00017 #include "orbsvcs/Notify/notify_serv_export.h" 00018 00019 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00020 # pragma once 00021 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00022 00023 #include "orbsvcs/CosNotifyFilterS.h" 00024 00025 #include "orbsvcs/Notify/FilterFactory.h" 00026 #include "orbsvcs/Notify/ID_Factory.h" 00027 #include "orbsvcs/Notify/ETCL_Filter.h" 00028 #include "orbsvcs/Notify/Topology_Saver.h" 00029 00030 00031 #if defined(_MSC_VER) 00032 #pragma warning(push) 00033 #pragma warning(disable:4250) 00034 #endif /* _MSC_VER */ 00035 00036 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00037 00038 /** 00039 * @class TAO_Notify_ETCL_FilterFactory 00040 * 00041 * @brief 00042 * 00043 */ 00044 class TAO_Notify_Serv_Export TAO_Notify_ETCL_FilterFactory : 00045 public virtual POA_CosNotifyFilter::FilterFactory, 00046 public virtual TAO_Notify_FilterFactory 00047 { 00048 public: 00049 /// Constructor 00050 TAO_Notify_ETCL_FilterFactory (void); 00051 00052 /// Destructor 00053 virtual ~TAO_Notify_ETCL_FilterFactory (); 00054 00055 ///= TAO_Notify_FilterFactory methods. 00056 00057 virtual CosNotifyFilter::FilterFactory_ptr create ( 00058 PortableServer::POA_ptr filter_poa); 00059 00060 virtual void destroy (void); 00061 00062 ///= CosNotifyFilter::FilterFactory methods 00063 00064 virtual CosNotifyFilter::Filter_ptr create_filter ( 00065 const char * constraint_grammar); 00066 00067 virtual CosNotifyFilter::MappingFilter_ptr create_mapping_filter ( 00068 const char * constraint_grammar, 00069 const CORBA::Any & default_value); 00070 00071 00072 virtual void save_persistent (TAO_Notify::Topology_Saver& saver); 00073 00074 virtual TAO_Notify::Topology_Object* load_child ( 00075 const ACE_CString &type, 00076 CORBA::Long id, 00077 const TAO_Notify::NVPList& attrs); 00078 00079 virtual TAO_Notify_Object::ID get_filter_id (CosNotifyFilter::Filter_ptr filter); 00080 virtual CosNotifyFilter::Filter_ptr get_filter (const TAO_Notify_Object::ID& id); 00081 00082 00083 protected: 00084 00085 CosNotifyFilter::Filter_ptr 00086 create_filter (const char *constraint_grammar, 00087 const TAO_Notify_Object::ID& id, 00088 TAO_Notify_ETCL_Filter*& filter); 00089 00090 /// Release this object. 00091 virtual void release (void); 00092 00093 /// The POA in which to activate the Filters. 00094 PortableServer::POA_var filter_poa_; 00095 00096 /// Id generator for proxy suppliers 00097 TAO_Notify_ID_Factory filter_ids_; 00098 00099 typedef ACE_Hash_Map_Manager <TAO_Notify_Object::ID, 00100 TAO_Notify_ETCL_Filter*, 00101 TAO_SYNCH_MUTEX> FILTERMAP; 00102 00103 FILTERMAP filters_; 00104 }; 00105 00106 TAO_END_VERSIONED_NAMESPACE_DECL 00107 00108 #if defined(_MSC_VER) 00109 #pragma warning(pop) 00110 #endif /* _MSC_VER */ 00111 00112 ACE_FACTORY_DECLARE (TAO_Notify_Serv, TAO_Notify_ETCL_FilterFactory) 00113 00114 #include /**/ "ace/post.h" 00115 00116 #endif /* TAO_Notify_ETCL_FILTERFACTORY_H */