EC_Null_Factory.cpp

Go to the documentation of this file.
00001 // EC_Null_Factory.cpp,v 1.27 2006/03/14 06:14:25 jtc Exp
00002 
00003 #include "orbsvcs/Event/EC_Null_Factory.h"
00004 #include "orbsvcs/Event/EC_Reactive_Dispatching.h"
00005 #include "orbsvcs/Event/EC_Filter_Builder.h"
00006 #include "orbsvcs/Event/EC_Trivial_Supplier_Filter.h"
00007 #include "orbsvcs/Event/EC_ConsumerAdmin.h"
00008 #include "orbsvcs/Event/EC_SupplierAdmin.h"
00009 #include "orbsvcs/Event/EC_Default_ProxyConsumer.h"
00010 #include "orbsvcs/Event/EC_Default_ProxySupplier.h"
00011 #include "orbsvcs/Event/EC_ObserverStrategy.h"
00012 #include "orbsvcs/Event/EC_Null_Scheduling.h"
00013 #include "orbsvcs/Event/EC_Reactive_Timeout_Generator.h"
00014 #include "orbsvcs/Event/EC_ConsumerControl.h"
00015 #include "orbsvcs/Event/EC_SupplierControl.h"
00016 #include "orbsvcs/Event/EC_Event_Channel_Base.h" // @@ MSVC 6 bug
00017 #include "orbsvcs/ESF/ESF_Proxy_List.h"
00018 #include "orbsvcs/ESF/ESF_Immediate_Changes.h"
00019 
00020 #include "tao/ORB_Core.h"
00021 
00022 ACE_RCSID(Event, EC_Null_Factory, "EC_Null_Factory.cpp,v 1.27 2006/03/14 06:14:25 jtc Exp")
00023 
00024 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00025 
00026 TAO_EC_Null_Factory::TAO_EC_Null_Factory (void)
00027 {
00028 }
00029 
00030 TAO_EC_Null_Factory::~TAO_EC_Null_Factory (void)
00031 {
00032 }
00033 
00034 TAO_EC_Dispatching*
00035 TAO_EC_Null_Factory::create_dispatching (TAO_EC_Event_Channel_Base *)
00036 {
00037   return new TAO_EC_Reactive_Dispatching ();
00038 }
00039 
00040 void
00041 TAO_EC_Null_Factory::destroy_dispatching (TAO_EC_Dispatching *x)
00042 {
00043   delete x;
00044 }
00045 
00046 TAO_EC_Filter_Builder*
00047 TAO_EC_Null_Factory::create_filter_builder (TAO_EC_Event_Channel_Base *)
00048 {
00049   return new TAO_EC_Null_Filter_Builder;
00050 }
00051 
00052 void
00053 TAO_EC_Null_Factory::destroy_filter_builder (TAO_EC_Filter_Builder *x)
00054 {
00055   delete x;
00056 }
00057 
00058 TAO_EC_Supplier_Filter_Builder*
00059 TAO_EC_Null_Factory::create_supplier_filter_builder (TAO_EC_Event_Channel_Base *ec)
00060 {
00061   return new TAO_EC_Trivial_Supplier_Filter_Builder (ec);
00062 }
00063 
00064 void
00065 TAO_EC_Null_Factory::destroy_supplier_filter_builder (TAO_EC_Supplier_Filter_Builder *x)
00066 {
00067   delete x;
00068 }
00069 
00070 TAO_EC_ConsumerAdmin*
00071 TAO_EC_Null_Factory::create_consumer_admin (TAO_EC_Event_Channel_Base *ec)
00072 {
00073   return new TAO_EC_ConsumerAdmin (ec);
00074 }
00075 
00076 void
00077 TAO_EC_Null_Factory::destroy_consumer_admin (TAO_EC_ConsumerAdmin *x)
00078 {
00079   delete x;
00080 }
00081 
00082 TAO_EC_SupplierAdmin*
00083 TAO_EC_Null_Factory::create_supplier_admin (TAO_EC_Event_Channel_Base *ec)
00084 {
00085   return new TAO_EC_SupplierAdmin (ec);
00086 }
00087 
00088 void
00089 TAO_EC_Null_Factory::destroy_supplier_admin (TAO_EC_SupplierAdmin *x)
00090 {
00091   delete x;
00092 }
00093 
00094 TAO_EC_ProxyPushSupplier*
00095 TAO_EC_Null_Factory::create_proxy_push_supplier (TAO_EC_Event_Channel_Base *ec)
00096 {
00097   return new TAO_EC_Default_ProxyPushSupplier (ec, TAO_EC_DEFAULT_CONSUMER_VALIDATE_CONNECTION);
00098 }
00099 
00100 void
00101 TAO_EC_Null_Factory::destroy_proxy_push_supplier (TAO_EC_ProxyPushSupplier *x)
00102 {
00103   delete x;
00104 }
00105 
00106 TAO_EC_ProxyPushConsumer*
00107 TAO_EC_Null_Factory::create_proxy_push_consumer (TAO_EC_Event_Channel_Base *ec)
00108 {
00109   return new TAO_EC_Default_ProxyPushConsumer (ec);
00110 }
00111 
00112 void
00113 TAO_EC_Null_Factory::destroy_proxy_push_consumer (TAO_EC_ProxyPushConsumer *x)
00114 {
00115   delete x;
00116 }
00117 
00118 TAO_EC_Timeout_Generator*
00119 TAO_EC_Null_Factory::create_timeout_generator (TAO_EC_Event_Channel_Base *)
00120 {
00121   int argc = 0;
00122   char **argv = 0;
00123   CORBA::ORB_var orb =
00124     CORBA::ORB_init (argc, argv, "");
00125   ACE_Reactor *reactor = orb->orb_core ()->reactor ();
00126   return new TAO_EC_Reactive_Timeout_Generator (reactor);
00127 }
00128 
00129 void
00130 TAO_EC_Null_Factory::destroy_timeout_generator (TAO_EC_Timeout_Generator *x)
00131 {
00132   delete x;
00133 }
00134 
00135 TAO_EC_ObserverStrategy*
00136 TAO_EC_Null_Factory::create_observer_strategy (TAO_EC_Event_Channel_Base *)
00137 {
00138   return new TAO_EC_Null_ObserverStrategy;
00139 }
00140 
00141 void
00142 TAO_EC_Null_Factory::destroy_observer_strategy (TAO_EC_ObserverStrategy *x)
00143 {
00144   delete x;
00145 }
00146 
00147 TAO_EC_Scheduling_Strategy*
00148 TAO_EC_Null_Factory::create_scheduling_strategy (TAO_EC_Event_Channel_Base*)
00149 {
00150   return new TAO_EC_Null_Scheduling;
00151 }
00152 
00153 void
00154 TAO_EC_Null_Factory::destroy_scheduling_strategy (TAO_EC_Scheduling_Strategy* x)
00155 {
00156   delete x;
00157 }
00158 
00159 TAO_EC_ProxyPushConsumer_Collection*
00160 TAO_EC_Null_Factory::create_proxy_push_consumer_collection (TAO_EC_Event_Channel_Base *)
00161 {
00162   // This typedef is a workaround for a SunCC 4.2 bug
00163   typedef TAO_ESF_Proxy_List<TAO_EC_ProxyPushConsumer>::Iterator TAO_EC_Consumer_List_Iterator;
00164   return new TAO_ESF_Immediate_Changes<TAO_EC_ProxyPushConsumer,
00165       TAO_ESF_Proxy_List<TAO_EC_ProxyPushConsumer>,
00166       TAO_EC_Consumer_List_Iterator,
00167       ACE_Null_Mutex> ();
00168 }
00169 
00170 void
00171 TAO_EC_Null_Factory::destroy_proxy_push_consumer_collection (TAO_EC_ProxyPushConsumer_Collection *x)
00172 {
00173   delete x;
00174 }
00175 
00176 TAO_EC_ProxyPushSupplier_Collection*
00177 TAO_EC_Null_Factory::create_proxy_push_supplier_collection (TAO_EC_Event_Channel_Base *)
00178 {
00179   // This typedef is a workaround for a SunCC 4.2 bug
00180   typedef TAO_ESF_Proxy_List<TAO_EC_ProxyPushSupplier>::Iterator TAO_EC_Supplier_List_Iterator;
00181   return new TAO_ESF_Immediate_Changes<TAO_EC_ProxyPushSupplier,
00182       TAO_ESF_Proxy_List<TAO_EC_ProxyPushSupplier>,
00183       TAO_EC_Supplier_List_Iterator,
00184       ACE_Null_Mutex> ();
00185 }
00186 
00187 void
00188 TAO_EC_Null_Factory::destroy_proxy_push_supplier_collection (TAO_EC_ProxyPushSupplier_Collection *x)
00189 {
00190   delete x;
00191 }
00192 
00193 ACE_Lock*
00194 TAO_EC_Null_Factory::create_consumer_lock (void)
00195 {
00196   return new ACE_Lock_Adapter<ACE_Null_Mutex> ();
00197 }
00198 
00199 void
00200 TAO_EC_Null_Factory::destroy_consumer_lock (ACE_Lock* x)
00201 {
00202   delete x;
00203 }
00204 
00205 ACE_Lock*
00206 TAO_EC_Null_Factory::create_supplier_lock (void)
00207 {
00208   return new ACE_Lock_Adapter<ACE_Null_Mutex> ();
00209 }
00210 
00211 void
00212 TAO_EC_Null_Factory::destroy_supplier_lock (ACE_Lock* x)
00213 {
00214   delete x;
00215 }
00216 
00217 TAO_EC_ConsumerControl*
00218 TAO_EC_Null_Factory::create_consumer_control (TAO_EC_Event_Channel_Base*)
00219 {
00220   return new TAO_EC_ConsumerControl ();
00221 }
00222 
00223 void
00224 TAO_EC_Null_Factory::destroy_consumer_control (TAO_EC_ConsumerControl* x)
00225 {
00226   delete x;
00227 }
00228 
00229 TAO_EC_SupplierControl*
00230 TAO_EC_Null_Factory::create_supplier_control (TAO_EC_Event_Channel_Base*)
00231 {
00232   return new TAO_EC_SupplierControl ();
00233 }
00234 
00235 void
00236 TAO_EC_Null_Factory::destroy_supplier_control (TAO_EC_SupplierControl* x)
00237 {
00238   delete x;
00239 }
00240 
00241 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 13:11:08 2006 for TAO_RTEvent by doxygen 1.3.6