diff options
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLog-99c | 9 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Channel_Clients_T.cpp | 10 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_Gateway.cpp | 49 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp | 355 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp | 68 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp | 34 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp | 15 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp | 33 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp | 14 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Event/Basic/Timeout.cpp | 406 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Event/Basic/Wildcard.cpp | 479 | ||||
-rw-r--r-- | TAO/tao/DynUnion_i.cpp | 87 | ||||
-rw-r--r-- | TAO/tao/IIOP_Acceptor.cpp | 194 | ||||
-rw-r--r-- | TAO/tao/IIOP_Connector.cpp | 559 | ||||
-rw-r--r-- | TAO/tao/UIOP_Acceptor.cpp | 202 | ||||
-rw-r--r-- | TAO/tao/UIOP_Connector.cpp | 570 |
16 files changed, 1453 insertions, 1631 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index ef5aa589579..a3252c203bb 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,12 @@ +Tue Aug 31 00:16:34 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + + * Added a series of fixes that allow TAO to build and + run cleanly with SunC++ 5.0 and Solaris 7 even when debugging is + NOT enabled. These changes require moving the explicit template + instantiations from the BOTTOM of the *.cpp files to near the + top. Thanks to Robert Shewan <rshew@peri.com> for reporting + this. + Tue Aug 31 9:25:00 1999 Michael Kircher <Michael.Kircher@mchp.siemens.de> * tao/TAO.dsp: diff --git a/TAO/orbsvcs/orbsvcs/Channel_Clients_T.cpp b/TAO/orbsvcs/orbsvcs/Channel_Clients_T.cpp index 4120f0a3aca..9d986f321ed 100644 --- a/TAO/orbsvcs/orbsvcs/Channel_Clients_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Channel_Clients_T.cpp @@ -5,16 +5,16 @@ #include "orbsvcs/Channel_Clients_T.h" +ACE_RCSID(orbsvcs, Channel_Clients_T, "$Id$") + #if !defined (__ACE_INLINE__) #include "orbsvcs/Channel_Clients_T.i" #endif /* __ACE_INLINE__ */ -ACE_RCSID(orbsvcs, Channel_Clients_T, "$Id$") - template<class TARGET> void ACE_PushConsumer_Adapter<TARGET>::push (const RtecEventComm::EventSet& events, CORBA::Environment &TAO_IN_ENV) - ACE_THROW_SPEC (( CORBA::SystemException)) + ACE_THROW_SPEC ((CORBA::SystemException)) { target_->push (events, TAO_IN_ENV); } @@ -22,7 +22,7 @@ ACE_PushConsumer_Adapter<TARGET>::push (const RtecEventComm::EventSet& events, template<class TARGET> void ACE_PushConsumer_Adapter<TARGET>::disconnect_push_consumer ( CORBA::Environment &TAO_IN_ENV) - ACE_THROW_SPEC (( CORBA::SystemException)) + ACE_THROW_SPEC ((CORBA::SystemException)) { target_->disconnect_push_consumer (TAO_IN_ENV); @@ -31,7 +31,7 @@ ACE_PushConsumer_Adapter<TARGET>::disconnect_push_consumer ( template<class TARGET> void ACE_PushSupplier_Adapter<TARGET>::disconnect_push_supplier ( CORBA::Environment &TAO_IN_ENV) - ACE_THROW_SPEC (( CORBA::SystemException)) + ACE_THROW_SPEC ((CORBA::SystemException)) { target_->disconnect_push_supplier (TAO_IN_ENV); } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.cpp index 815677f653f..3b382128bd7 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.cpp @@ -6,6 +6,30 @@ ACE_RCSID(Event, EC_Gateway, "$Id$") + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +template class ACE_PushConsumer_Adapter<TAO_EC_Gateway_IIOP>; +template class ACE_PushSupplier_Adapter<TAO_EC_Gateway_IIOP>; +template class ACE_Map_Entry<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr>; +template class ACE_Map_Manager<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex>; +template class ACE_Map_Iterator_Base<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex>; +template class ACE_Map_Iterator<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex>; +template class ACE_Map_Reverse_Iterator<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex>; + +#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) + +#pragma instantiate ACE_PushConsumer_Adapter<TAO_EC_Gateway_IIOP> +#pragma instantiate ACE_PushSupplier_Adapter<TAO_EC_Gateway_IIOP> + +#pragma instantiate ACE_Map_Entry<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr> +#pragma instantiate ACE_Map_Manager<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex> +#pragma instantiate ACE_Map_Iterator_Base<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex> +#pragma instantiate ACE_Map_Iterator<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex> +#pragma instantiate ACE_Map_Reverse_Iterator<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex> + +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + TAO_EC_Gateway::TAO_EC_Gateway (void) : handle_ (0) { @@ -27,8 +51,6 @@ TAO_EC_Gateway::observer_handle (void) const return this->handle_; } -// **************************************************************** - TAO_EC_Gateway_IIOP::TAO_EC_Gateway_IIOP (void) : busy_count_ (0), update_posted_ (0), @@ -471,26 +493,3 @@ TAO_EC_Gateway_IIOP::shutdown (CORBA::Environment& ACE_TRY_ENV) return 0; } - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class ACE_PushConsumer_Adapter<TAO_EC_Gateway_IIOP>; -template class ACE_PushSupplier_Adapter<TAO_EC_Gateway_IIOP>; -template class ACE_Map_Entry<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr>; -template class ACE_Map_Manager<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex>; -template class ACE_Map_Iterator_Base<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex>; -template class ACE_Map_Iterator<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex>; -template class ACE_Map_Reverse_Iterator<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex>; - -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_PushConsumer_Adapter<TAO_EC_Gateway_IIOP> -#pragma instantiate ACE_PushSupplier_Adapter<TAO_EC_Gateway_IIOP> - -#pragma instantiate ACE_Map_Entry<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr> -#pragma instantiate ACE_Map_Manager<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex> -#pragma instantiate ACE_Map_Iterator_Base<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex> -#pragma instantiate ACE_Map_Iterator<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex> -#pragma instantiate ACE_Map_Reverse_Iterator<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex> - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp index 16474b3da3f..1b38ff9c583 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp @@ -20,6 +20,82 @@ ACE_RCSID(Event, Event_Channel, "$Id$") #include "tao/Timeprobe.h" +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +template class ACE_Atomic_Op<ACE_ES_MUTEX, int>; +template class ACE_Map_Entry<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT>; +template class ACE_Map_Entry<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT>; +template class ACE_Map_Entry<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry>; +template class ACE_Map_Manager<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>; +template class ACE_Map_Manager<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>; +template class ACE_Map_Manager<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex>; +template class ACE_Map_Iterator_Base<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>; +template class ACE_Map_Iterator_Base<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>; +template class ACE_Map_Iterator_Base<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex>; +template class ACE_Map_Iterator<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>; +template class ACE_Map_Iterator<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex>; +template class ACE_Map_Reverse_Iterator<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>; +template class ACE_Map_Iterator<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>; +template class ACE_Map_Reverse_Iterator<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>; +template class ACE_Map_Reverse_Iterator<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex>; +template class ACE_Node<ACE_ES_Consumer_Rep *>; +template class ACE_Node<ACE_Push_Consumer_Proxy *>; +template class ACE_Node<ACE_Push_Supplier_Proxy *>; +template class ACE_Unbounded_Set<ACE_ES_Consumer_Rep *>; +template class ACE_Unbounded_Set<ACE_Push_Consumer_Proxy *>; +template class ACE_Unbounded_Set<ACE_Push_Supplier_Proxy *>; +template class ACE_Unbounded_Set_Iterator<ACE_ES_Consumer_Rep *>; +template class ACE_Unbounded_Set_Iterator<ACE_Push_Consumer_Proxy *>; +template class ACE_Unbounded_Set_Iterator<ACE_Push_Supplier_Proxy *>; + +template class ACE_Auto_Basic_Ptr<ACE_Push_Supplier_Proxy>; +template class ACE_Auto_Basic_Ptr<ACE_Push_Consumer_Proxy>; +template class auto_ptr<ACE_Push_Supplier_Proxy>; +template class auto_ptr<ACE_Push_Consumer_Proxy>; + +template class ACE_Array<TAO_EC_Event>; +template class ACE_Array_Base<TAO_EC_Event>; +template class ACE_Array_Iterator<TAO_EC_Event>; + +#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) + +#pragma instantiate ACE_Atomic_Op<ACE_ES_MUTEX, int> +#pragma instantiate ACE_Map_Entry<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT> +#pragma instantiate ACE_Map_Entry<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT> +#pragma instantiate ACE_Map_Entry<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry> +#pragma instantiate ACE_Map_Manager<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH> +#pragma instantiate ACE_Map_Manager<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH> +#pragma instantiate ACE_Map_Manager<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex> +#pragma instantiate ACE_Map_Iterator_Base<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH> +#pragma instantiate ACE_Map_Iterator_Base<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH> +#pragma instantiate ACE_Map_Iterator_Base<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex> +#pragma instantiate ACE_Map_Iterator<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH> +#pragma instantiate ACE_Map_Iterator<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex> +#pragma instantiate ACE_Map_Reverse_Iterator<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH> +#pragma instantiate ACE_Map_Iterator<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH> +#pragma instantiate ACE_Map_Reverse_Iterator<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH> +#pragma instantiate ACE_Map_Reverse_Iterator<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex> +#pragma instantiate ACE_Node<ACE_ES_Consumer_Rep *> +#pragma instantiate ACE_Node<ACE_Push_Consumer_Proxy *> +#pragma instantiate ACE_Node<ACE_Push_Supplier_Proxy *> +#pragma instantiate ACE_Unbounded_Set<ACE_ES_Consumer_Rep *> +#pragma instantiate ACE_Unbounded_Set<ACE_Push_Consumer_Proxy *> +#pragma instantiate ACE_Unbounded_Set<ACE_Push_Supplier_Proxy *> +#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_ES_Consumer_Rep *> +#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Push_Consumer_Proxy *> +#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Push_Supplier_Proxy *> + +#pragma instantiate ACE_Auto_Basic_Ptr<ACE_Push_Supplier_Proxy> +#pragma instantiate ACE_Auto_Basic_Ptr<ACE_Push_Consumer_Proxy> +#pragma instantiate auto_ptr<ACE_Push_Supplier_Proxy> +#pragma instantiate auto_ptr<ACE_Push_Consumer_Proxy> + +#pragma instantiate ACE_Array<TAO_EC_Event> +#pragma instantiate ACE_Array_Base<TAO_EC_Event> +#pragma instantiate ACE_Array_Iterator<TAO_EC_Event> + +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + #if defined (ACE_ENABLE_TIMEPROBES) static const char *TAO_Event_Channel_Timeprobe_Description[] = @@ -81,8 +157,6 @@ ACE_TIMEPROBE_EVENT_DESCRIPTIONS (TAO_Event_Channel_Timeprobe_Description, #endif /* ACE_ENABLE_TIMEPROBES */ -// ************************************************************ - static RtecScheduler::Preemption_Priority_t Preemption_Priority (RtecScheduler::Scheduler_ptr scheduler, RtecScheduler::handle_t rtinfo, @@ -123,23 +197,21 @@ IntervalToPriority (RtecScheduler::Time interval) return ACE_Scheduler_MIN_PREEMPTION_PRIORITY; } -// ************************************************************ - class TAO_ORBSVCS_Export Shutdown_Consumer : public ACE_ES_Dispatch_Request -// = TITLE -// Shutdown Consumer command -// -// = DESCRIPTION -// This command object is sent through the system when a consumer -// disconnects. When the Dispatching Module dequeues this request, -// it calls execute which execute calls back to the Consumer -// Module. At that point, the Consumer Module can tell the rest of -// the system that the consumer has disconnected and delete the -// consumer proxy. This allows all events queued for the consumer -// to be flushed to the consumer proxy (which will drop them). -// Events can be queued in the ReactorEx (in a dispatch set), or in -// the Dispatching Module. { + // = TITLE + // Shutdown Consumer command + // + // = DESCRIPTION + // This command object is sent through the system when a consumer + // disconnects. When the Dispatching Module dequeues this request, + // it calls execute which execute calls back to the Consumer + // Module. At that point, the Consumer Module can tell the rest of + // the system that the consumer has disconnected and delete the + // consumer proxy. This allows all events queued for the consumer + // to be flushed to the consumer proxy (which will drop them). + // Events can be queued in the ReactorEx (in a dispatch set), or in + // the Dispatching Module. public: // When executed, tells <consumer_module> that <consumer> has shut // down. @@ -147,69 +219,67 @@ public: ACE_Push_Consumer_Proxy *consumer, RtecScheduler::Scheduler_ptr scheduler) : consumer_module_ (consumer_module) - { - consumer_ = consumer; + { + consumer_ = consumer; - // Set rt_info_ to the lowest priority rt_info in consumer_. - // This is so the dispatching module can query us as a dispatch - // request to get the appropriate preemption priority. - ACE_ES_Dependency_Iterator iter (consumer->qos ().dependencies); + // Set rt_info_ to the lowest priority rt_info in consumer_. + // This is so the dispatching module can query us as a dispatch + // request to get the appropriate preemption priority. + ACE_ES_Dependency_Iterator iter (consumer->qos ().dependencies); - RtecScheduler::Preemption_Priority_t p = - ACE_Scheduler_MIN_PREEMPTION_PRIORITY; - while (iter.advance_dependency () == 0) - { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - RtecEventComm::EventType &type = (*iter).event.header.type; - - if (type != ACE_ES_GLOBAL_DESIGNATOR && - type != ACE_ES_CONJUNCTION_DESIGNATOR && - type != ACE_ES_DISJUNCTION_DESIGNATOR) - { - RtecScheduler::Preemption_Priority_t q = - ::Preemption_Priority (scheduler, (*iter).rt_info, - ACE_TRY_ENV); - ACE_TRY_CHECK; - if (rt_info_ == 0 || q < p) - { - this->rt_info_ = ((*iter).rt_info); - p = q; - } - } - } - ACE_CATCHANY - { - // Ignore exceptions... - } - ACE_ENDTRY; - } - } + RtecScheduler::Preemption_Priority_t p = + ACE_Scheduler_MIN_PREEMPTION_PRIORITY; + while (iter.advance_dependency () == 0) + { + ACE_DECLARE_NEW_CORBA_ENV; + ACE_TRY + { + RtecEventComm::EventType &type = (*iter).event.header.type; + + if (type != ACE_ES_GLOBAL_DESIGNATOR && + type != ACE_ES_CONJUNCTION_DESIGNATOR && + type != ACE_ES_DISJUNCTION_DESIGNATOR) + { + RtecScheduler::Preemption_Priority_t q = + ::Preemption_Priority (scheduler, (*iter).rt_info, + ACE_TRY_ENV); + ACE_TRY_CHECK; + if (rt_info_ == 0 || q < p) + { + this->rt_info_ = ((*iter).rt_info); + p = q; + } + } + } + ACE_CATCHANY + { + // Ignore exceptions... + } + ACE_ENDTRY; + } + } // Report to the consumer module that consumer_ has shutdown. virtual int execute (u_long &command_action) - { - consumer_module_->shutdown_request (this); - command_action = ACE_RT_Task_Command::RELEASE; - return 0; - } + { + consumer_module_->shutdown_request (this); + command_action = ACE_RT_Task_Command::RELEASE; + return 0; + } #if 0 // @@ Memory allocators void *operator new (size_t /* nbytes */) - { return ::new char[sizeof (Shutdown_Consumer)]; } + { return ::new char[sizeof (Shutdown_Consumer)]; } void operator delete (void *buf) - { ::delete [] ACE_static_cast(char*,buf); } + { ::delete [] ACE_static_cast(char*,buf); } #endif /* 0 */ // The module that we report to. ACE_ES_Consumer_Module *consumer_module_; }; -// ************************************************************ - class TAO_ORBSVCS_Export Shutdown_Channel : public ACE_ES_Dispatch_Request { public: @@ -238,16 +308,14 @@ public: ACE_EventChannel *channel_; }; -// ************************************************************ - class TAO_ORBSVCS_Export Flush_Queue_ACT : public ACE_Command_Base -// = TITLE -// Flush Queue Asynchronous Completion Token -// -// = DESCRIPTION -// Carries a single dispatch request through the ReactorEx. -// Deletes itself when execute is called. { + // = TITLE + // Flush Queue Asynchronous Completion Token + // + // = DESCRIPTION + // Carries a single dispatch request through the ReactorEx. + // Deletes itself when execute is called. public: Flush_Queue_ACT (ACE_ES_Dispatch_Request *request, ACE_ES_Dispatching_Module *dispatching_module) : @@ -255,31 +323,29 @@ public: dispatching_module_ (dispatching_module) { } virtual int execute (void* /* arg = 0 */) - { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - ACE_ES_Dispatch_Request *request = request_; - dispatching_module_->push (request, ACE_TRY_ENV); - ACE_TRY_CHECK; - delete this; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Flush_Queue_ACT::execute, " - "unexpected exception"); - } - ACE_ENDTRY; - return 0; - } + { + ACE_DECLARE_NEW_CORBA_ENV; + ACE_TRY + { + ACE_ES_Dispatch_Request *request = request_; + dispatching_module_->push (request, ACE_TRY_ENV); + ACE_TRY_CHECK; + delete this; + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "Flush_Queue_ACT::execute, " + "unexpected exception"); + } + ACE_ENDTRY; + return 0; + } ACE_ES_Dispatch_Request *request_; ACE_ES_Dispatching_Module *dispatching_module_; }; -// ************************************************************ - void dump_event (const RtecEventComm::Event &event) { @@ -292,8 +358,6 @@ dump_event (const RtecEventComm::Event &event) ORBSVCS_Time::to_hrtime (event.header.creation_time) / 1)); } -// ************************************************************ - ACE_Push_Supplier_Proxy::ACE_Push_Supplier_Proxy (ACE_ES_Supplier_Module *sm) : supplier_module_ (sm), push_supplier_ (0) @@ -401,8 +465,6 @@ ACE_Push_Supplier_Proxy::shutdown (void) ACE_ENDTRY; } -// ************************************************************ - ACE_Push_Consumer_Proxy::ACE_Push_Consumer_Proxy (ACE_ES_Consumer_Module *cm) : push_consumer_ (0), consumer_module_ (cm) @@ -499,8 +561,6 @@ ACE_Push_Consumer_Proxy::shutdown (void) ACE_ENDTRY; } -// ************************************************************ - ACE_EventChannel::ACE_EventChannel (RtecScheduler::Scheduler_ptr scheduler, CORBA::Boolean activate_threads, u_long type, @@ -906,8 +966,6 @@ ACE_EventChannel::schedule_timer (RtecScheduler::handle_t rt_info, tv_interval); } -// **************************************************************** - ACE_EventChannel::Observer_Entry::Observer_Entry (void) : handle (0) { @@ -920,9 +978,6 @@ ACE_EventChannel::Observer_Entry::Observer_Entry (RtecEventChannelAdmin::Observe { } - -// **************************************************************** - ACE_ES_Disjunction_Group::~ACE_ES_Disjunction_Group (void) { } @@ -931,8 +986,6 @@ ACE_ES_Conjunction_Group::~ACE_ES_Conjunction_Group (void) { } -// ************************************************************ - ACE_ES_Subscription_Info::~ACE_ES_Subscription_Info (void) { Subscriber_Map_Iterator iter (type_subscribers_); @@ -1069,7 +1122,6 @@ ACE_ES_Subscription_Info::remove (SourceID_Map &source_subscribers, return 0; } - void ACE_ES_Subscription_Info::append_subscribers (Subscriber_Set &dest, Subscriber_Set &src) @@ -1178,8 +1230,6 @@ ACE_ES_Subscription_Info::insert_or_fail (Subscriber_Map &type_map, return 0; } -// ************************************************************ - ACE_ES_Consumer_Module::ACE_ES_Consumer_Module (ACE_EventChannel* channel) : lock_ (), all_consumers_ (), @@ -1547,8 +1597,6 @@ ACE_ES_Consumer_Module::fill_qos (RtecEventChannelAdmin::ConsumerQOS& c_qos) // ACE_DEBUG ((LM_DEBUG, "EC (%t) Consumer::fill_qos - %d\n", cc)); } -// ************************************************************ - ACE_ES_Correlation_Module::ACE_ES_Correlation_Module (ACE_EventChannel *channel) : channel_ (channel), up_ (0), @@ -1718,8 +1766,6 @@ ACE_ES_Correlation_Module::shutdown (void) up_->shutdown (); } -// ************************************************************ - ACE_ES_Consumer_Correlation::ACE_ES_Consumer_Correlation (void) : correlation_module_ (0), type_id_index_ (0), @@ -2265,9 +2311,6 @@ ACE_ES_Consumer_Correlation::correlate (ACE_ES_Consumer_Rep *cr, return request; } - -// ************************************************************ - ACE_ES_Consumer_Rep::~ACE_ES_Consumer_Rep (void) { } @@ -2279,8 +2322,6 @@ ACE_ES_Consumer_Rep::execute (void* /* arg */) return -1; } -// ************************************************************ - int ACE_ES_Consumer_Rep_Timeout::execute (void* /* arg */) { @@ -2308,8 +2349,6 @@ ACE_ES_Consumer_Rep_Timeout::execute (void* /* arg */) return 0; } -// ************************************************************ - ACE_ES_Subscription_Module::ACE_ES_Subscription_Module (ACE_EventChannel *channel) : channel_ (channel), up_ (0), @@ -3256,8 +3295,6 @@ ACE_ES_Subscription_Module::shutdown (void) up_->shutdown (); } -// ************************************************************ - ACE_ES_Supplier_Module::ACE_ES_Supplier_Module (ACE_EventChannel *channel) : all_suppliers_ (), lock_ (), @@ -3483,81 +3520,3 @@ ACE_ES_Supplier_Module::fill_qos (RtecEventChannelAdmin::SupplierQOS& s_qos) } pub.length (sc); } - -// ************************************************************ - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class ACE_Atomic_Op<ACE_ES_MUTEX, int>; -template class ACE_Map_Entry<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT>; -template class ACE_Map_Entry<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT>; -template class ACE_Map_Entry<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry>; -template class ACE_Map_Manager<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>; -template class ACE_Map_Manager<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>; -template class ACE_Map_Manager<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex>; -template class ACE_Map_Iterator_Base<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>; -template class ACE_Map_Iterator_Base<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>; -template class ACE_Map_Iterator_Base<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex>; -template class ACE_Map_Iterator<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>; -template class ACE_Map_Iterator<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex>; -template class ACE_Map_Reverse_Iterator<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH>; -template class ACE_Map_Iterator<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>; -template class ACE_Map_Reverse_Iterator<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH>; -template class ACE_Map_Reverse_Iterator<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex>; -template class ACE_Node<ACE_ES_Consumer_Rep *>; -template class ACE_Node<ACE_Push_Consumer_Proxy *>; -template class ACE_Node<ACE_Push_Supplier_Proxy *>; -template class ACE_Unbounded_Set<ACE_ES_Consumer_Rep *>; -template class ACE_Unbounded_Set<ACE_Push_Consumer_Proxy *>; -template class ACE_Unbounded_Set<ACE_Push_Supplier_Proxy *>; -template class ACE_Unbounded_Set_Iterator<ACE_ES_Consumer_Rep *>; -template class ACE_Unbounded_Set_Iterator<ACE_Push_Consumer_Proxy *>; -template class ACE_Unbounded_Set_Iterator<ACE_Push_Supplier_Proxy *>; - -template class ACE_Auto_Basic_Ptr<ACE_Push_Supplier_Proxy>; -template class ACE_Auto_Basic_Ptr<ACE_Push_Consumer_Proxy>; -template class auto_ptr<ACE_Push_Supplier_Proxy>; -template class auto_ptr<ACE_Push_Consumer_Proxy>; - -template class ACE_Array<TAO_EC_Event>; -template class ACE_Array_Base<TAO_EC_Event>; -template class ACE_Array_Iterator<TAO_EC_Event>; - -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_Atomic_Op<ACE_ES_MUTEX, int> -#pragma instantiate ACE_Map_Entry<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT> -#pragma instantiate ACE_Map_Entry<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT> -#pragma instantiate ACE_Map_Entry<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry> -#pragma instantiate ACE_Map_Manager<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH> -#pragma instantiate ACE_Map_Manager<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH> -#pragma instantiate ACE_Map_Manager<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex> -#pragma instantiate ACE_Map_Iterator_Base<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH> -#pragma instantiate ACE_Map_Iterator_Base<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH> -#pragma instantiate ACE_Map_Iterator_Base<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex> -#pragma instantiate ACE_Map_Iterator<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH> -#pragma instantiate ACE_Map_Iterator<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex> -#pragma instantiate ACE_Map_Reverse_Iterator<ACE_ES_Subscription_Info::EXT, ACE_ES_Subscription_Info::INT, ACE_ES_Subscription_Info::SYNCH> -#pragma instantiate ACE_Map_Iterator<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH> -#pragma instantiate ACE_Map_Reverse_Iterator<ACE_ES_Subscription_Info::sEXT, ACE_ES_Subscription_Info::sINT, ACE_ES_Subscription_Info::SYNCH> -#pragma instantiate ACE_Map_Reverse_Iterator<RtecEventChannelAdmin::Observer_Handle, ACE_EventChannel::Observer_Entry, ACE_Null_Mutex> -#pragma instantiate ACE_Node<ACE_ES_Consumer_Rep *> -#pragma instantiate ACE_Node<ACE_Push_Consumer_Proxy *> -#pragma instantiate ACE_Node<ACE_Push_Supplier_Proxy *> -#pragma instantiate ACE_Unbounded_Set<ACE_ES_Consumer_Rep *> -#pragma instantiate ACE_Unbounded_Set<ACE_Push_Consumer_Proxy *> -#pragma instantiate ACE_Unbounded_Set<ACE_Push_Supplier_Proxy *> -#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_ES_Consumer_Rep *> -#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Push_Consumer_Proxy *> -#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Push_Supplier_Proxy *> - -#pragma instantiate ACE_Auto_Basic_Ptr<ACE_Push_Supplier_Proxy> -#pragma instantiate ACE_Auto_Basic_Ptr<ACE_Push_Consumer_Proxy> -#pragma instantiate auto_ptr<ACE_Push_Supplier_Proxy> -#pragma instantiate auto_ptr<ACE_Push_Consumer_Proxy> - -#pragma instantiate ACE_Array<TAO_EC_Event> -#pragma instantiate ACE_Array_Base<TAO_EC_Event> -#pragma instantiate ACE_Array_Iterator<TAO_EC_Event> - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp index e72b7058052..7325cae1356 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp @@ -4,6 +4,40 @@ #include "Persistent_Naming_Context.h" #include "ace/Auto_Ptr.h" +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class ACE_Auto_Basic_Ptr<TAO_Naming_Context>; +template class ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX>; +template class ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX> >; +template class ACE_Hash_Map_With_Allocator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId>; +template class ACE_Hash_Map_Manager<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Null_Mutex>; +template class ACE_Hash_Map_Manager_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex>; +template class ACE_Hash_Map_Entry<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId>; +template class ACE_Hash<TAO_Persistent_Index_ExtId>; +template class ACE_Equal_To<TAO_Persistent_Index_ExtId>; +template class ACE_Hash_Map_Iterator_Base_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex>; +template class ACE_Hash_Map_Reverse_Iterator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Null_Mutex>; +template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex>; +template class ACE_Auto_Basic_Ptr<ACE_Hash_Map_With_Allocator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId>::ITERATOR>; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate ACE_Auto_Basic_Ptr<TAO_Naming_Context> +#pragma instantiate ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX> +#pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX> > +#pragma instantiate ACE_Hash_Map_With_Allocator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId> +#pragma instantiate ACE_Hash_Map_Manager<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Manager_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Entry<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId> +#pragma instantiate ACE_Hash<TAO_Persistent_Index_ExtId> +#pragma instantiate ACE_Equal_To<TAO_Persistent_Index_ExtId> +#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Reverse_Iterator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Null_Mutex> +#pragma instantiate ACE_Auto_Basic_Ptr<ACE_Hash_Map_With_Allocator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId>::ITERATOR> +#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + int TAO_Persistent_Context_Index::unbind (const char *poa_id) { @@ -301,37 +335,3 @@ TAO_Persistent_Context_Index::create_index_helper (void *buffer) -1); return 0; } - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Auto_Basic_Ptr<TAO_Naming_Context>; -template class ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX>; -template class ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX> >; -template class ACE_Hash_Map_With_Allocator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId>; -template class ACE_Hash_Map_Manager<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Null_Mutex>; -template class ACE_Hash_Map_Manager_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex>; -template class ACE_Hash_Map_Entry<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId>; -template class ACE_Hash<TAO_Persistent_Index_ExtId>; -template class ACE_Equal_To<TAO_Persistent_Index_ExtId>; -template class ACE_Hash_Map_Iterator_Base_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex>; -template class ACE_Hash_Map_Reverse_Iterator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Null_Mutex>; -template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex>; -template class ACE_Auto_Basic_Ptr<ACE_Hash_Map_With_Allocator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId>::ITERATOR>; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Auto_Basic_Ptr<TAO_Naming_Context> -#pragma instantiate ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX> -#pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX> > -#pragma instantiate ACE_Hash_Map_With_Allocator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId> -#pragma instantiate ACE_Hash_Map_Manager<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Manager_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Entry<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId> -#pragma instantiate ACE_Hash<TAO_Persistent_Index_ExtId> -#pragma instantiate ACE_Equal_To<TAO_Persistent_Index_ExtId> -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Null_Mutex> -#pragma instantiate ACE_Auto_Basic_Ptr<ACE_Hash_Map_With_Allocator<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId>::ITERATOR> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_Persistent_Index_ExtId, TAO_Persistent_Index_IntId, ACE_Hash<TAO_Persistent_Index_ExtId>, ACE_Equal_To<TAO_Persistent_Index_ExtId>, ACE_Null_Mutex> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp index e3c6feb2609..b5a97485073 100644 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp +++ b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp @@ -14,14 +14,11 @@ ACE_RCSID(EC_Custom_Marshal, ECM_Supplier, "$Id$") -int -main (int argc, char *argv []) -{ - ECMS_Driver driver; - return driver.run (argc, argv); -} - -// **************************************************************** +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class ACE_PushSupplier_Adapter<Test_Supplier>; +#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate ACE_PushSupplier_Adapter<Test_Supplier> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ ECMS_Driver::ECMS_Driver (void) : n_suppliers_ (1), @@ -184,7 +181,7 @@ ECMS_Driver::run (int argc, char* argv[]) int ECMS_Driver::supplier_task (Test_Supplier *supplier, - void* /* cookie */) + void* /* cookie */) { ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY @@ -204,7 +201,7 @@ ECMS_Driver::supplier_task (Test_Supplier *supplier, for (CORBA::ULong j = 0; j < n; ++j) { info.trajectory[j].x = j; - info.trajectory[j].y = j*j; + info.trajectory[j].y = j * j; other.inventory.bind (j, j + 1); } @@ -287,7 +284,7 @@ ECMS_Driver::supplier_task (Test_Supplier *supplier, void ECMS_Driver::connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr channel, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Environment &ACE_TRY_ENV) { for (int i = 0; i < this->n_suppliers_; ++i) { @@ -413,8 +410,6 @@ ECMS_Driver::parse_args (int argc, char *argv []) return 0; } -// **************************************************************** - Test_Supplier::Test_Supplier (ECMS_Driver *driver) : driver_ (driver), supplier_ (this) @@ -498,10 +493,9 @@ Test_Supplier::consumer_proxy (void) return this->consumer_proxy_.in (); } -// **************************************************************** - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_PushSupplier_Adapter<Test_Supplier>; -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_PushSupplier_Adapter<Test_Supplier> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +int +main (int argc, char *argv []) +{ + ECMS_Driver driver; + return driver.run (argc, argv); +} diff --git a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp index 65590386122..3472e18943f 100644 --- a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp +++ b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp @@ -20,6 +20,12 @@ ACE_RCSID(EC_Mcast, EC_Mcast, "$Id$") +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class ACE_PushConsumer_Adapter<ECM_Supplier>; +#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate ACE_PushConsumer_Adapter<ECM_Supplier> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + ECM_Driver::ECM_Driver (void) : event_period_ (250000), event_count_ (100), @@ -1120,9 +1126,6 @@ ECM_Local_Federation::subscribed_bit (int i) const return this->subscription_subset_[i]; } - -// **************************************************************** - int main (int argc, char *argv []) { @@ -1131,9 +1134,3 @@ main (int argc, char *argv []) ECM_Driver driver; return driver.run (argc, argv); } - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_PushConsumer_Adapter<ECM_Supplier>; -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_PushConsumer_Adapter<ECM_Supplier> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp index 04271691c56..06c84e12c58 100644 --- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp +++ b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp @@ -24,6 +24,16 @@ ACE_RCSID(EC_Multiple, EC_Multiple, "$Id$") +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class ACE_Auto_Basic_Ptr<POA_RtecScheduler::Scheduler>; +template class ACE_PushConsumer_Adapter<Test_Supplier>; +template class auto_ptr<POA_RtecScheduler::Scheduler>; +#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate ACE_Auto_Basic_Ptr<POA_RtecScheduler::Scheduler> +#pragma instantiate ACE_PushConsumer_Adapter<Test_Supplier> +#pragma instantiate auto_ptr<POA_RtecScheduler::Scheduler> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + Test_ECG::Test_ECG (void) : lcl_name_ ("Test_ECG"), rmt_name_ (0), @@ -56,8 +66,6 @@ Test_ECG::Test_ECG (void) { } - - void print_priority_info (const char *const name) { @@ -1276,8 +1284,6 @@ Test_ECG::parse_args (int argc, char *argv []) return 0; } -// **************************************************************** - Test_Supplier::Test_Supplier (Test_ECG *test, void *cookie) : test_ (test), @@ -1524,8 +1530,6 @@ int Test_Supplier::supplier_id (void) const return this->supplier_id_; } -// **************************************************************** - Test_Consumer::Test_Consumer (Test_ECG *test, void *cookie) : test_ (test), @@ -1613,28 +1617,19 @@ Test_Consumer::disconnect_push_consumer (CORBA::Environment &) { } -// **************************************************************** - int main (int argc, char *argv []) { Test_ECG *test; + // Dynamically allocate the Test_ECG instance so that we don't have // to worry about running out of stack space if it's large. - ACE_NEW_RETURN (test, Test_ECG, -1); + ACE_NEW_RETURN (test, + Test_ECG, + -1); const int status = test->run (argc, argv); delete test; return status; } - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Auto_Basic_Ptr<POA_RtecScheduler::Scheduler>; -template class ACE_PushConsumer_Adapter<Test_Supplier>; -template class auto_ptr<POA_RtecScheduler::Scheduler>; -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Auto_Basic_Ptr<POA_RtecScheduler::Scheduler> -#pragma instantiate ACE_PushConsumer_Adapter<Test_Supplier> -#pragma instantiate auto_ptr<POA_RtecScheduler::Scheduler> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp index 3c9c6306667..28de5b5bfcd 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp @@ -14,6 +14,12 @@ ACE_RCSID(EC_Throughput, ECT_Supplier, "$Id$") +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class ACE_PushSupplier_Adapter<Test_Supplier>; +#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate ACE_PushSupplier_Adapter<Test_Supplier> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + Test_Supplier::Test_Supplier (ECT_Driver *driver) : driver_ (driver), supplier_ (this), @@ -244,11 +250,3 @@ Test_Supplier::accumulate (ACE_Throughput_Stats& stats) const { stats.accumulate (this->throughput_); } - -// **************************************************************** - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_PushSupplier_Adapter<Test_Supplier>; -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_PushSupplier_Adapter<Test_Supplier> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/Event/Basic/Timeout.cpp b/TAO/orbsvcs/tests/Event/Basic/Timeout.cpp index 2999b667ffb..e5e5343fa72 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Timeout.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Timeout.cpp @@ -9,6 +9,205 @@ ACE_RCSID(EC_Tests, Timeout, "$Id$") +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class ACE_PushConsumer_Adapter<Supplier>; +#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate ACE_PushConsumer_Adapter<Supplier> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +Consumer::Consumer (const char* name) + : event_count (0), + name_ (name) +{ +} + +void +Consumer::connect (RtecEventChannelAdmin::ConsumerAdmin_ptr consumer_admin, + const RtecEventChannelAdmin::ConsumerQOS &qos, + CORBA::Environment &ACE_TRY_ENV) +{ + // The canonical protocol to connect to the EC + + RtecEventComm::PushConsumer_var consumer = + this->_this (ACE_TRY_ENV); + ACE_CHECK; + + this->supplier_proxy_ = + consumer_admin->obtain_push_supplier (ACE_TRY_ENV); + ACE_CHECK; + + this->supplier_proxy_->connect_push_consumer (consumer.in (), + qos, + ACE_TRY_ENV); + ACE_CHECK; +} + +void +Consumer::disconnect (CORBA::Environment &ACE_TRY_ENV) +{ + this->supplier_proxy_->disconnect_push_supplier (ACE_TRY_ENV); + ACE_CHECK; + + PortableServer::POA_var consumer_poa = + this->_default_POA (ACE_TRY_ENV); + ACE_CHECK; + PortableServer::ObjectId_var consumer_id = + consumer_poa->servant_to_id (this, ACE_TRY_ENV); + ACE_CHECK; + consumer_poa->deactivate_object (consumer_id.in (), ACE_TRY_ENV); + ACE_CHECK; +} + +void +Consumer::push (const RtecEventComm::EventSet& events, + CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + if (events.length () == 0) + { + ACE_DEBUG ((LM_DEBUG, + "%s (%P|%t) no events\n", this->name_)); + return; + } + + this->event_count ++; +#if 0 + if (this->event_count % 10 == 0) + { + ACE_DEBUG ((LM_DEBUG, + "%s (%P|%t): %d events received\n", + this->name_, + this->event_count)); + } +#endif /* 0 */ +} + +void +Consumer::disconnect_push_consumer (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ +} + +// **************************************************************** + +Supplier::Supplier (void) + : consumer_adapter_ (this), + event_type_ (ACE_ES_EVENT_UNDEFINED) +{ +} + +void +Supplier::connect (RtecEventChannelAdmin::EventChannel_ptr event_channel, + int milliseconds, + int event_type, + CORBA::Environment &ACE_TRY_ENV) +{ + this->event_type_ = event_type; + + // The canonical protocol to connect to the EC + RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = + event_channel->for_consumers (ACE_TRY_ENV); + ACE_CHECK; + + RtecEventComm::PushConsumer_var consumer = + this->consumer_adapter_._this (ACE_TRY_ENV); + ACE_CHECK; + + this->supplier_proxy_ = + consumer_admin->obtain_push_supplier (ACE_TRY_ENV); + ACE_CHECK; + + // Let's say that the execution time for event 2 is 1 + // milliseconds... + ACE_Time_Value tv (0, milliseconds * 1000); + TimeBase::TimeT time; + ORBSVCS_Time::Time_Value_to_TimeT (time, tv); + + ACE_ConsumerQOS_Factory consumer_qos; + consumer_qos.start_disjunction_group (); + consumer_qos.insert_time (ACE_ES_EVENT_INTERVAL_TIMEOUT, + time, + 0); + + this->supplier_proxy_->connect_push_consumer (consumer.in (), + consumer_qos.get_ConsumerQOS (), + ACE_TRY_ENV); + ACE_CHECK; + + RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = + event_channel->for_suppliers (ACE_TRY_ENV); + ACE_CHECK; + + RtecEventComm::PushSupplier_var supplier = + this->_this (ACE_TRY_ENV); + ACE_CHECK; + + this->consumer_proxy_ = + supplier_admin->obtain_push_consumer (ACE_TRY_ENV); + ACE_CHECK; + + ACE_SupplierQOS_Factory supplier_qos; + supplier_qos.insert (1, this->event_type_, 0, 1); + + this->consumer_proxy_->connect_push_supplier (supplier.in (), + supplier_qos.get_SupplierQOS (), + ACE_TRY_ENV); + ACE_CHECK; +} + +void +Supplier::disconnect (CORBA::Environment &ACE_TRY_ENV) +{ + this->supplier_proxy_->disconnect_push_supplier (ACE_TRY_ENV); + ACE_CHECK; + + PortableServer::POA_var consumer_poa = + this->consumer_adapter_._default_POA (ACE_TRY_ENV); + ACE_CHECK; + PortableServer::ObjectId_var consumer_id = + consumer_poa->servant_to_id (&this->consumer_adapter_, ACE_TRY_ENV); + ACE_CHECK; + consumer_poa->deactivate_object (consumer_id.in (), ACE_TRY_ENV); + ACE_CHECK; + + this->consumer_proxy_->disconnect_push_consumer (ACE_TRY_ENV); + ACE_CHECK; + + PortableServer::POA_var supplier_poa = + this->_default_POA (ACE_TRY_ENV); + ACE_CHECK; + PortableServer::ObjectId_var supplier_id = + supplier_poa->servant_to_id (this, ACE_TRY_ENV); + ACE_CHECK; + supplier_poa->deactivate_object (supplier_id.in (), ACE_TRY_ENV); + ACE_CHECK; +} + +void +Supplier::push (const RtecEventComm::EventSet&, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + RtecEventComm::EventSet event (1); + event.length (1); + event[0].header.type = this->event_type_; + event[0].header.source = 0; + + this->consumer_proxy_->push (event, ACE_TRY_ENV); +} + +void +Supplier::disconnect_push_consumer (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ +} + +void +Supplier::disconnect_push_supplier (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ +} + int main (int argc, char* argv[]) { @@ -227,210 +426,3 @@ main (int argc, char* argv[]) ACE_ENDTRY; return 0; } - -// **************************************************************** - -Consumer::Consumer (const char* name) - : event_count (0), - name_ (name) -{ -} - -void -Consumer::connect (RtecEventChannelAdmin::ConsumerAdmin_ptr consumer_admin, - const RtecEventChannelAdmin::ConsumerQOS &qos, - CORBA::Environment &ACE_TRY_ENV) -{ - // The canonical protocol to connect to the EC - - RtecEventComm::PushConsumer_var consumer = - this->_this (ACE_TRY_ENV); - ACE_CHECK; - - this->supplier_proxy_ = - consumer_admin->obtain_push_supplier (ACE_TRY_ENV); - ACE_CHECK; - - this->supplier_proxy_->connect_push_consumer (consumer.in (), - qos, - ACE_TRY_ENV); - ACE_CHECK; -} - -void -Consumer::disconnect (CORBA::Environment &ACE_TRY_ENV) -{ - this->supplier_proxy_->disconnect_push_supplier (ACE_TRY_ENV); - ACE_CHECK; - - PortableServer::POA_var consumer_poa = - this->_default_POA (ACE_TRY_ENV); - ACE_CHECK; - PortableServer::ObjectId_var consumer_id = - consumer_poa->servant_to_id (this, ACE_TRY_ENV); - ACE_CHECK; - consumer_poa->deactivate_object (consumer_id.in (), ACE_TRY_ENV); - ACE_CHECK; -} - -void -Consumer::push (const RtecEventComm::EventSet& events, - CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - if (events.length () == 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s (%P|%t) no events\n", this->name_)); - return; - } - - this->event_count ++; -#if 0 - if (this->event_count % 10 == 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s (%P|%t): %d events received\n", - this->name_, - this->event_count)); - } -#endif /* 0 */ -} - -void -Consumer::disconnect_push_consumer (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -} - -// **************************************************************** - -Supplier::Supplier (void) - : consumer_adapter_ (this), - event_type_ (ACE_ES_EVENT_UNDEFINED) -{ -} - -void -Supplier::connect (RtecEventChannelAdmin::EventChannel_ptr event_channel, - int milliseconds, - int event_type, - CORBA::Environment &ACE_TRY_ENV) -{ - this->event_type_ = event_type; - - // The canonical protocol to connect to the EC - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = - event_channel->for_consumers (ACE_TRY_ENV); - ACE_CHECK; - - RtecEventComm::PushConsumer_var consumer = - this->consumer_adapter_._this (ACE_TRY_ENV); - ACE_CHECK; - - this->supplier_proxy_ = - consumer_admin->obtain_push_supplier (ACE_TRY_ENV); - ACE_CHECK; - - // Let's say that the execution time for event 2 is 1 - // milliseconds... - ACE_Time_Value tv (0, milliseconds * 1000); - TimeBase::TimeT time; - ORBSVCS_Time::Time_Value_to_TimeT (time, tv); - - ACE_ConsumerQOS_Factory consumer_qos; - consumer_qos.start_disjunction_group (); - consumer_qos.insert_time (ACE_ES_EVENT_INTERVAL_TIMEOUT, - time, - 0); - - this->supplier_proxy_->connect_push_consumer (consumer.in (), - consumer_qos.get_ConsumerQOS (), - ACE_TRY_ENV); - ACE_CHECK; - - RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = - event_channel->for_suppliers (ACE_TRY_ENV); - ACE_CHECK; - - RtecEventComm::PushSupplier_var supplier = - this->_this (ACE_TRY_ENV); - ACE_CHECK; - - this->consumer_proxy_ = - supplier_admin->obtain_push_consumer (ACE_TRY_ENV); - ACE_CHECK; - - ACE_SupplierQOS_Factory supplier_qos; - supplier_qos.insert (1, this->event_type_, 0, 1); - - this->consumer_proxy_->connect_push_supplier (supplier.in (), - supplier_qos.get_SupplierQOS (), - ACE_TRY_ENV); - ACE_CHECK; -} - -void -Supplier::disconnect (CORBA::Environment &ACE_TRY_ENV) -{ - this->supplier_proxy_->disconnect_push_supplier (ACE_TRY_ENV); - ACE_CHECK; - - PortableServer::POA_var consumer_poa = - this->consumer_adapter_._default_POA (ACE_TRY_ENV); - ACE_CHECK; - PortableServer::ObjectId_var consumer_id = - consumer_poa->servant_to_id (&this->consumer_adapter_, ACE_TRY_ENV); - ACE_CHECK; - consumer_poa->deactivate_object (consumer_id.in (), ACE_TRY_ENV); - ACE_CHECK; - - this->consumer_proxy_->disconnect_push_consumer (ACE_TRY_ENV); - ACE_CHECK; - - PortableServer::POA_var supplier_poa = - this->_default_POA (ACE_TRY_ENV); - ACE_CHECK; - PortableServer::ObjectId_var supplier_id = - supplier_poa->servant_to_id (this, ACE_TRY_ENV); - ACE_CHECK; - supplier_poa->deactivate_object (supplier_id.in (), ACE_TRY_ENV); - ACE_CHECK; -} - -void -Supplier::push (const RtecEventComm::EventSet&, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - RtecEventComm::EventSet event (1); - event.length (1); - event[0].header.type = this->event_type_; - event[0].header.source = 0; - - this->consumer_proxy_->push (event, ACE_TRY_ENV); -} - -void -Supplier::disconnect_push_consumer (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -} - -void -Supplier::disconnect_push_supplier (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -} - -// **************************************************************** - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class ACE_PushConsumer_Adapter<Supplier>; - -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_PushConsumer_Adapter<Supplier> - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/Event/Basic/Wildcard.cpp b/TAO/orbsvcs/tests/Event/Basic/Wildcard.cpp index 78b57c87ed0..707257855c7 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Wildcard.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Wildcard.cpp @@ -9,6 +9,240 @@ ACE_RCSID(EC_Tests, Wildcard, "$Id$") +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class ACE_PushConsumer_Adapter<Supplier>; +#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate ACE_PushConsumer_Adapter<Supplier> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +Consumer::Consumer (const char* name) + : event_count (0), + name_ (name) +{ +} + +void +Consumer::connect (RtecEventChannelAdmin::ConsumerAdmin_ptr consumer_admin, + const RtecEventChannelAdmin::ConsumerQOS &qos, + CORBA::Environment &ACE_TRY_ENV) +{ + // The canonical protocol to connect to the EC + + RtecEventComm::PushConsumer_var consumer = + this->_this (ACE_TRY_ENV); + ACE_CHECK; + + this->supplier_proxy_ = + consumer_admin->obtain_push_supplier (ACE_TRY_ENV); + ACE_CHECK; + + this->supplier_proxy_->connect_push_consumer (consumer.in (), + qos, + ACE_TRY_ENV); + ACE_CHECK; +} + +void +Consumer::disconnect (CORBA::Environment &ACE_TRY_ENV) +{ + this->supplier_proxy_->disconnect_push_supplier (ACE_TRY_ENV); + ACE_CHECK; + + PortableServer::POA_var consumer_poa = + this->_default_POA (ACE_TRY_ENV); + ACE_CHECK; + PortableServer::ObjectId_var consumer_id = + consumer_poa->servant_to_id (this, ACE_TRY_ENV); + ACE_CHECK; + consumer_poa->deactivate_object (consumer_id.in (), ACE_TRY_ENV); + ACE_CHECK; +} + +void +Consumer::dump_results (int expected_count, int tolerance) +{ + int diff = this->event_count - expected_count; + if (diff > tolerance || diff < -tolerance) + { + ACE_DEBUG ((LM_DEBUG, + "ERROR - %s unexpected number of events <%d>\n", + this->name_, + this->event_count)); + } + else + { + ACE_DEBUG ((LM_DEBUG, + "%s - number of events <%d> within margins\n", + this->name_, + this->event_count)); + } +} + +void +Consumer::push (const RtecEventComm::EventSet& events, + CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + if (events.length () == 0) + { + ACE_DEBUG ((LM_DEBUG, + "%s (%P|%t) no events\n", this->name_)); + return; + } + + this->event_count ++; +#if 0 + if (this->event_count % 10 == 0) + { + ACE_DEBUG ((LM_DEBUG, + "%s (%P|%t): %d events received\n", + this->name_, + this->event_count)); + } +#endif /* 0 */ +} + +void +Consumer::disconnect_push_consumer (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ +} + +Supplier::Supplier (void) + : consumer_adapter_ (this), + event_source_ (-1), + event_type_ (ACE_ES_EVENT_UNDEFINED) +{ +} + +void +Supplier::connect (RtecEventChannelAdmin::EventChannel_ptr event_channel, + int milliseconds, + int published_source, + int published_type, + int event_source, + int event_type, + CORBA::Environment &ACE_TRY_ENV) +{ + this->event_source_ = event_source; + this->event_type_ = event_type; + + // The canonical protocol to connect to the EC + RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = + event_channel->for_consumers (ACE_TRY_ENV); + ACE_CHECK; + + RtecEventComm::PushConsumer_var consumer = + this->consumer_adapter_._this (ACE_TRY_ENV); + ACE_CHECK; + + this->supplier_proxy_ = + consumer_admin->obtain_push_supplier (ACE_TRY_ENV); + ACE_CHECK; + + // Let's say that the execution time for event 2 is 1 + // milliseconds... + ACE_Time_Value tv (0, milliseconds * 1000); + TimeBase::TimeT time; + ORBSVCS_Time::Time_Value_to_TimeT (time, tv); + + ACE_ConsumerQOS_Factory consumer_qos; + consumer_qos.start_disjunction_group (); + consumer_qos.insert_time (ACE_ES_EVENT_INTERVAL_TIMEOUT, + time, + 0); + + this->supplier_proxy_->connect_push_consumer (consumer.in (), + consumer_qos.get_ConsumerQOS (), + ACE_TRY_ENV); + ACE_CHECK; + + RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = + event_channel->for_suppliers (ACE_TRY_ENV); + ACE_CHECK; + + RtecEventComm::PushSupplier_var supplier = + this->_this (ACE_TRY_ENV); + ACE_CHECK; + + this->consumer_proxy_ = + supplier_admin->obtain_push_consumer (ACE_TRY_ENV); + ACE_CHECK; + + ACE_SupplierQOS_Factory supplier_qos; + supplier_qos.insert (published_source, + published_type, + 0, 1); + + this->consumer_proxy_->connect_push_supplier (supplier.in (), + supplier_qos.get_SupplierQOS (), + ACE_TRY_ENV); + ACE_CHECK; +} + +void +Supplier::disconnect (CORBA::Environment &ACE_TRY_ENV) +{ + this->supplier_proxy_->disconnect_push_supplier (ACE_TRY_ENV); + ACE_CHECK; + + PortableServer::POA_var consumer_poa = + this->consumer_adapter_._default_POA (ACE_TRY_ENV); + ACE_CHECK; + PortableServer::ObjectId_var consumer_id = + consumer_poa->servant_to_id (&this->consumer_adapter_, ACE_TRY_ENV); + ACE_CHECK; + consumer_poa->deactivate_object (consumer_id.in (), ACE_TRY_ENV); + ACE_CHECK; + + this->consumer_proxy_->disconnect_push_consumer (ACE_TRY_ENV); + ACE_CHECK; + + PortableServer::POA_var supplier_poa = + this->_default_POA (ACE_TRY_ENV); + ACE_CHECK; + PortableServer::ObjectId_var supplier_id = + supplier_poa->servant_to_id (this, ACE_TRY_ENV); + ACE_CHECK; + supplier_poa->deactivate_object (supplier_id.in (), ACE_TRY_ENV); + ACE_CHECK; +} + +void +Supplier::push (const RtecEventComm::EventSet&, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + RtecEventComm::EventSet event (1); + event.length (1); + event[0].header.source = this->event_source_; + event[0].header.type = this->event_type_; + + this->consumer_proxy_->push (event, ACE_TRY_ENV); + +#if 0 + static int event_count = 0; + event_count++; + if (event_count % 10 == 0) + { + ACE_DEBUG ((LM_DEBUG, + "Supplier (%P|%t): %d events sent\n", + event_count)); + } +#endif /* 0 */ +} + +void +Supplier::disconnect_push_consumer (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ +} + +void +Supplier::disconnect_push_supplier (CORBA::Environment &) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ +} int main (int argc, char* argv[]) { @@ -257,248 +491,3 @@ main (int argc, char* argv[]) ACE_ENDTRY; return 0; } - -// **************************************************************** - -Consumer::Consumer (const char* name) - : event_count (0), - name_ (name) -{ -} - -void -Consumer::connect (RtecEventChannelAdmin::ConsumerAdmin_ptr consumer_admin, - const RtecEventChannelAdmin::ConsumerQOS &qos, - CORBA::Environment &ACE_TRY_ENV) -{ - // The canonical protocol to connect to the EC - - RtecEventComm::PushConsumer_var consumer = - this->_this (ACE_TRY_ENV); - ACE_CHECK; - - this->supplier_proxy_ = - consumer_admin->obtain_push_supplier (ACE_TRY_ENV); - ACE_CHECK; - - this->supplier_proxy_->connect_push_consumer (consumer.in (), - qos, - ACE_TRY_ENV); - ACE_CHECK; -} - -void -Consumer::disconnect (CORBA::Environment &ACE_TRY_ENV) -{ - this->supplier_proxy_->disconnect_push_supplier (ACE_TRY_ENV); - ACE_CHECK; - - PortableServer::POA_var consumer_poa = - this->_default_POA (ACE_TRY_ENV); - ACE_CHECK; - PortableServer::ObjectId_var consumer_id = - consumer_poa->servant_to_id (this, ACE_TRY_ENV); - ACE_CHECK; - consumer_poa->deactivate_object (consumer_id.in (), ACE_TRY_ENV); - ACE_CHECK; -} - -void -Consumer::dump_results (int expected_count, int tolerance) -{ - int diff = this->event_count - expected_count; - if (diff > tolerance || diff < -tolerance) - { - ACE_DEBUG ((LM_DEBUG, - "ERROR - %s unexpected number of events <%d>\n", - this->name_, - this->event_count)); - } - else - { - ACE_DEBUG ((LM_DEBUG, - "%s - number of events <%d> within margins\n", - this->name_, - this->event_count)); - } -} - -void -Consumer::push (const RtecEventComm::EventSet& events, - CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - if (events.length () == 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s (%P|%t) no events\n", this->name_)); - return; - } - - this->event_count ++; -#if 0 - if (this->event_count % 10 == 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s (%P|%t): %d events received\n", - this->name_, - this->event_count)); - } -#endif /* 0 */ -} - -void -Consumer::disconnect_push_consumer (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -} - -// **************************************************************** - -Supplier::Supplier (void) - : consumer_adapter_ (this), - event_source_ (-1), - event_type_ (ACE_ES_EVENT_UNDEFINED) -{ -} - -void -Supplier::connect (RtecEventChannelAdmin::EventChannel_ptr event_channel, - int milliseconds, - int published_source, - int published_type, - int event_source, - int event_type, - CORBA::Environment &ACE_TRY_ENV) -{ - this->event_source_ = event_source; - this->event_type_ = event_type; - - // The canonical protocol to connect to the EC - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = - event_channel->for_consumers (ACE_TRY_ENV); - ACE_CHECK; - - RtecEventComm::PushConsumer_var consumer = - this->consumer_adapter_._this (ACE_TRY_ENV); - ACE_CHECK; - - this->supplier_proxy_ = - consumer_admin->obtain_push_supplier (ACE_TRY_ENV); - ACE_CHECK; - - // Let's say that the execution time for event 2 is 1 - // milliseconds... - ACE_Time_Value tv (0, milliseconds * 1000); - TimeBase::TimeT time; - ORBSVCS_Time::Time_Value_to_TimeT (time, tv); - - ACE_ConsumerQOS_Factory consumer_qos; - consumer_qos.start_disjunction_group (); - consumer_qos.insert_time (ACE_ES_EVENT_INTERVAL_TIMEOUT, - time, - 0); - - this->supplier_proxy_->connect_push_consumer (consumer.in (), - consumer_qos.get_ConsumerQOS (), - ACE_TRY_ENV); - ACE_CHECK; - - RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = - event_channel->for_suppliers (ACE_TRY_ENV); - ACE_CHECK; - - RtecEventComm::PushSupplier_var supplier = - this->_this (ACE_TRY_ENV); - ACE_CHECK; - - this->consumer_proxy_ = - supplier_admin->obtain_push_consumer (ACE_TRY_ENV); - ACE_CHECK; - - ACE_SupplierQOS_Factory supplier_qos; - supplier_qos.insert (published_source, - published_type, - 0, 1); - - this->consumer_proxy_->connect_push_supplier (supplier.in (), - supplier_qos.get_SupplierQOS (), - ACE_TRY_ENV); - ACE_CHECK; -} - -void -Supplier::disconnect (CORBA::Environment &ACE_TRY_ENV) -{ - this->supplier_proxy_->disconnect_push_supplier (ACE_TRY_ENV); - ACE_CHECK; - - PortableServer::POA_var consumer_poa = - this->consumer_adapter_._default_POA (ACE_TRY_ENV); - ACE_CHECK; - PortableServer::ObjectId_var consumer_id = - consumer_poa->servant_to_id (&this->consumer_adapter_, ACE_TRY_ENV); - ACE_CHECK; - consumer_poa->deactivate_object (consumer_id.in (), ACE_TRY_ENV); - ACE_CHECK; - - this->consumer_proxy_->disconnect_push_consumer (ACE_TRY_ENV); - ACE_CHECK; - - PortableServer::POA_var supplier_poa = - this->_default_POA (ACE_TRY_ENV); - ACE_CHECK; - PortableServer::ObjectId_var supplier_id = - supplier_poa->servant_to_id (this, ACE_TRY_ENV); - ACE_CHECK; - supplier_poa->deactivate_object (supplier_id.in (), ACE_TRY_ENV); - ACE_CHECK; -} - -void -Supplier::push (const RtecEventComm::EventSet&, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - RtecEventComm::EventSet event (1); - event.length (1); - event[0].header.source = this->event_source_; - event[0].header.type = this->event_type_; - - this->consumer_proxy_->push (event, ACE_TRY_ENV); - -#if 0 - static int event_count = 0; - event_count++; - if (event_count % 10 == 0) - { - ACE_DEBUG ((LM_DEBUG, - "Supplier (%P|%t): %d events sent\n", - event_count)); - } -#endif /* 0 */ -} - -void -Supplier::disconnect_push_consumer (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -} - -void -Supplier::disconnect_push_supplier (CORBA::Environment &) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -} - -// **************************************************************** - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class ACE_PushConsumer_Adapter<Supplier>; - -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_PushConsumer_Adapter<Supplier> - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/DynUnion_i.cpp b/TAO/tao/DynUnion_i.cpp index 99b0e42a76b..0968f9fff90 100644 --- a/TAO/tao/DynUnion_i.cpp +++ b/TAO/tao/DynUnion_i.cpp @@ -1,17 +1,5 @@ /* -*- C++ -*- */ // $Id$ -// ==================================================================== -// -// = LIBRARY -// TAO -// -// = FILENAME -// DynUnion_i.cpp -// -// = AUTHOR -// Jeff Parsons <parsons@cs.wustl.edu> -// -// ==================================================================== #include "tao/DynAny_i.h" @@ -20,6 +8,32 @@ #include "tao/DynUnion_i.h" #include "tao/InconsistentTypeCodeC.h" +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class DU_Extractor<CORBA::Short>; +template class DU_Extractor<CORBA::Long>; +template class DU_Extractor<CORBA::UShort>; +template class DU_Extractor<CORBA::ULong>; + +// For platforms without native 64-bit ints . . . +#if !defined (ACE_LACKS_LONGLONG_T) +template class DU_Extractor<CORBA::LongLong>; +#endif /* ACE_LACKS_LONGLONG_T */ + +template class DU_Extractor<CORBA::ULongLong>; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate DU_Extractor<CORBA::Short> +#pragma instantiate DU_Extractor<CORBA::Long> +#pragma instantiate DU_Extractor<CORBA::UShort> +#pragma instantiate DU_Extractor<CORBA::ULong> + +// For platforms without native 64-bit ints . . . +#if !defined (ACE_LACKS_LONGLONG_T) +#pragma instantiate DU_Extractor<CORBA::LongLong> +#endif /* ACE_LACKS_LONGLONG_T */ + +#pragma instantiate DU_Extractor<CORBA::ULongLong> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + // Constructors and destructor TAO_DynUnion_i::TAO_DynUnion_i (const CORBA_Any& any) @@ -41,9 +55,7 @@ TAO_DynUnion_i::TAO_DynUnion_i (const CORBA_Any& any) ACE_TRY_CHECK; } else - { - ACE_THROW (CORBA_ORB_InconsistentTypeCode ()); - } + ACE_THROW (CORBA_ORB_InconsistentTypeCode ()); } ACE_CATCHANY { @@ -65,23 +77,24 @@ TAO_DynUnion_i::TAO_DynUnion_i (CORBA_TypeCode_ptr tc) if (tk == CORBA::tk_union) { // Initialize the typecode holder - this->type_ = CORBA::TypeCode::_duplicate (tc); + this->type_ = + CORBA::TypeCode::_duplicate (tc); - CORBA::TypeCode_ptr disc_tc = tc->discriminator_type (ACE_TRY_ENV); + CORBA::TypeCode_ptr disc_tc = + tc->discriminator_type (ACE_TRY_ENV); ACE_TRY_CHECK; // Get a typecode into the discriminator holder. - this->discriminator_ = TAO_DynAny_i::create_dyn_any (disc_tc, - ACE_TRY_ENV); + this->discriminator_ = + TAO_DynAny_i::create_dyn_any (disc_tc, + ACE_TRY_ENV); ACE_TRY_CHECK; // To be filled in by from_any() or assign(). this->member_ = 0; } else - { - ACE_THROW (CORBA_ORB_InconsistentTypeCode ()); - } + ACE_THROW (CORBA_ORB_InconsistentTypeCode ()); } ACE_CATCHANY { @@ -180,9 +193,7 @@ TAO_DynUnion_i::member_name (const char* member_name, // No sense doing anything if we're just "resetting" to the // current member. if (i == this->current_index_) - { - return; - } + return; else { CORBA_TypeCode_ptr member_type = @@ -2194,30 +2205,4 @@ TAO_DynUnion_i::set_from_any (const CORBA_Any& any, } } -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class DU_Extractor<CORBA::Short>; -template class DU_Extractor<CORBA::Long>; -template class DU_Extractor<CORBA::UShort>; -template class DU_Extractor<CORBA::ULong>; - -// For platforms without native 64-bit ints . . . -#if !defined (ACE_LACKS_LONGLONG_T) -template class DU_Extractor<CORBA::LongLong>; -#endif /* ACE_LACKS_LONGLONG_T */ - -template class DU_Extractor<CORBA::ULongLong>; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate DU_Extractor<CORBA::Short> -#pragma instantiate DU_Extractor<CORBA::Long> -#pragma instantiate DU_Extractor<CORBA::UShort> -#pragma instantiate DU_Extractor<CORBA::ULong> - -// For platforms without native 64-bit ints . . . -#if !defined (ACE_LACKS_LONGLONG_T) -#pragma instantiate DU_Extractor<CORBA::LongLong> -#endif /* ACE_LACKS_LONGLONG_T */ - -#pragma instantiate DU_Extractor<CORBA::ULongLong> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - #endif /* TAO_HAS_MINIMUM_CORBA */ diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp index 1ea3a5283bc..06b5301ef62 100644 --- a/TAO/tao/IIOP_Acceptor.cpp +++ b/TAO/tao/IIOP_Acceptor.cpp @@ -1,18 +1,6 @@ // This may look like C, but it's really -*- C++ -*- // $Id$ -// ============================================================================ -// -// = LIBRARY -// -// = FILENAME -// -// = DESCRIPTION -// -// = AUTHOR -// -// ============================================================================ - #include "tao/IIOP_Acceptor.h" #include "tao/IIOP_Profile.h" #include "tao/MProfile.h" @@ -27,7 +15,31 @@ ACE_RCSID(tao, IIOP_Acceptor, "$Id$") -// **************************************************************** +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +template class ACE_Acceptor<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>; +template class ACE_Strategy_Acceptor<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>; +template class ACE_Accept_Strategy<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>; +template class ACE_Creation_Strategy<TAO_IIOP_Server_Connection_Handler>; +template class ACE_Concurrency_Strategy<TAO_IIOP_Server_Connection_Handler>; +template class ACE_Scheduling_Strategy<TAO_IIOP_Server_Connection_Handler>; +template class TAO_Creation_Strategy<TAO_IIOP_Server_Connection_Handler>; +template class TAO_Concurrency_Strategy<TAO_IIOP_Server_Connection_Handler>; +template class TAO_Accept_Strategy<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>; + +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) + +#pragma instantiate ACE_Acceptor<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> +#pragma instantiate ACE_Strategy_Acceptor<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> +#pragma instantiate ACE_Accept_Strategy<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> +#pragma instantiate ACE_Creation_Strategy<TAO_IIOP_Server_Connection_Handler> +#pragma instantiate ACE_Concurrency_Strategy<TAO_IIOP_Server_Connection_Handler> +#pragma instantiate ACE_Scheduling_Strategy<TAO_IIOP_Server_Connection_Handler> +#pragma instantiate TAO_Creation_Strategy<TAO_IIOP_Server_Connection_Handler> +#pragma instantiate TAO_Concurrency_Strategy<TAO_IIOP_Server_Connection_Handler> +#pragma instantiate TAO_Accept_Strategy<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> + +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ TAO_IIOP_Acceptor::TAO_IIOP_Acceptor (void) : TAO_Acceptor (TAO_IOP_TAG_INTERNET_IOP), @@ -59,11 +71,9 @@ TAO_IIOP_Acceptor::create_mprofile (const TAO_ObjectKey &object_key, { // @@ we only make one for now int count = mprofile.profile_count (); - if ((mprofile.size () - count) < 1) - { - if (mprofile.grow (count + 1) == -1) - return -1; - } + if ((mprofile.size () - count) < 1 + && mprofile.grow (count + 1) == -1) + return -1; TAO_IIOP_Profile *pfile = 0; ACE_NEW_RETURN (pfile, @@ -88,8 +98,10 @@ TAO_IIOP_Acceptor::create_mprofile (const TAO_ObjectKey &object_key, pfile->tagged_components ().set_orb_type (TAO_ORB_TYPE); CONV_FRAME::CodeSetComponentInfo code_set_info; - code_set_info.ForCharData.native_code_set = TAO_DEFAULT_CHAR_CODESET_ID; - code_set_info.ForWcharData.native_code_set = TAO_DEFAULT_WCHAR_CODESET_ID; + code_set_info.ForCharData.native_code_set = + TAO_DEFAULT_CHAR_CODESET_ID; + code_set_info.ForWcharData.native_code_set = + TAO_DEFAULT_WCHAR_CODESET_ID; pfile->tagged_components ().set_code_sets (code_set_info); pfile->tagged_components ().set_tao_priority (this->priority ()); @@ -98,10 +110,11 @@ TAO_IIOP_Acceptor::create_mprofile (const TAO_ObjectKey &object_key, } int -TAO_IIOP_Acceptor::is_collocated (const TAO_Profile* pfile) +TAO_IIOP_Acceptor::is_collocated (const TAO_Profile *pfile) { const TAO_IIOP_Profile *profile = - ACE_dynamic_cast(const TAO_IIOP_Profile*, pfile); + ACE_dynamic_cast(const TAO_IIOP_Profile *, + pfile); // compare the port and sin_addr (numeric host address) return profile->object_addr () == this->address_; @@ -130,22 +143,25 @@ TAO_IIOP_Acceptor::open (TAO_ORB_Core *orb_core, return -1; if (major >=0 && minor >= 0) - this->version_.set_version (ACE_static_cast (CORBA::Octet,major), - ACE_static_cast (CORBA::Octet,minor)); - + this->version_.set_version (ACE_static_cast (CORBA::Octet, + major), + ACE_static_cast (CORBA::Octet, + minor)); // Parse options if (this->parse_options (options) == -1) return -1; ACE_INET_Addr addr; - if (ACE_OS::strchr (address, ':') == 0) + if (ACE_OS::strchr (address, + ':') == 0) { // Assume the address is a port number or port name and obtain // the fully qualified domain name. char buffer[MAXHOSTNAMELEN + 1]; - if (addr.get_host_name (buffer, sizeof (buffer)) != 0) + if (addr.get_host_name (buffer, + sizeof (buffer)) != 0) return -1; // First convert the port into a usable form. @@ -159,9 +175,7 @@ TAO_IIOP_Acceptor::open (TAO_ORB_Core *orb_core, return -1; } else if (addr.set (address) != 0) - { - return -1; - } + return -1; return this->open_i (orb_core, addr); } @@ -180,15 +194,19 @@ TAO_IIOP_Acceptor::open_default (TAO_ORB_Core *orb_core, ACE_INET_Addr addr; char buffer[MAXHOSTNAMELEN + 1]; - if (addr.get_host_name (buffer, sizeof (buffer)) != 0) + if (addr.get_host_name (buffer, + sizeof (buffer)) != 0) return -1; - if (addr.set (u_short(0), buffer, 1) != 0) + if (addr.set (u_short(0), + buffer, + 1) != 0) return -1; this->host_ = buffer; - return this->open_i (orb_core, addr); + return this->open_i (orb_core, + addr); } int @@ -234,8 +252,8 @@ TAO_IIOP_Acceptor::open_i (TAO_ORB_Core* orb_core, if (orb_core->orb_params ()->use_dotted_decimal_addresses ()) { - const char *tmp; - if ((tmp = addr.get_host_addr ()) == 0) + const char *tmp = addr.get_host_addr (); + if (tmp == 0) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, @@ -248,7 +266,8 @@ TAO_IIOP_Acceptor::open_i (TAO_ORB_Core* orb_core, else { char tmp_host[MAXHOSTNAMELEN+1]; - if (addr.get_host_name (tmp_host, sizeof(tmp_host)) != 0) + if (addr.get_host_name (tmp_host, + sizeof tmp_host) != 0) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, @@ -267,7 +286,6 @@ TAO_IIOP_Acceptor::open_i (TAO_ORB_Core* orb_core, this->host_.c_str (), this->address_.get_port_number ())); } - return 0; } @@ -294,7 +312,6 @@ TAO_IIOP_Acceptor::parse_options (const char *str) size_t len = options.length (); - const char option_delimiter = '&'; // Count the number of options. @@ -305,11 +322,8 @@ TAO_IIOP_Acceptor::parse_options (const char *str) // Only check for endpoints after the protocol specification and // before the object key. for (size_t i = 0; i < len; ++i) - { - if (options[i] == option_delimiter) - option_count++; - } - + if (options[i] == option_delimiter) + option_count++; // The idea behind the following loop is to split the options into // (option, name) pairs. @@ -332,37 +346,31 @@ TAO_IIOP_Acceptor::parse_options (const char *str) end = len - begin; // Handle last endpoint differently if (end == begin) - { - ACE_ERROR_RETURN ((LM_ERROR, - "TAO (%P|%t) Zero length IIOP option.\n"), - -1); - } + ACE_ERROR_RETURN ((LM_ERROR, + "TAO (%P|%t) Zero length IIOP option.\n"), + -1); else if (end != ACE_CString::npos) { ACE_CString opt = options.substring (begin, end); int slot = opt.find ("="); - if (slot == ACE_static_cast (int, len - 1) || - slot == ACE_CString::npos) - { - ACE_ERROR_RETURN ((LM_ERROR, - "TAO (%P|%t) IIOP option <%s> is " - "missing a value.\n", - opt.c_str ()), - -1); - } + if (slot == ACE_static_cast (int, len - 1) + || slot == ACE_CString::npos) + ACE_ERROR_RETURN ((LM_ERROR, + "TAO (%P|%t) IIOP option <%s> is " + "missing a value.\n", + opt.c_str ()), + -1); ACE_CString name = opt.substring (0, slot); ACE_CString value = opt.substring (slot + 1); if (name.length () == 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - "TAO (%P|%t) Zero length IIOP " - "option name.\n"), - -1); - } + ACE_ERROR_RETURN ((LM_ERROR, + "TAO (%P|%t) Zero length IIOP " + "option name.\n"), + -1); if (name == "priority") { @@ -372,57 +380,23 @@ TAO_IIOP_Acceptor::parse_options (const char *str) if (corba_priority >= 0 /* && corba_priority < 32768 */) - { - // priority_ and corba_priority will always be less - // than 32768 since CORBA::Short is a signed 16 bit - // integer. - - this->priority_ = corba_priority; - } + // priority_ and corba_priority will always be less + // than 32768 since CORBA::Short is a signed 16 bit + // integer. + this->priority_ = corba_priority; else - { - ACE_ERROR_RETURN ((LM_ERROR, - "TAO (%P|%t) Invalid IIOP endpoint " - "priority: <%s>\n", - value.c_str ()), - -1); - } + ACE_ERROR_RETURN ((LM_ERROR, + "TAO (%P|%t) Invalid IIOP endpoint " + "priority: <%s>\n", + value.c_str ()), + -1); } else - { - ACE_ERROR_RETURN ((LM_ERROR, - "TAO (%P|%t) Invalid IIOP option: <%s>\n", - name.c_str ()), - -1); - } + ACE_ERROR_RETURN ((LM_ERROR, + "TAO (%P|%t) Invalid IIOP option: <%s>\n", + name.c_str ()), + -1); } } - return 0; } - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class ACE_Acceptor<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>; -template class ACE_Strategy_Acceptor<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>; -template class ACE_Accept_Strategy<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>; -template class ACE_Creation_Strategy<TAO_IIOP_Server_Connection_Handler>; -template class ACE_Concurrency_Strategy<TAO_IIOP_Server_Connection_Handler>; -template class ACE_Scheduling_Strategy<TAO_IIOP_Server_Connection_Handler>; -template class TAO_Creation_Strategy<TAO_IIOP_Server_Connection_Handler>; -template class TAO_Concurrency_Strategy<TAO_IIOP_Server_Connection_Handler>; -template class TAO_Accept_Strategy<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>; - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_Acceptor<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> -#pragma instantiate ACE_Strategy_Acceptor<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> -#pragma instantiate ACE_Accept_Strategy<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> -#pragma instantiate ACE_Creation_Strategy<TAO_IIOP_Server_Connection_Handler> -#pragma instantiate ACE_Concurrency_Strategy<TAO_IIOP_Server_Connection_Handler> -#pragma instantiate ACE_Scheduling_Strategy<TAO_IIOP_Server_Connection_Handler> -#pragma instantiate TAO_Creation_Strategy<TAO_IIOP_Server_Connection_Handler> -#pragma instantiate TAO_Concurrency_Strategy<TAO_IIOP_Server_Connection_Handler> -#pragma instantiate TAO_Accept_Strategy<TAO_IIOP_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp index 4fdf8a00906..2a237f26c99 100644 --- a/TAO/tao/IIOP_Connector.cpp +++ b/TAO/tao/IIOP_Connector.cpp @@ -12,7 +12,204 @@ ACE_RCSID(tao, IIOP_Connector, "$Id$") -// **************************************************************** +#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT) +#define TAO_SVC_TUPLE ACE_Svc_Tuple<TAO_IIOP_Client_Connection_Handler> +#define CACHED_CONNECT_STRATEGY ACE_Cached_Connect_Strategy<TAO_IIOP_Client_Connection_Handler, ACE_SOCK_CONNECTOR, TAO_Cached_Connector_Lock> +#define TAO_ADDR ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> +#define TAO_HANDLER TAO_IIOP_Client_Connection_Handler +#define TAO_HASH_KEY ACE_Hash<TAO_ADDR> +#define TAO_COMPARE_KEYS ACE_Equal_To<TAO_ADDR> +#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +template class ACE_Auto_Basic_Array_Ptr<ACE_INET_Addr>; +template class ACE_Auto_Basic_Array_Ptr<TAO_IIOP_Client_Connection_Handler*>; +template class auto_ptr<TAO_IIOP_Connect_Creation_Strategy>; +template class ACE_Auto_Basic_Ptr<TAO_IIOP_Connect_Creation_Strategy>; + +template class ACE_Node<ACE_INET_Addr>; +template class ACE_Unbounded_Stack<ACE_INET_Addr>; +template class ACE_Unbounded_Stack_Iterator<ACE_INET_Addr>; + +#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT) +template class CACHED_CONNECT_STRATEGY; +template class TAO_ADDR; +#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ + +template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>; +template class ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr>; +template class ACE_NOOP_Creation_Strategy<TAO_HANDLER>; +template class ACE_Concurrency_Strategy<TAO_HANDLER>; +template class ACE_Connect_Strategy<TAO_HANDLER, ACE_SOCK_CONNECTOR>; +template class ACE_Connector<TAO_HANDLER, ACE_SOCK_CONNECTOR>; +template class ACE_Creation_Strategy<TAO_HANDLER>; +template class ACE_Hash_Map_Entry<TAO_ADDR, TAO_HANDLER *>; +template class ACE_Hash<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> >; +template class ACE_Equal_To<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> >; +template class ACE_Map_Entry<ACE_HANDLE, TAO_SVC_TUPLE *>; +template class ACE_Map_Manager<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; +template class ACE_Map_Iterator_Base<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; +template class ACE_Map_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; +template class ACE_Map_Reverse_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; +template class ACE_NOOP_Concurrency_Strategy<TAO_HANDLER>; +template class ACE_Recycling_Strategy<TAO_HANDLER>; +template class ACE_Strategy_Connector<TAO_HANDLER, ACE_SOCK_CONNECTOR>; +template class TAO_SVC_TUPLE; + +template class ACE_Hash_Map_Manager<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>; +template class ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>; +template class ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; + +#if defined (TAO_USES_ROBUST_CONNECTION_MGMT) +template class ACE_Pair<TAO_HANDLER *, TAO_ATTRIBUTES>; +template class ACE_Reference_Pair<TAO_ADDR, TAO_HANDLER *>; +template class ACE_Hash_Map_Entry<TAO_ADDR, TAO_CACHED_HANDLER>; + +template class ACE_Hash_Map_Manager<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>; +template class ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>; +template class ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; + +// = Caching_Strategy +template class ACE_Hash_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; + +template class ACE_LRU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; + +#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES) + +template class ACE_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; +template class ACE_LFU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; +template class ACE_FIFO_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; +template class ACE_Null_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; + +template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_LRU_CACHING_STRATEGY>; +template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_LFU_CACHING_STRATEGY>; +template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_FIFO_CACHING_STRATEGY>; +template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_NULL_CACHING_STRATEGY>; + +template class ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; +template class ACE_Cache_Map_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; +template class ACE_Cache_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; + +#else + +template class ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; + +#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */ + +template class ACE_Cached_Connect_Strategy_Ex<TAO_HANDLER, ACE_SOCK_CONNECTOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES, TAO_Cached_Connector_Lock>; +template class ACE_Cached_Connect_Strategy<TAO_HANDLER, ACE_SOCK_CONNECTOR, TAO_Cached_Connector_Lock>; + +template class ACE_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP>; +template class ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP>; +template class ACE_Refcounted_Recyclable_Handler_Caching_Utility<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_ATTRIBUTES>; +#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ + +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) + +#pragma instantiate ACE_Auto_Basic_Array_Ptr<ACE_INET_Addr> +#pragma instantiate ACE_Auto_Basic_Array_Ptr<TAO_IIOP_Client_Connection_Handler*> +#pragma instantiate auto_ptr<TAO_IIOP_Connect_Creation_Strategy> +#pragma instantiate ACE_Auto_Basic_Ptr<TAO_IIOP_Connect_Creation_Strategy> + +#pragma instantiate ACE_Node<ACE_INET_Addr> +#pragma instantiate ACE_Unbounded_Stack<ACE_INET_Addr> +#pragma instantiate ACE_Unbounded_Stack_Iterator<ACE_INET_Addr> + +#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT) +#pragma instantiate CACHED_CONNECT_STRATEGY; +#pragma instantiate TAO_ADDR; +#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ + +#pragma instantiate ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> +#pragma instantiate ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> +#pragma instantiate ACE_NOOP_Creation_Strategy<TAO_HANDLER> +#pragma instantiate ACE_Concurrency_Strategy<TAO_HANDLER> +#pragma instantiate ACE_Connect_Strategy<TAO_HANDLER, ACE_SOCK_CONNECTOR> +#pragma instantiate ACE_Connector<TAO_HANDLER, ACE_SOCK_CONNECTOR> +#pragma instantiate ACE_Creation_Strategy<TAO_HANDLER> +#pragma instantiate ACE_Hash_Map_Entry<TAO_ADDR, TAO_HANDLER *> +#pragma instantiate ACE_Hash<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> > +#pragma instantiate ACE_Equal_To<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> > +#pragma instantiate ACE_Map_Entry<ACE_HANDLE, TAO_SVC_TUPLE *> +#pragma instantiate ACE_Map_Manager<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Map_Iterator_Base<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Map_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Map_Reverse_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_NOOP_Concurrency_Strategy<TAO_HANDLER> +#pragma instantiate ACE_Recycling_Strategy<TAO_HANDLER> +#pragma instantiate ACE_Strategy_Connector<TAO_HANDLER, ACE_SOCK_CONNECTOR> +#pragma instantiate TAO_SVC_TUPLE + +#pragma instantiate ACE_Hash_Map_Manager<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> + +#if defined (TAO_USES_ROBUST_CONNECTION_MGMT) +#pragma instantiate ACE_Pair<TAO_HANDLER *, TAO_ATTRIBUTES> +#pragma instantiate ACE_Reference_Pair<TAO_ADDR, TAO_HANDLER *> +#pragma instantiate ACE_Hash_Map_Entry<TAO_ADDR, TAO_CACHED_HANDLER> + +#pragma instantiate ACE_Hash_Map_Manager<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> + +// = Caching_Strategy +#pragma instantiate ACE_Hash_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> + +#pragma instantiate ACE_LRU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> + +#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES) + +#pragma instantiate ACE_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> +#pragma instantiate ACE_LFU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> +#pragma instantiate ACE_FIFO_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> +#pragma instantiate ACE_Null_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> + +#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_LRU_CACHING_STRATEGY> +#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_LFU_CACHING_STRATEGY> +#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_FIFO_CACHING_STRATEGY> +#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_NULL_CACHING_STRATEGY> + +#pragma instantiate ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> +#pragma instantiate ACE_Cache_Map_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> +#pragma instantiate ACE_Cache_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> + +#else + +#pragma instantiate ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> + +#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */ + +#pragma instantiate ACE_Cached_Connect_Strategy_Ex<TAO_HANDLER, ACE_SOCK_CONNECTOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES, TAO_Cached_Connector_Lock> +#pragma instantiate ACE_Cached_Connect_Strategy<TAO_HANDLER, ACE_SOCK_CONNECTOR, TAO_Cached_Connector_Lock> + +#pragma instantiate ACE_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP> +#pragma instantiate ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP> +#pragma instantiate ACE_Refcounted_Recyclable_Handler_Caching_Utility<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_ATTRIBUTES> +#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ + +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ TAO_IIOP_Connect_Creation_Strategy:: TAO_IIOP_Connect_Creation_Strategy (ACE_Thread_Manager* t, @@ -23,18 +220,15 @@ TAO_IIOP_Connect_Creation_Strategy:: } int -TAO_IIOP_Connect_Creation_Strategy::make_svc_handler ( - TAO_IIOP_Client_Connection_Handler *&sh) +TAO_IIOP_Connect_Creation_Strategy::make_svc_handler + (TAO_IIOP_Client_Connection_Handler *&sh) { if (sh == 0) - { - ACE_NEW_RETURN (sh, - TAO_IIOP_Client_Connection_Handler ( - this->orb_core_->thr_mgr (), - this->orb_core_), - -1); - } - + ACE_NEW_RETURN (sh, + TAO_IIOP_Client_Connection_Handler + (this->orb_core_->thr_mgr (), + this->orb_core_), + -1); return 0; } @@ -47,7 +241,6 @@ typedef ACE_Cached_Connect_Strategy<TAO_IIOP_Client_Connection_Handler, TAO_CACHED_CONNECT_STRATEGY; #endif /* ! TAO_USES_ROBUST_CONNECTION_MGMT */ - TAO_IIOP_Connector::TAO_IIOP_Connector (void) : TAO_Connector (TAO_IOP_TAG_INTERNET_IOP), base_connector_ (), @@ -73,9 +266,9 @@ TAO_IIOP_Connector::open (TAO_ORB_Core *orb_core) TAO_IIOP_Connect_Creation_Strategy *connect_creation_strategy = 0; ACE_NEW_RETURN (connect_creation_strategy, - TAO_IIOP_Connect_Creation_Strategy ( - this->orb_core_->thr_mgr (), - this->orb_core_), + TAO_IIOP_Connect_Creation_Strategy + (this->orb_core_->thr_mgr (), + this->orb_core_), -1); auto_ptr<TAO_IIOP_Connect_Creation_Strategy> @@ -100,19 +293,21 @@ TAO_IIOP_Connector::open (TAO_ORB_Core *orb_core) #else /* TAO_USES_ROBUST_CONNECTION_MGMT */ TAO_CACHED_CONNECT_STRATEGY *cached_connect_strategy = 0; ACE_NEW_RETURN (cached_connect_strategy, - TAO_CACHED_CONNECT_STRATEGY ( - new_connect_creation_strategy.get (), - 0, - 0, - new_connector_lock.get (), - 1), + TAO_CACHED_CONNECT_STRATEGY + (new_connect_creation_strategy.get (), + 0, + 0, + new_connector_lock.get (), + 1), -1); #endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ // Finally everything is fine. Make sure to take ownership away // from the auto pointer. - connect_creation_strategy = new_connect_creation_strategy.release (); - connector_lock = new_connector_lock.release (); + connect_creation_strategy = + new_connect_creation_strategy.release (); + connector_lock = + new_connector_lock.release (); #if defined (TAO_USES_ROBUST_CONNECTION_MGMT) return this->base_connector_.open (this->orb_core_->reactor (), @@ -125,7 +320,6 @@ TAO_IIOP_Connector::open (TAO_ORB_Core *orb_core) cached_connect_strategy, &this->null_activation_strategy_); #endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ - } int @@ -152,30 +346,29 @@ TAO_IIOP_Connector::close (void) int TAO_IIOP_Connector::connect (TAO_Profile *profile, - TAO_Transport *& transport, + TAO_Transport *&transport, ACE_Time_Value *max_wait_time) { if (profile->tag () != TAO_IOP_TAG_INTERNET_IOP) return -1; TAO_IIOP_Profile *iiop_profile = - ACE_dynamic_cast (TAO_IIOP_Profile *, profile); - + ACE_dynamic_cast (TAO_IIOP_Profile *, + profile); if (iiop_profile == 0) return -1; - const ACE_INET_Addr &oa = iiop_profile->object_addr (); + const ACE_INET_Addr &oa = + iiop_profile->object_addr (); ACE_Synch_Options synch_options; if (max_wait_time != 0) - { - synch_options.set (ACE_Synch_Options::USE_TIMEOUT, - *max_wait_time); - } + synch_options.set (ACE_Synch_Options::USE_TIMEOUT, + *max_wait_time); TAO_IIOP_Client_Connection_Handler* result; - // the connect call will set the hint () stored in the Profile + // The connect call will set the hint () stored in the Profile // object; but we obtain the transport in the <result> // variable. Other threads may modify the hint, but we are not // affected. @@ -187,8 +380,10 @@ TAO_IIOP_Connector::connect (TAO_Profile *profile, if (TAO_orbdebug) { char buffer [MAXNAMELEN * 2]; - profile->addr_to_string (buffer, (MAXNAMELEN * 2) - 1); - ACE_DEBUG ((LM_ERROR, "(%P|%t) %s:%u, connection to " + profile->addr_to_string (buffer, + (MAXNAMELEN * 2) - 1); + ACE_DEBUG ((LM_ERROR, + "(%P|%t) %s:%u, connection to " "%s failed (%p)\n", __FILE__, __LINE__, @@ -196,23 +391,22 @@ TAO_IIOP_Connector::connect (TAO_Profile *profile, "errno")); } // @@ Without this reset_hint() call the ORB crashes after - // several attempts to reconnect, apparently because the - // cached connector already destroyed the object. - // Using reset_hint() seems to eliminate the problem, and - // actually purify is happy with it, but i have some doubts - // about it: wasn't the hint destroyed already by the - // connector? We (Fred and Carlos) thought about just - // setting the hint to 0, but that would not be thread-safe - // (other threads may be touching the same profile). - // At this point (the day before 1.0) i'm reluctant to change - // ACE, and this fix passes all the TAO tests (including the - // new ping/pong test in the tests/Faults directory). + // several attempts to reconnect, apparently because the cached + // connector already destroyed the object. Using reset_hint() + // seems to eliminate the problem, and actually purify is happy + // with it, but i have some doubts about it: wasn't the hint + // destroyed already by the connector? We (Fred and Carlos) + // thought about just setting the hint to 0, but that would not + // be thread-safe (other threads may be touching the same + // profile). At this point (the day before 1.0) i'm reluctant + // to change ACE, and this fix passes all the TAO tests + // (including the new ping/pong test in the tests/Faults + // directory). iiop_profile->reset_hint (); return -1; } transport = result->transport (); - return 0; } @@ -223,10 +417,13 @@ TAO_IIOP_Connector::preconnect (const char *preconnects) if (this->check_prefix (preconnects) != 0) return 0; // Failure: zero successful preconnections - const char *protocol_removed = ACE_OS::strstr (preconnects, "://") + 3; + const char *protocol_removed = + ACE_OS::strstr (preconnects, + "://") + 3; // "+ 3" since strlen of "://" is 3. - char *preconnections = ACE_OS::strdup (protocol_removed); + char *preconnections = + ACE_OS::strdup (protocol_removed); int successes = 0; if (preconnections) @@ -339,45 +536,35 @@ TAO_IIOP_Connector::preconnect (const char *preconnects) successes++; if (TAO_debug_level > 0) - { - ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) Preconnection <%s:%d> " - "succeeded.\n", - remote_addrs[slot].get_host_name (), - remote_addrs[slot].get_port_number ())); - } - } - else - { - if (TAO_debug_level > 0) - { - ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) Preconnection <%s:%d> failed.\n", - remote_addrs[slot].get_host_name (), - remote_addrs[slot].get_port_number ())); - } + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) Preconnection <%s:%d> " + "succeeded.\n", + remote_addrs[slot].get_host_name (), + remote_addrs[slot].get_port_number ())); } + else if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) Preconnection <%s:%d> failed.\n", + remote_addrs[slot].get_host_name (), + remote_addrs[slot].get_port_number ())); } ACE_OS::free (preconnections); if (TAO_debug_level > 0) - { - ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) IIOP preconnections: %d successes and " - "%d failures.\n", - successes, - num_connections - successes)); - } + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) IIOP preconnections: %d successes and " + "%d failures.\n", + successes, + num_connections - successes)); } - return successes; } -TAO_Profile* +TAO_Profile * TAO_IIOP_Connector::create_profile (TAO_InputCDR& cdr) { - TAO_Profile* pfile; + TAO_Profile *pfile; ACE_NEW_RETURN (pfile, TAO_IIOP_Profile (this->orb_core_), 0); @@ -398,11 +585,8 @@ TAO_IIOP_Connector::make_profile (const char *endpoint, CORBA::Environment &ACE_TRY_ENV) { // The endpoint should be of the form: - // // N.n@host:port/object_key - // // or: - // // host:port/object_key ACE_NEW_THROW_EX (profile, @@ -428,19 +612,14 @@ TAO_IIOP_Connector::check_prefix (const char *endpoint) size_t len0 = ACE_OS::strlen (protocol[0]); size_t len1 = ACE_OS::strlen (protocol[1]); - - // Check for the proper prefix in the IOR. If the proper prefix isn't - // in the IOR then it is not an IOR we can use. + // Check for the proper prefix in the IOR. If the proper prefix + // isn't in the IOR then it is not an IOR we can use. if (slot == len0 && ACE_OS::strncasecmp (endpoint, protocol[0], len0) == 0) - { - return 0; - } + return 0; else if (slot == len1 && ACE_OS::strncasecmp (endpoint, protocol[1], len1) == 0) - { - return 0; - } + return 0; return -1; // Failure: not an IIOP IOR @@ -506,13 +685,10 @@ TAO_IIOP_Connector::make_caching_strategy (void) this->orb_core_->resource_factory (); #if defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES) - ACE_NEW_RETURN (this->caching_strategy_, TAO_IIOP_CACHING_STRATEGY, -1); - #else - switch (resource_factory->connection_caching_strategy_type ()) { case TAO_Resource_Factory::NOOP: @@ -548,206 +724,5 @@ TAO_IIOP_Connector::make_caching_strategy (void) } #endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ -// // The TAO_Cached_Connector_Lock template instantiations are in // Resource_Factory.cpp. -// - -#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT) -#define TAO_SVC_TUPLE ACE_Svc_Tuple<TAO_IIOP_Client_Connection_Handler> -#define CACHED_CONNECT_STRATEGY ACE_Cached_Connect_Strategy<TAO_IIOP_Client_Connection_Handler, ACE_SOCK_CONNECTOR, TAO_Cached_Connector_Lock> -#define TAO_ADDR ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> -#define TAO_HANDLER TAO_IIOP_Client_Connection_Handler -#define TAO_HASH_KEY ACE_Hash<TAO_ADDR> -#define TAO_COMPARE_KEYS ACE_Equal_To<TAO_ADDR> -#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class ACE_Auto_Basic_Array_Ptr<ACE_INET_Addr>; -template class ACE_Auto_Basic_Array_Ptr<TAO_IIOP_Client_Connection_Handler*>; -template class auto_ptr<TAO_IIOP_Connect_Creation_Strategy>; -template class ACE_Auto_Basic_Ptr<TAO_IIOP_Connect_Creation_Strategy>; - -template class ACE_Node<ACE_INET_Addr>; -template class ACE_Unbounded_Stack<ACE_INET_Addr>; -template class ACE_Unbounded_Stack_Iterator<ACE_INET_Addr>; - -#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT) -template class CACHED_CONNECT_STRATEGY; -template class TAO_ADDR; -#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ - -template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>; -template class ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr>; -template class ACE_NOOP_Creation_Strategy<TAO_HANDLER>; -template class ACE_Concurrency_Strategy<TAO_HANDLER>; -template class ACE_Connect_Strategy<TAO_HANDLER, ACE_SOCK_CONNECTOR>; -template class ACE_Connector<TAO_HANDLER, ACE_SOCK_CONNECTOR>; -template class ACE_Creation_Strategy<TAO_HANDLER>; -template class ACE_Hash_Map_Entry<TAO_ADDR, TAO_HANDLER *>; -template class ACE_Hash<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> >; -template class ACE_Equal_To<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> >; -template class ACE_Map_Entry<ACE_HANDLE, TAO_SVC_TUPLE *>; -template class ACE_Map_Manager<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator_Base<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Reverse_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; -template class ACE_NOOP_Concurrency_Strategy<TAO_HANDLER>; -template class ACE_Recycling_Strategy<TAO_HANDLER>; -template class ACE_Strategy_Connector<TAO_HANDLER, ACE_SOCK_CONNECTOR>; -template class TAO_SVC_TUPLE; - -template class ACE_Hash_Map_Manager<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>; -template class ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>; -template class ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; - -#if defined (TAO_USES_ROBUST_CONNECTION_MGMT) -template class ACE_Pair<TAO_HANDLER *, TAO_ATTRIBUTES>; -template class ACE_Reference_Pair<TAO_ADDR, TAO_HANDLER *>; -template class ACE_Hash_Map_Entry<TAO_ADDR, TAO_CACHED_HANDLER>; - -template class ACE_Hash_Map_Manager<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>; -template class ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>; -template class ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; - -// = Caching_Strategy -template class ACE_Hash_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; - -template class ACE_LRU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; - -#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES) - -template class ACE_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; -template class ACE_LFU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; -template class ACE_FIFO_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; -template class ACE_Null_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; - -template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_LRU_CACHING_STRATEGY>; -template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_LFU_CACHING_STRATEGY>; -template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_FIFO_CACHING_STRATEGY>; -template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_NULL_CACHING_STRATEGY>; - -template class ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; -template class ACE_Cache_Map_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; -template class ACE_Cache_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; - -#else - -template class ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; - -#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */ - -template class ACE_Cached_Connect_Strategy_Ex<TAO_HANDLER, ACE_SOCK_CONNECTOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES, TAO_Cached_Connector_Lock>; -template class ACE_Cached_Connect_Strategy<TAO_HANDLER, ACE_SOCK_CONNECTOR, TAO_Cached_Connector_Lock>; - -template class ACE_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP>; -template class ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP>; -template class ACE_Refcounted_Recyclable_Handler_Caching_Utility<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_ATTRIBUTES>; -#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_Auto_Basic_Array_Ptr<ACE_INET_Addr> -#pragma instantiate ACE_Auto_Basic_Array_Ptr<TAO_IIOP_Client_Connection_Handler*> -#pragma instantiate auto_ptr<TAO_IIOP_Connect_Creation_Strategy> -#pragma instantiate ACE_Auto_Basic_Ptr<TAO_IIOP_Connect_Creation_Strategy> - -#pragma instantiate ACE_Node<ACE_INET_Addr> -#pragma instantiate ACE_Unbounded_Stack<ACE_INET_Addr> -#pragma instantiate ACE_Unbounded_Stack_Iterator<ACE_INET_Addr> - -#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT) -#pragma instantiate CACHED_CONNECT_STRATEGY; -#pragma instantiate TAO_ADDR; -#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ - -#pragma instantiate ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> -#pragma instantiate ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> -#pragma instantiate ACE_NOOP_Creation_Strategy<TAO_HANDLER> -#pragma instantiate ACE_Concurrency_Strategy<TAO_HANDLER> -#pragma instantiate ACE_Connect_Strategy<TAO_HANDLER, ACE_SOCK_CONNECTOR> -#pragma instantiate ACE_Connector<TAO_HANDLER, ACE_SOCK_CONNECTOR> -#pragma instantiate ACE_Creation_Strategy<TAO_HANDLER> -#pragma instantiate ACE_Hash_Map_Entry<TAO_ADDR, TAO_HANDLER *> -#pragma instantiate ACE_Hash<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> > -#pragma instantiate ACE_Equal_To<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> > -#pragma instantiate ACE_Map_Entry<ACE_HANDLE, TAO_SVC_TUPLE *> -#pragma instantiate ACE_Map_Manager<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator_Base<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Reverse_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_NOOP_Concurrency_Strategy<TAO_HANDLER> -#pragma instantiate ACE_Recycling_Strategy<TAO_HANDLER> -#pragma instantiate ACE_Strategy_Connector<TAO_HANDLER, ACE_SOCK_CONNECTOR> -#pragma instantiate TAO_SVC_TUPLE - -#pragma instantiate ACE_Hash_Map_Manager<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> - -#if defined (TAO_USES_ROBUST_CONNECTION_MGMT) -#pragma instantiate ACE_Pair<TAO_HANDLER *, TAO_ATTRIBUTES> -#pragma instantiate ACE_Reference_Pair<TAO_ADDR, TAO_HANDLER *> -#pragma instantiate ACE_Hash_Map_Entry<TAO_ADDR, TAO_CACHED_HANDLER> - -#pragma instantiate ACE_Hash_Map_Manager<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> - -// = Caching_Strategy -#pragma instantiate ACE_Hash_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> - -#pragma instantiate ACE_LRU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> - -#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES) - -#pragma instantiate ACE_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> -#pragma instantiate ACE_LFU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> -#pragma instantiate ACE_FIFO_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> -#pragma instantiate ACE_Null_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> - -#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_LRU_CACHING_STRATEGY> -#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_LFU_CACHING_STRATEGY> -#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_FIFO_CACHING_STRATEGY> -#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_IIOP_NULL_CACHING_STRATEGY> - -#pragma instantiate ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> -#pragma instantiate ACE_Cache_Map_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> -#pragma instantiate ACE_Cache_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> - -#else - -#pragma instantiate ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> - -#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */ - -#pragma instantiate ACE_Cached_Connect_Strategy_Ex<TAO_HANDLER, ACE_SOCK_CONNECTOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES, TAO_Cached_Connector_Lock> -#pragma instantiate ACE_Cached_Connect_Strategy<TAO_HANDLER, ACE_SOCK_CONNECTOR, TAO_Cached_Connector_Lock> - -#pragma instantiate ACE_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP> -#pragma instantiate ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP> -#pragma instantiate ACE_Refcounted_Recyclable_Handler_Caching_Utility<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_ATTRIBUTES> -#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/UIOP_Acceptor.cpp b/TAO/tao/UIOP_Acceptor.cpp index 94d083eda06..bd227b8998d 100644 --- a/TAO/tao/UIOP_Acceptor.cpp +++ b/TAO/tao/UIOP_Acceptor.cpp @@ -11,9 +11,8 @@ // // = DESCRIPTION // -// // = AUTHOR -// Fred Kuhns <fredk@cs.wustl.edu> +// Fred Kuhns <fredk@cs.wustl.edu> and // Ossama Othman <othman@cs.wustl.edu> // // ============================================================================ @@ -31,7 +30,31 @@ ACE_RCSID(tao, UIOP_Acceptor, "$Id$") -// **************************************************************** +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +template class ACE_Acceptor<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR>; +template class ACE_Strategy_Acceptor<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR>; +template class ACE_Accept_Strategy<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR>; +template class ACE_Creation_Strategy<TAO_UIOP_Server_Connection_Handler>; +template class ACE_Concurrency_Strategy<TAO_UIOP_Server_Connection_Handler>; +template class ACE_Scheduling_Strategy<TAO_UIOP_Server_Connection_Handler>; +template class TAO_Creation_Strategy<TAO_UIOP_Server_Connection_Handler>; +template class TAO_Concurrency_Strategy<TAO_UIOP_Server_Connection_Handler>; +template class TAO_Accept_Strategy<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR>; + +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) + +#pragma instantiate ACE_Acceptor<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR> +#pragma instantiate ACE_Strategy_Acceptor<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR> +#pragma instantiate ACE_Accept_Strategy<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR> +#pragma instantiate ACE_Creation_Strategy<TAO_UIOP_Server_Connection_Handler> +#pragma instantiate ACE_Concurrency_Strategy<TAO_UIOP_Server_Connection_Handler> +#pragma instantiate ACE_Scheduling_Strategy<TAO_UIOP_Server_Connection_Handler> +#pragma instantiate TAO_Creation_Strategy<TAO_UIOP_Server_Connection_Handler> +#pragma instantiate TAO_Concurrency_Strategy<TAO_UIOP_Server_Connection_Handler> +#pragma instantiate TAO_Accept_Strategy<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR> + +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ TAO_UIOP_Acceptor::TAO_UIOP_Acceptor (void) : TAO_Acceptor (TAO_IOP_TAG_UNIX_IOP), @@ -63,11 +86,9 @@ TAO_UIOP_Acceptor::create_mprofile (const TAO_ObjectKey &object_key, // we only make one int count = mprofile.profile_count (); - if ((mprofile.size () - count) < 1) - { - if (mprofile.grow (count + 1) == -1) - return -1; - } + if ((mprofile.size () - count) < 1 + && mprofile.grow (count + 1) == -1) + return -1; TAO_UIOP_Profile *pfile = 0; ACE_NEW_RETURN (pfile, @@ -100,12 +121,13 @@ TAO_UIOP_Acceptor::create_mprofile (const TAO_ObjectKey &object_key, } int -TAO_UIOP_Acceptor::is_collocated (const TAO_Profile* pfile) +TAO_UIOP_Acceptor::is_collocated (const TAO_Profile *pfile) { const TAO_UIOP_Profile *profile = - ACE_dynamic_cast(const TAO_UIOP_Profile*, pfile); + ACE_dynamic_cast (const TAO_UIOP_Profile *, + pfile); - // for UNIX Files this is relatively cheap + // For UNIX Files this is relatively cheap. ACE_UNIX_Addr address; if (this->base_acceptor_.acceptor ().get_local_addr (address) == -1) return 0; @@ -144,14 +166,15 @@ TAO_UIOP_Acceptor::open (TAO_ORB_Core *orb_core, return -1; if (major >= 0 && minor >= 0) - this->version_.set_version (ACE_static_cast (CORBA::Octet, major), - ACE_static_cast (CORBA::Octet, minor)); - + this->version_.set_version (ACE_static_cast (CORBA::Octet, + major), + ACE_static_cast (CORBA::Octet, + minor)); // Parse options if (this->parse_options (options) == -1) return -1; - - return this->open_i (orb_core, address); + else + return this->open_i (orb_core, address); } int @@ -162,16 +185,18 @@ TAO_UIOP_Acceptor::open_default (TAO_ORB_Core *orb_core, if (this->parse_options (options) == -1) return -1; - ACE_Auto_String_Free tempname (ACE_OS::tempnam (0, "TAO")); + ACE_Auto_String_Free tempname (ACE_OS::tempnam (0, + "TAO")); if (tempname.get () == 0) return -1; - return this->open_i (orb_core, tempname.get ()); + return this->open_i (orb_core, + tempname.get ()); } int -TAO_UIOP_Acceptor::open_i (TAO_ORB_Core* orb_core, +TAO_UIOP_Acceptor::open_i (TAO_ORB_Core *orb_core, const char *rendezvous) { this->orb_core_ = orb_core; @@ -210,13 +235,10 @@ TAO_UIOP_Acceptor::open_i (TAO_ORB_Core* orb_core, // rendezvous point here if (TAO_debug_level > 5) - { - ACE_DEBUG ((LM_DEBUG, - "\nTAO (%P|%t) UIOP_Acceptor::open_i - " - "listening on: <%s>\n", - addr.get_path_name ())); - } - + ACE_DEBUG ((LM_DEBUG, + "\nTAO (%P|%t) UIOP_Acceptor::open_i - " + "listening on: <%s>\n", + addr.get_path_name ())); return 0; } @@ -243,9 +265,9 @@ TAO_UIOP_Acceptor::rendezvous_point (ACE_UNIX_Addr &addr, // be able to communicate with the server since its point of // communication, the rendezvous point, was not found. On the other // hand, if an absolute path was used, the client would know exactly - // where to find the rendezvous point. It is up to the user to - // make sure that a given UIOP endpoint is accessible by both the - // server and the client. + // where to find the rendezvous point. It is up to the user to make + // sure that a given UIOP endpoint is accessible by both the server + // and the client. addr.set (rendezvous); @@ -255,13 +277,11 @@ TAO_UIOP_Acceptor::rendezvous_point (ACE_UNIX_Addr &addr, // most UNIX domain socket rendezvous points can only be less than // 108 characters long. if (length < ACE_OS::strlen (rendezvous)) - { - ACE_DEBUG ((LM_WARNING, - "TAO (%P|%t) UIOP rendezvous point was truncated to <%s>\n" - "since it was longer than %d characters long.\n", - addr.get_path_name (), - length)); - } + ACE_DEBUG ((LM_WARNING, + "TAO (%P|%t) UIOP rendezvous point was truncated to <%s>\n" + "since it was longer than %d characters long.\n", + addr.get_path_name (), + length)); } CORBA::ULong @@ -284,22 +304,18 @@ TAO_UIOP_Acceptor::parse_options (const char *str) size_t len = options.length (); - const char option_delimiter = '&'; // Count the number of options. CORBA::ULong option_count = 1; - // Number of endpoints in the string (initialized to 1). + // Number of endpoints in the string (initialized to 1). // Only check for endpoints after the protocol specification and // before the object key. for (size_t i = 0; i < len; ++i) - { - if (options[i] == option_delimiter) - option_count++; - } - + if (options[i] == option_delimiter) + option_count++; // The idea behind the following loop is to split the options into // (option, name) pairs. @@ -322,37 +338,32 @@ TAO_UIOP_Acceptor::parse_options (const char *str) end = len - begin; // Handle last endpoint differently if (end == begin) - { - ACE_ERROR_RETURN ((LM_ERROR, - "TAO (%P|%t) Zero length UIOP option.\n"), - -1); - } + ACE_ERROR_RETURN ((LM_ERROR, + "TAO (%P|%t) Zero length UIOP option.\n"), + -1); else if (end != ACE_CString::npos) { - ACE_CString opt = options.substring (begin, end); + ACE_CString opt = + options.substring (begin, end); int slot = opt.find ("="); - if (slot == ACE_static_cast (int, len - 1) || - slot == ACE_CString::npos) - { - ACE_ERROR_RETURN ((LM_ERROR, - "TAO (%P|%t) UIOP option <%s> is " - "missing a value.\n", - opt.c_str ()), - -1); - } + if (slot == ACE_static_cast (int, len - 1) + || slot == ACE_CString::npos) + ACE_ERROR_RETURN ((LM_ERROR, + "TAO (%P|%t) UIOP option <%s> is " + "missing a value.\n", + opt.c_str ()), + -1); ACE_CString name = opt.substring (0, slot); ACE_CString value = opt.substring (slot + 1); if (name.length () == 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - "TAO (%P|%t) Zero length UIOP " - "option name.\n"), - -1); - } + ACE_ERROR_RETURN ((LM_ERROR, + "TAO (%P|%t) Zero length UIOP " + "option name.\n"), + -1); if (name == "priority") { @@ -362,61 +373,24 @@ TAO_UIOP_Acceptor::parse_options (const char *str) if (corba_priority >= 0 /* && corba_priority < 32768 */) - { - // priority_ and corba_priority will always be less - // than 32768 since CORBA::Short is a signed 16 bit - // integer. - - this->priority_ = corba_priority; - } + // priority_ and corba_priority will always be less + // than 32768 since CORBA::Short is a signed 16 bit + // integer. + this->priority_ = corba_priority; else - { - ACE_ERROR_RETURN ((LM_ERROR, - "TAO (%P|%t) Invalid UIOP endpoint " - "priority: <%s>\n", - value.c_str ()), - -1); - } + ACE_ERROR_RETURN ((LM_ERROR, + "TAO (%P|%t) Invalid UIOP endpoint " + "priority: <%s>\n", + value.c_str ()), + -1); } else - { - ACE_ERROR_RETURN ((LM_ERROR, - "TAO (%P|%t) Invalid UIOP option: <%s>\n", - name.c_str ()), - -1); - } + ACE_ERROR_RETURN ((LM_ERROR, + "TAO (%P|%t) Invalid UIOP option: <%s>\n", + name.c_str ()), + -1); } } - return 0; } - - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class ACE_Acceptor<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR>; -template class ACE_Strategy_Acceptor<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR>; -template class ACE_Accept_Strategy<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR>; -template class ACE_Creation_Strategy<TAO_UIOP_Server_Connection_Handler>; -template class ACE_Concurrency_Strategy<TAO_UIOP_Server_Connection_Handler>; -template class ACE_Scheduling_Strategy<TAO_UIOP_Server_Connection_Handler>; -template class TAO_Creation_Strategy<TAO_UIOP_Server_Connection_Handler>; -template class TAO_Concurrency_Strategy<TAO_UIOP_Server_Connection_Handler>; -template class TAO_Accept_Strategy<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR>; - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_Acceptor<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR> -#pragma instantiate ACE_Strategy_Acceptor<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR> -#pragma instantiate ACE_Accept_Strategy<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR> -#pragma instantiate ACE_Creation_Strategy<TAO_UIOP_Server_Connection_Handler> -#pragma instantiate ACE_Concurrency_Strategy<TAO_UIOP_Server_Connection_Handler> -#pragma instantiate ACE_Scheduling_Strategy<TAO_UIOP_Server_Connection_Handler> -#pragma instantiate TAO_Creation_Strategy<TAO_UIOP_Server_Connection_Handler> -#pragma instantiate TAO_Concurrency_Strategy<TAO_UIOP_Server_Connection_Handler> -#pragma instantiate TAO_Accept_Strategy<TAO_UIOP_Server_Connection_Handler, ACE_LSOCK_ACCEPTOR> - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - - #endif /* TAO_HAS_UIOP */ diff --git a/TAO/tao/UIOP_Connector.cpp b/TAO/tao/UIOP_Connector.cpp index 32f191d92db..601633e2636 100644 --- a/TAO/tao/UIOP_Connector.cpp +++ b/TAO/tao/UIOP_Connector.cpp @@ -14,7 +14,207 @@ ACE_RCSID(tao, UIOP_Connector, "$Id$") -// **************************************************************** +// The TAO_Cached_Connector_Lock template instantiations are in +// Resource_Factory.cpp. + +#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT) +#define TAO_SVC_TUPLE ACE_Svc_Tuple<TAO_UIOP_Client_Connection_Handler> +#define CACHED_CONNECT_STRATEGY ACE_Cached_Connect_Strategy<TAO_UIOP_Client_Connection_Handler, ACE_LSOCK_CONNECTOR, TAO_Cached_Connector_Lock> +#define TAO_ADDR ACE_Refcounted_Hash_Recyclable<ACE_UNIX_Addr> +#define TAO_HANDLER TAO_UIOP_Client_Connection_Handler +#define TAO_HASH_KEY ACE_Hash<TAO_ADDR> +#define TAO_COMPARE_KEYS ACE_Equal_To<TAO_ADDR> +#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +template class ACE_Auto_Basic_Array_Ptr<ACE_UNIX_Addr>; +template class ACE_Auto_Basic_Array_Ptr<TAO_UIOP_Client_Connection_Handler*>; +template class auto_ptr<TAO_UIOP_Connect_Creation_Strategy>; +template class ACE_Auto_Basic_Ptr<TAO_UIOP_Connect_Creation_Strategy>; + +template class ACE_Node<ACE_UNIX_Addr>; +template class ACE_Unbounded_Stack<ACE_UNIX_Addr>; +template class ACE_Unbounded_Stack_Iterator<ACE_UNIX_Addr>; + +#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT) +template class CACHED_CONNECT_STRATEGY; +template class TAO_ADDR; +#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ + +template class ACE_Svc_Handler<ACE_LSOCK_STREAM, ACE_NULL_SYNCH>; +template class ACE_Refcounted_Hash_Recyclable<ACE_UNIX_Addr>; +template class ACE_NOOP_Creation_Strategy<TAO_HANDLER>; +template class ACE_Concurrency_Strategy<TAO_HANDLER>; +template class ACE_Connect_Strategy<TAO_HANDLER, ACE_LSOCK_CONNECTOR>; +template class ACE_Connector<TAO_HANDLER, ACE_LSOCK_CONNECTOR>; +template class ACE_Creation_Strategy<TAO_HANDLER>; +template class ACE_Hash_Map_Entry<TAO_ADDR, TAO_HANDLER *>; +template class ACE_Hash<ACE_Refcounted_Hash_Recyclable<ACE_UNIX_Addr> >; +template class ACE_Equal_To<ACE_Refcounted_Hash_Recyclable<ACE_UNIX_Addr> >; +template class ACE_Map_Entry<ACE_HANDLE, TAO_SVC_TUPLE *>; +template class ACE_Map_Manager<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; +template class ACE_Map_Iterator_Base<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; +template class ACE_Map_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; +template class ACE_Map_Reverse_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; +template class ACE_NOOP_Concurrency_Strategy<TAO_HANDLER>; +template class ACE_Recycling_Strategy<TAO_HANDLER>; +template class ACE_Strategy_Connector<TAO_HANDLER, ACE_LSOCK_CONNECTOR>; +template class TAO_SVC_TUPLE; + +template class ACE_Hash_Map_Manager<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>; +template class ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>; +template class ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; + +#if defined (TAO_USES_ROBUST_CONNECTION_MGMT) +template class ACE_Pair<TAO_HANDLER *, TAO_ATTRIBUTES>; +template class ACE_Reference_Pair<TAO_ADDR, TAO_HANDLER *>; +template class ACE_Hash_Map_Entry<TAO_ADDR, TAO_CACHED_HANDLER>; + +template class ACE_Hash_Map_Manager<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>; +template class ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>; +template class ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; +template class ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; + +// = Caching_Strategy +template class ACE_Hash_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; + +template class ACE_LRU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; + +#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES) + +template class ACE_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; +template class ACE_LFU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; +template class ACE_FIFO_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; +template class ACE_Null_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; + +template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_LRU_CACHING_STRATEGY>; +template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_LFU_CACHING_STRATEGY>; +template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_FIFO_CACHING_STRATEGY>; +template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_NULL_CACHING_STRATEGY>; + +template class ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; +template class ACE_Cache_Map_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; +template class ACE_Cache_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; + +#else + +template class ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; + +#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */ + +template class ACE_Cached_Connect_Strategy_Ex<TAO_HANDLER, ACE_LSOCK_CONNECTOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES, TAO_Cached_Connector_Lock>; +template class ACE_Cached_Connect_Strategy<TAO_HANDLER, ACE_LSOCK_CONNECTOR, TAO_Cached_Connector_Lock>; + +template class ACE_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP>; +template class ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP>; +template class ACE_Refcounted_Recyclable_Handler_Caching_Utility<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_ATTRIBUTES>; +#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ + +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) + +#pragma instantiate ACE_Auto_Basic_Array_Ptr<ACE_UNIX_Addr> +#pragma instantiate ACE_Auto_Basic_Array_Ptr<TAO_UIOP_Client_Connection_Handler*> +#pragma instantiate auto_ptr<TAO_UIOP_Connect_Creation_Strategy> +#pragma instantiate ACE_Auto_Basic_Ptr<TAO_UIOP_Connect_Creation_Strategy> + +#pragma instantiate ACE_Node<ACE_UNIX_Addr> +#pragma instantiate ACE_Unbounded_Stack<ACE_UNIX_Addr> +#pragma instantiate ACE_Unbounded_Stack_Iterator<ACE_UNIX_Addr> + +#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT) +#pragma instantiate CACHED_CONNECT_STRATEGY; +#pragma instantiate TAO_ADDR; +#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ + +#pragma instantiate ACE_Svc_Handler<ACE_LSOCK_STREAM, ACE_NULL_SYNCH> +#pragma instantiate ACE_Refcounted_Hash_Recyclable<ACE_UNIX_Addr> +#pragma instantiate ACE_NOOP_Creation_Strategy<TAO_HANDLER> +#pragma instantiate ACE_Concurrency_Strategy<TAO_HANDLER> +#pragma instantiate ACE_Connect_Strategy<TAO_HANDLER, ACE_LSOCK_CONNECTOR> +#pragma instantiate ACE_Connector<TAO_HANDLER, ACE_LSOCK_CONNECTOR> +#pragma instantiate ACE_Creation_Strategy<TAO_HANDLER> +#pragma instantiate ACE_Hash_Map_Entry<TAO_ADDR, TAO_HANDLER *> +#pragma instantiate ACE_Hash<ACE_Refcounted_Hash_Recyclable<ACE_UNIX_Addr> > +#pragma instantiate ACE_Equal_To<ACE_Refcounted_Hash_Recyclable<ACE_UNIX_Addr> > +#pragma instantiate ACE_Map_Entry<ACE_HANDLE, TAO_SVC_TUPLE *> +#pragma instantiate ACE_Map_Manager<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Map_Iterator_Base<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Map_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Map_Reverse_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_NOOP_Concurrency_Strategy<TAO_HANDLER> +#pragma instantiate ACE_Recycling_Strategy<TAO_HANDLER> +#pragma instantiate ACE_Strategy_Connector<TAO_HANDLER, ACE_LSOCK_CONNECTOR> +#pragma instantiate TAO_SVC_TUPLE + +#pragma instantiate ACE_Hash_Map_Manager<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> + +#if defined (TAO_USES_ROBUST_CONNECTION_MGMT) +#pragma instantiate ACE_Pair<TAO_HANDLER *, TAO_ATTRIBUTES> +#pragma instantiate ACE_Reference_Pair<TAO_ADDR, TAO_HANDLER *> +#pragma instantiate ACE_Hash_Map_Entry<TAO_ADDR, TAO_CACHED_HANDLER> + +#pragma instantiate ACE_Hash_Map_Manager<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> + +// = Caching_Strategy +#pragma instantiate ACE_Hash_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> + +#pragma instantiate ACE_LRU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> + +#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES) + +#pragma instantiate ACE_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> +#pragma instantiate ACE_LFU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> +#pragma instantiate ACE_FIFO_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> +#pragma instantiate ACE_Null_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> + +#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_LRU_CACHING_STRATEGY> +#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_LFU_CACHING_STRATEGY> +#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_FIFO_CACHING_STRATEGY> +#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_NULL_CACHING_STRATEGY> + +#pragma instantiate ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> +#pragma instantiate ACE_Cache_Map_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> +#pragma instantiate ACE_Cache_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> + +#else + +#pragma instantiate ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> + +#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */ + +#pragma instantiate ACE_Cached_Connect_Strategy_Ex<TAO_HANDLER, ACE_LSOCK_CONNECTOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES, TAO_Cached_Connector_Lock> +#pragma instantiate ACE_Cached_Connect_Strategy<TAO_HANDLER, ACE_LSOCK_CONNECTOR, TAO_Cached_Connector_Lock> + +#pragma instantiate ACE_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP> +#pragma instantiate ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP> +#pragma instantiate ACE_Refcounted_Recyclable_Handler_Caching_Utility<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_ATTRIBUTES> +#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ + +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ TAO_UIOP_Connect_Creation_Strategy:: TAO_UIOP_Connect_Creation_Strategy (ACE_Thread_Manager* t, @@ -25,22 +225,18 @@ TAO_UIOP_Connect_Creation_Strategy:: } int -TAO_UIOP_Connect_Creation_Strategy::make_svc_handler ( - TAO_UIOP_Client_Connection_Handler *&sh) +TAO_UIOP_Connect_Creation_Strategy::make_svc_handler + (TAO_UIOP_Client_Connection_Handler *&sh) { if (sh == 0) - { - ACE_NEW_RETURN (sh, - TAO_UIOP_Client_Connection_Handler ( - this->orb_core_->thr_mgr (), - this->orb_core_), - -1); - } - + ACE_NEW_RETURN (sh, + TAO_UIOP_Client_Connection_Handler + (this->orb_core_->thr_mgr (), + this->orb_core_), + -1); return 0; } -// **************************************************************** #if !defined (TAO_USES_ROBUST_CONNECTION_MGMT) typedef ACE_Cached_Connect_Strategy<TAO_UIOP_Client_Connection_Handler, ACE_LSOCK_CONNECTOR, @@ -72,9 +268,9 @@ TAO_UIOP_Connector::open (TAO_ORB_Core *orb_core) TAO_UIOP_Connect_Creation_Strategy *connect_creation_strategy = 0; ACE_NEW_RETURN (connect_creation_strategy, - TAO_UIOP_Connect_Creation_Strategy ( - this->orb_core_->thr_mgr (), - this->orb_core_), + TAO_UIOP_Connect_Creation_Strategy + (this->orb_core_->thr_mgr (), + this->orb_core_), -1); auto_ptr<TAO_UIOP_Connect_Creation_Strategy> @@ -99,19 +295,21 @@ TAO_UIOP_Connector::open (TAO_ORB_Core *orb_core) #else /* TAO_USES_ROBUST_CONNECTION_MGMT */ TAO_CACHED_CONNECT_STRATEGY *cached_connect_strategy = 0; ACE_NEW_RETURN (cached_connect_strategy, - TAO_CACHED_CONNECT_STRATEGY ( - new_connect_creation_strategy.get (), - 0, - 0, - new_connector_lock.get (), - 1), + TAO_CACHED_CONNECT_STRATEGY + (new_connect_creation_strategy.get (), + 0, + 0, + new_connector_lock.get (), + 1), -1); #endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ // Finally everything is fine. Make sure to take ownership away // from the auto pointer. - connect_creation_strategy = new_connect_creation_strategy.release (); - connector_lock = new_connector_lock.release (); + connect_creation_strategy = + new_connect_creation_strategy.release (); + connector_lock = + new_connector_lock.release (); #if defined (TAO_USES_ROBUST_CONNECTION_MGMT) return this->base_connector_.open (this->orb_core_->reactor (), @@ -131,7 +329,7 @@ TAO_UIOP_Connector::close (void) { this->base_connector_.close (); - // Zap the creation strategy that we created earlier + // Zap the creation strategy that we created earlier. #if defined (TAO_USES_ROBUST_CONNECTION_MGMT) delete this->cached_connect_strategy_->creation_strategy (); delete this->cached_connect_strategy_; @@ -157,23 +355,22 @@ TAO_UIOP_Connector::connect (TAO_Profile *profile, return -1; TAO_UIOP_Profile *uiop_profile = - ACE_dynamic_cast (TAO_UIOP_Profile *, profile); - + ACE_dynamic_cast (TAO_UIOP_Profile *, + profile); if (uiop_profile == 0) return -1; - const ACE_UNIX_Addr &oa = uiop_profile->object_addr (); + const ACE_UNIX_Addr &oa = + uiop_profile->object_addr (); ACE_Synch_Options synch_options; if (max_wait_time != 0) - { - synch_options.set (ACE_Synch_Options::USE_TIMEOUT, - *max_wait_time); - } + synch_options.set (ACE_Synch_Options::USE_TIMEOUT, + *max_wait_time); TAO_UIOP_Client_Connection_Handler* result; - // the connect call will set the hint () stored in the Profile + // The connect call will set the hint () stored in the Profile // object; but we obtain the transport in the <result> // variable. Other threads may modify the hint, but we are not // affected. @@ -186,7 +383,8 @@ TAO_UIOP_Connector::connect (TAO_Profile *profile, { char buffer [MAXPATHLEN + 1]; profile->addr_to_string (buffer, MAXPATHLEN); - ACE_DEBUG ((LM_ERROR, "(%P|%t) %s:%u, connection to " + ACE_DEBUG ((LM_ERROR, + "(%P|%t) %s:%u, connection to " "%s failed (%p)\n", __FILE__, __LINE__, @@ -194,17 +392,17 @@ TAO_UIOP_Connector::connect (TAO_Profile *profile, "errno")); } // @@ Without this reset_hint() call the ORB crashes after - // several attempts to reconnect, apparently because the - // cached connector already destroyed the object. - // Using reset_hint() seems to eliminate the problem, and - // actually purify is happy with it, but i have some doubts - // about it: wasn't the hint destroyed already by the - // connector? We (Fred and Carlos) thought about just - // setting the hint to 0, but that would not be thread-safe - // (other threads may be touching the same profile). - // At this point (the day before 1.0) i'm reluctant to change - // ACE, and this fix passes all the TAO tests (including the - // new ping/pong test in the tests/Faults directory). + // several attempts to reconnect, apparently because the cached + // connector already destroyed the object. Using reset_hint() + // seems to eliminate the problem, and actually purify is happy + // with it, but i have some doubts about it: wasn't the hint + // destroyed already by the connector? We (Fred and Carlos) + // thought about just setting the hint to 0, but that would not + // be thread-safe (other threads may be touching the same + // profile). At this point (the day before 1.0) i'm reluctant + // to change ACE, and this fix passes all the TAO tests + // (including the new ping/pong test in the tests/Faults + // directory). uiop_profile->reset_hint (); return -1; } @@ -221,10 +419,12 @@ TAO_UIOP_Connector::preconnect (const char *preconnects) if (this->check_prefix (preconnects) != 0) return 0; // Failure: zero successful preconnections - const char *protocol_removed = ACE_OS::strstr (preconnects, "://") + 3; + const char *protocol_removed = + ACE_OS::strstr (preconnects, "://") + 3; // "+ 3" since strlen of "://" is 3. - char *preconnections = ACE_OS::strdup (protocol_removed); + char *preconnections = + ACE_OS::strdup (protocol_removed); int successes = 0; if (preconnections) @@ -236,6 +436,7 @@ TAO_UIOP_Connector::preconnect (const char *preconnects) char *nextptr = 0; char *where = 0; + for (where = ACE::strsplit_r (preconnections, ",", nextptr); where != 0; where = ACE::strsplit_r (0, ",", nextptr)) @@ -243,7 +444,8 @@ TAO_UIOP_Connector::preconnect (const char *preconnects) char *rendezvous_point = where; int version_offset = 0; - // Additional offset to remove version from preconnect, if it exists. + // Additional offset to remove version from preconnect, if + // it exists. if (isdigit (rendezvous_point[0]) && rendezvous_point[1] == '.' && @@ -252,7 +454,7 @@ TAO_UIOP_Connector::preconnect (const char *preconnects) version_offset = 4; // @@ For now, we just drop the version prefix. However, at - // some point in the future the version may become useful. + // some point in the future the version may become useful. dest.set (rendezvous_point + version_offset); @@ -298,6 +500,7 @@ TAO_UIOP_Connector::preconnect (const char *preconnects) handlers, remote_addrs, failures); + // Loop over all the failures and set the handlers that // succeeded to idle state. for (slot = 0; @@ -310,42 +513,33 @@ TAO_UIOP_Connector::preconnect (const char *preconnects) ++successes; if (TAO_debug_level > 0) - { - ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) Preconnection <%s> succeeded.\n", - remote_addrs[slot].get_path_name ())); - } - } - else - { - if (TAO_debug_level > 0) - { - ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) Preconnection <%s> failed.\n", - remote_addrs[slot].get_path_name ())); - } + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) Preconnection <%s> succeeded.\n", + remote_addrs[slot].get_path_name ())); } + else if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) Preconnection <%s> failed.\n", + remote_addrs[slot].get_path_name ())); } ACE_OS::free (preconnections); if (TAO_debug_level > 0) - { - ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) UIOP preconnections: %d successes and " - "%d failures.\n", - successes, - num_connections - successes)); - } + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) UIOP preconnections: %d successes and " + "%d failures.\n", + successes, + num_connections - successes)); } return successes; } -TAO_Profile* +TAO_Profile * TAO_UIOP_Connector::create_profile (TAO_InputCDR& cdr) { - TAO_Profile* pfile; + TAO_Profile *pfile; ACE_NEW_RETURN (pfile, TAO_UIOP_Profile (this->orb_core_), 0); @@ -366,11 +560,8 @@ TAO_UIOP_Connector::make_profile (const char *endpoint, CORBA::Environment &ACE_TRY_ENV) { // The endpoint should be of the form: - // // N.n@rendezvous_point|object_key - // // or: - // // rendezvous_point|object_key ACE_NEW_THROW_EX (profile, @@ -396,23 +587,21 @@ TAO_UIOP_Connector::check_prefix (const char *endpoint) size_t len0 = ACE_OS::strlen (protocol[0]); size_t len1 = ACE_OS::strlen (protocol[1]); - - // Check for the proper prefix in the IOR. If the proper prefix isn't - // in the IOR then it is not an IOR we can use. + // Check for the proper prefix in the IOR. If the proper prefix + // isn't in the IOR then it is not an IOR we can use. if (slot == len0 - && ACE_OS::strncasecmp (endpoint, protocol[0], len0) == 0) - { - return 0; - } + && ACE_OS::strncasecmp (endpoint, + protocol[0], + len0) == 0) + return 0; else if (slot == len1 - && ACE_OS::strncasecmp (endpoint, protocol[1], len1) == 0) - { - return 0; - } + && ACE_OS::strncasecmp (endpoint, + protocol[1], + len1) == 0) + return 0; return -1; - // Failure: not an UIOP IOR - // DO NOT throw an exception here. + // Failure: not an UIOP IOR DO NOT throw an exception here. } char @@ -475,13 +664,10 @@ TAO_UIOP_Connector::make_caching_strategy (void) this->orb_core_->resource_factory (); #if defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES) - ACE_NEW_RETURN (this->caching_strategy_, TAO_UIOP_CACHING_STRATEGY, -1); - #else - switch (resource_factory->connection_caching_strategy_type ()) { case TAO_Resource_Factory::NOOP: @@ -509,7 +695,6 @@ TAO_UIOP_Connector::make_caching_strategy (void) -1); break; } - #endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */ this->caching_strategy_->purge_percent (resource_factory->purge_percentage ()); @@ -517,207 +702,4 @@ TAO_UIOP_Connector::make_caching_strategy (void) } #endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ -// -// The TAO_Cached_Connector_Lock template instantiations are in -// Resource_Factory.cpp. -// -#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT) -#define TAO_SVC_TUPLE ACE_Svc_Tuple<TAO_UIOP_Client_Connection_Handler> -#define CACHED_CONNECT_STRATEGY ACE_Cached_Connect_Strategy<TAO_UIOP_Client_Connection_Handler, ACE_LSOCK_CONNECTOR, TAO_Cached_Connector_Lock> -#define TAO_ADDR ACE_Refcounted_Hash_Recyclable<ACE_UNIX_Addr> -#define TAO_HANDLER TAO_UIOP_Client_Connection_Handler -#define TAO_HASH_KEY ACE_Hash<TAO_ADDR> -#define TAO_COMPARE_KEYS ACE_Equal_To<TAO_ADDR> -#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class ACE_Auto_Basic_Array_Ptr<ACE_UNIX_Addr>; -template class ACE_Auto_Basic_Array_Ptr<TAO_UIOP_Client_Connection_Handler*>; -template class auto_ptr<TAO_UIOP_Connect_Creation_Strategy>; -template class ACE_Auto_Basic_Ptr<TAO_UIOP_Connect_Creation_Strategy>; - -template class ACE_Node<ACE_UNIX_Addr>; -template class ACE_Unbounded_Stack<ACE_UNIX_Addr>; -template class ACE_Unbounded_Stack_Iterator<ACE_UNIX_Addr>; - -#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT) -template class CACHED_CONNECT_STRATEGY; -template class TAO_ADDR; -#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ - -template class ACE_Svc_Handler<ACE_LSOCK_STREAM, ACE_NULL_SYNCH>; -template class ACE_Refcounted_Hash_Recyclable<ACE_UNIX_Addr>; -template class ACE_NOOP_Creation_Strategy<TAO_HANDLER>; -template class ACE_Concurrency_Strategy<TAO_HANDLER>; -template class ACE_Connect_Strategy<TAO_HANDLER, ACE_LSOCK_CONNECTOR>; -template class ACE_Connector<TAO_HANDLER, ACE_LSOCK_CONNECTOR>; -template class ACE_Creation_Strategy<TAO_HANDLER>; -template class ACE_Hash_Map_Entry<TAO_ADDR, TAO_HANDLER *>; -template class ACE_Hash<ACE_Refcounted_Hash_Recyclable<ACE_UNIX_Addr> >; -template class ACE_Equal_To<ACE_Refcounted_Hash_Recyclable<ACE_UNIX_Addr> >; -template class ACE_Map_Entry<ACE_HANDLE, TAO_SVC_TUPLE *>; -template class ACE_Map_Manager<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator_Base<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Reverse_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>; -template class ACE_NOOP_Concurrency_Strategy<TAO_HANDLER>; -template class ACE_Recycling_Strategy<TAO_HANDLER>; -template class ACE_Strategy_Connector<TAO_HANDLER, ACE_LSOCK_CONNECTOR>; -template class TAO_SVC_TUPLE; - -template class ACE_Hash_Map_Manager<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>; -template class ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>; -template class ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; - -#if defined (TAO_USES_ROBUST_CONNECTION_MGMT) -template class ACE_Pair<TAO_HANDLER *, TAO_ATTRIBUTES>; -template class ACE_Reference_Pair<TAO_ADDR, TAO_HANDLER *>; -template class ACE_Hash_Map_Entry<TAO_ADDR, TAO_CACHED_HANDLER>; - -template class ACE_Hash_Map_Manager<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>; -template class ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>; -template class ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; -template class ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>; - -// = Caching_Strategy -template class ACE_Hash_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; - -template class ACE_LRU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; - -#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES) - -template class ACE_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; -template class ACE_LFU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; -template class ACE_FIFO_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; -template class ACE_Null_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>; - -template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_LRU_CACHING_STRATEGY>; -template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_LFU_CACHING_STRATEGY>; -template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_FIFO_CACHING_STRATEGY>; -template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_NULL_CACHING_STRATEGY>; - -template class ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; -template class ACE_Cache_Map_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; -template class ACE_Cache_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; - -#else - -template class ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>; - -#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */ - -template class ACE_Cached_Connect_Strategy_Ex<TAO_HANDLER, ACE_LSOCK_CONNECTOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES, TAO_Cached_Connector_Lock>; -template class ACE_Cached_Connect_Strategy<TAO_HANDLER, ACE_LSOCK_CONNECTOR, TAO_Cached_Connector_Lock>; - -template class ACE_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP>; -template class ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP>; -template class ACE_Refcounted_Recyclable_Handler_Caching_Utility<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_ATTRIBUTES>; -#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_Auto_Basic_Array_Ptr<ACE_UNIX_Addr> -#pragma instantiate ACE_Auto_Basic_Array_Ptr<TAO_UIOP_Client_Connection_Handler*> -#pragma instantiate auto_ptr<TAO_UIOP_Connect_Creation_Strategy> -#pragma instantiate ACE_Auto_Basic_Ptr<TAO_UIOP_Connect_Creation_Strategy> - -#pragma instantiate ACE_Node<ACE_UNIX_Addr> -#pragma instantiate ACE_Unbounded_Stack<ACE_UNIX_Addr> -#pragma instantiate ACE_Unbounded_Stack_Iterator<ACE_UNIX_Addr> - -#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT) -#pragma instantiate CACHED_CONNECT_STRATEGY; -#pragma instantiate TAO_ADDR; -#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ - -#pragma instantiate ACE_Svc_Handler<ACE_LSOCK_STREAM, ACE_NULL_SYNCH> -#pragma instantiate ACE_Refcounted_Hash_Recyclable<ACE_UNIX_Addr> -#pragma instantiate ACE_NOOP_Creation_Strategy<TAO_HANDLER> -#pragma instantiate ACE_Concurrency_Strategy<TAO_HANDLER> -#pragma instantiate ACE_Connect_Strategy<TAO_HANDLER, ACE_LSOCK_CONNECTOR> -#pragma instantiate ACE_Connector<TAO_HANDLER, ACE_LSOCK_CONNECTOR> -#pragma instantiate ACE_Creation_Strategy<TAO_HANDLER> -#pragma instantiate ACE_Hash_Map_Entry<TAO_ADDR, TAO_HANDLER *> -#pragma instantiate ACE_Hash<ACE_Refcounted_Hash_Recyclable<ACE_UNIX_Addr> > -#pragma instantiate ACE_Equal_To<ACE_Refcounted_Hash_Recyclable<ACE_UNIX_Addr> > -#pragma instantiate ACE_Map_Entry<ACE_HANDLE, TAO_SVC_TUPLE *> -#pragma instantiate ACE_Map_Manager<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator_Base<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Reverse_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_NOOP_Concurrency_Strategy<TAO_HANDLER> -#pragma instantiate ACE_Recycling_Strategy<TAO_HANDLER> -#pragma instantiate ACE_Strategy_Connector<TAO_HANDLER, ACE_LSOCK_CONNECTOR> -#pragma instantiate TAO_SVC_TUPLE - -#pragma instantiate ACE_Hash_Map_Manager<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> - -#if defined (TAO_USES_ROBUST_CONNECTION_MGMT) -#pragma instantiate ACE_Pair<TAO_HANDLER *, TAO_ATTRIBUTES> -#pragma instantiate ACE_Reference_Pair<TAO_ADDR, TAO_HANDLER *> -#pragma instantiate ACE_Hash_Map_Entry<TAO_ADDR, TAO_CACHED_HANDLER> - -#pragma instantiate ACE_Hash_Map_Manager<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex> - -// = Caching_Strategy -#pragma instantiate ACE_Hash_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> - -#pragma instantiate ACE_LRU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> - -#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES) - -#pragma instantiate ACE_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> -#pragma instantiate ACE_LFU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> -#pragma instantiate ACE_FIFO_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> -#pragma instantiate ACE_Null_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY> - -#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_LRU_CACHING_STRATEGY> -#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_LFU_CACHING_STRATEGY> -#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_FIFO_CACHING_STRATEGY> -#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_UIOP_NULL_CACHING_STRATEGY> - -#pragma instantiate ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> -#pragma instantiate ACE_Cache_Map_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> -#pragma instantiate ACE_Cache_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> - -#else - -#pragma instantiate ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES> - -#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */ - -#pragma instantiate ACE_Cached_Connect_Strategy_Ex<TAO_HANDLER, ACE_LSOCK_CONNECTOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES, TAO_Cached_Connector_Lock> -#pragma instantiate ACE_Cached_Connect_Strategy<TAO_HANDLER, ACE_LSOCK_CONNECTOR, TAO_Cached_Connector_Lock> - -#pragma instantiate ACE_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP> -#pragma instantiate ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP> -#pragma instantiate ACE_Refcounted_Recyclable_Handler_Caching_Utility<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_ATTRIBUTES> -#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */ - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - #endif /* TAO_HAS_UIOP */ |