Go to the documentation of this file.00001
00002
00003 #include "orbsvcs/Notify/Default_Factory.h"
00004
00005 ACE_RCSID (Notify,
00006 TAO_Notify_Default_Factory,
00007 "$Id: Default_Factory.cpp 79084 2007-07-30 13:13:45Z elliott_c $")
00008
00009 #include "orbsvcs/Notify/EventChannelFactory.h"
00010 #include "orbsvcs/Notify/EventChannel.h"
00011 #include "orbsvcs/Notify/Admin.h"
00012 #include "orbsvcs/Notify/Proxy.h"
00013 #include "orbsvcs/Notify/SupplierAdmin.h"
00014 #include "orbsvcs/Notify/ConsumerAdmin.h"
00015 #include "orbsvcs/Notify/Structured/StructuredProxyPushConsumer.h"
00016 #include "orbsvcs/Notify/Structured/StructuredProxyPushSupplier.h"
00017 #include "orbsvcs/Notify/Any/ProxyPushConsumer.h"
00018 #include "orbsvcs/Notify/Any/ProxyPushSupplier.h"
00019 #include "orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.h"
00020 #include "orbsvcs/Notify/Any/CosEC_ProxyPushSupplier.h"
00021 #include "orbsvcs/Notify/Sequence/SequenceProxyPushConsumer.h"
00022 #include "orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.h"
00023 #include "orbsvcs/Notify/Supplier.h"
00024
00025 #include "orbsvcs/ESF/ESF_Proxy_List.h"
00026 #include "orbsvcs/ESF/ESF_Copy_On_Write.h"
00027
00028
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030
00031 template <class PROXY>
00032 class COW_Collection_Default_Factory
00033 {
00034 public:
00035 typedef typename TAO_ESF_Proxy_List<PROXY>::Iterator PROXY_ITER;
00036 typedef TAO_ESF_Copy_On_Write<PROXY, TAO_ESF_Proxy_List<PROXY>,PROXY_ITER, ACE_SYNCH> COLLECTION;
00037 typedef TAO_ESF_Proxy_Collection<PROXY> BASE_COLLECTION;
00038
00039 void create (BASE_COLLECTION* &collection)
00040 {
00041 ACE_NEW_THROW_EX (collection,
00042 COLLECTION (),
00043 CORBA::INTERNAL ());
00044 }
00045 };
00046
00047 TAO_Notify_Default_Factory::TAO_Notify_Default_Factory (void)
00048 {
00049 }
00050
00051 TAO_Notify_Default_Factory::~TAO_Notify_Default_Factory ()
00052 {
00053 }
00054
00055 void
00056 TAO_Notify_Default_Factory::create (TAO_Notify_ProxySupplier_Collection* &collection)
00057 {
00058 COW_Collection_Default_Factory<TAO_Notify_ProxySupplier> f;
00059 f.create (collection);
00060 }
00061
00062 void
00063 TAO_Notify_Default_Factory::create (TAO_Notify_ProxyConsumer_Collection* &collection)
00064 {
00065 COW_Collection_Default_Factory<TAO_Notify_ProxyConsumer> f;
00066 f.create (collection);
00067 }
00068
00069 void
00070 TAO_Notify_Default_Factory::create (TAO_Notify_EventChannel_Collection* &collection)
00071 {
00072 COW_Collection_Default_Factory<TAO_Notify_EventChannel> f;
00073 f.create (collection);
00074 }
00075
00076 void
00077 TAO_Notify_Default_Factory::create (TAO_Notify_ConsumerAdmin_Collection* &collection)
00078 {
00079 COW_Collection_Default_Factory<TAO_Notify_ConsumerAdmin> f;
00080 f.create (collection);
00081 }
00082
00083 void
00084 TAO_Notify_Default_Factory::create (TAO_Notify_SupplierAdmin_Collection* &collection)
00085 {
00086 COW_Collection_Default_Factory<TAO_Notify_SupplierAdmin> f;
00087 f.create (collection);
00088 }
00089
00090 void
00091 TAO_Notify_Default_Factory::create (TAO_Notify_Proxy_Collection* &collection)
00092 {
00093 COW_Collection_Default_Factory<TAO_Notify_Proxy> f;
00094 f.create (collection);
00095 }
00096
00097 void
00098 TAO_Notify_Default_Factory::create (TAO_Notify_EventChannelFactory*& factory,
00099 const char*)
00100 {
00101 ACE_NEW_THROW_EX (factory,
00102 TAO_Notify_EventChannelFactory (),
00103 CORBA::NO_MEMORY ());
00104 }
00105
00106 void
00107 TAO_Notify_Default_Factory::create (TAO_Notify_EventChannel*& channel,
00108 const char*)
00109 {
00110 ACE_NEW_THROW_EX (channel,
00111 TAO_Notify_EventChannel (),
00112 CORBA::NO_MEMORY ());
00113 }
00114
00115
00116 void
00117 TAO_Notify_Default_Factory::create (TAO_Notify_SupplierAdmin*& admin)
00118 {
00119 ACE_NEW_THROW_EX (admin,
00120 TAO_Notify_SupplierAdmin (),
00121 CORBA::NO_MEMORY ());
00122 }
00123
00124 void
00125 TAO_Notify_Default_Factory::create (TAO_Notify_ConsumerAdmin*& admin)
00126 {
00127 ACE_NEW_THROW_EX (admin,
00128 TAO_Notify_ConsumerAdmin (),
00129 CORBA::NO_MEMORY ());
00130 }
00131
00132 void
00133 TAO_Notify_Default_Factory::create (TAO_Notify_StructuredProxyPushConsumer*& proxy)
00134 {
00135 ACE_NEW_THROW_EX (proxy,
00136 TAO_Notify_StructuredProxyPushConsumer (),
00137 CORBA::NO_MEMORY ());
00138 }
00139
00140 void
00141 TAO_Notify_Default_Factory::create (TAO_Notify_StructuredProxyPushSupplier*& proxy)
00142 {
00143 ACE_NEW_THROW_EX (proxy,
00144 TAO_Notify_StructuredProxyPushSupplier (),
00145 CORBA::NO_MEMORY ());
00146 }
00147
00148 void
00149 TAO_Notify_Default_Factory::create (TAO_Notify_ProxyPushConsumer*& proxy)
00150 {
00151 ACE_NEW_THROW_EX (proxy,
00152 TAO_Notify_ProxyPushConsumer (),
00153 CORBA::NO_MEMORY ());
00154 }
00155
00156 void
00157 TAO_Notify_Default_Factory::create (TAO_Notify_ProxyPushSupplier*& proxy)
00158 {
00159 ACE_NEW_THROW_EX (proxy,
00160 TAO_Notify_ProxyPushSupplier (),
00161 CORBA::NO_MEMORY ());
00162 }
00163
00164 void
00165 TAO_Notify_Default_Factory::create (TAO_Notify_CosEC_ProxyPushConsumer*& proxy)
00166 {
00167 ACE_NEW_THROW_EX (proxy,
00168 TAO_Notify_CosEC_ProxyPushConsumer (),
00169 CORBA::NO_MEMORY ());
00170 }
00171
00172 void
00173 TAO_Notify_Default_Factory::create (TAO_Notify_CosEC_ProxyPushSupplier*& proxy)
00174 {
00175 ACE_NEW_THROW_EX (proxy,
00176 TAO_Notify_CosEC_ProxyPushSupplier (),
00177 CORBA::NO_MEMORY ());
00178 }
00179
00180 void
00181 TAO_Notify_Default_Factory::create (TAO_Notify_SequenceProxyPushConsumer*& proxy)
00182 {
00183 ACE_NEW_THROW_EX (proxy,
00184 TAO_Notify_SequenceProxyPushConsumer (),
00185 CORBA::NO_MEMORY ());
00186 }
00187
00188 void
00189 TAO_Notify_Default_Factory::create (TAO_Notify_SequenceProxyPushSupplier*& proxy)
00190 {
00191 ACE_NEW_THROW_EX (proxy,
00192 TAO_Notify_SequenceProxyPushSupplier (),
00193 CORBA::NO_MEMORY ());
00194 }
00195
00196 TAO_END_VERSIONED_NAMESPACE_DECL
00197
00198 ACE_FACTORY_DEFINE (TAO_Notify_Serv, TAO_Notify_Default_Factory)
00199