diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-09-27 08:17:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-27 08:17:08 +0200 |
commit | d017dac249b849bc0fda979684166b2ca61b5578 (patch) | |
tree | 3c2b6e198a4538b9acdf7f9a402d6f18a5637fac /TAO/orbsvcs | |
parent | a59431844a4b19bec5cbdd0d292378b35fd98358 (diff) | |
parent | 53f510db8ce145bffcc165ed38d0bfd29ebf016c (diff) | |
download | ATCD-d017dac249b849bc0fda979684166b2ca61b5578.tar.gz |
Merge pull request #1687 from jwillemsen/jwi-autoptr5
Use std::unique_ptr and default
Diffstat (limited to 'TAO/orbsvcs')
45 files changed, 126 insertions, 247 deletions
diff --git a/TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplierMain.cpp b/TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplierMain.cpp index 18dd4175aff..58711925023 100644 --- a/TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplierMain.cpp +++ b/TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplierMain.cpp @@ -19,7 +19,7 @@ #include "tao/ORB_Core.h" -#include "ace/Auto_Ptr.h" +#include <memory> #include <iostream> #include <fstream> @@ -180,22 +180,20 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) receiver->connect (pub); // Create the appropriate event handler and register it with the reactor - auto_ptr<ACE_Event_Handler> eh; + std::unique_ptr<ACE_Event_Handler> eh; if (mcast) { - auto_ptr<TAO_ECG_Mcast_EH> mcast_eh(new TAO_ECG_Mcast_EH (receiver.in())); + std::unique_ptr<TAO_ECG_Mcast_EH> mcast_eh(new TAO_ECG_Mcast_EH (receiver.in())); mcast_eh->reactor (orb->orb_core ()->reactor ()); mcast_eh->open (ec.in()); - ACE_auto_ptr_reset(eh,mcast_eh.release()); - //eh.reset(mcast_eh.release()); + eh.reset(mcast_eh.release()); } else { - auto_ptr<TAO_ECG_UDP_EH> udp_eh (new TAO_ECG_UDP_EH (receiver.in())); + std::unique_ptr<TAO_ECG_UDP_EH> udp_eh (new TAO_ECG_UDP_EH (receiver.in())); udp_eh->reactor (orb->orb_core ()->reactor ()); ACE_INET_Addr local_addr (listenport); if (udp_eh->open (local_addr) == -1) { std::cerr << "Cannot open EH" << std::endl; } - ACE_auto_ptr_reset(eh,udp_eh.release()); - //eh.reset(udp_eh.release()); + eh.reset(udp_eh.release()); } // Create an event (just a string in this case). diff --git a/TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.cpp b/TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.cpp index 718240449ca..b75597b0c57 100644 --- a/TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.cpp +++ b/TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.cpp @@ -2,23 +2,14 @@ #include "CosEventChannelFactory_i.h" #include "orbsvcs/CosEvent/CEC_EventChannel.h" #include "tao/PortableServer/PortableServer.h" -#include "ace/Auto_Ptr.h" +#include <memory> -TAO_CosEventChannelFactory_i::TAO_CosEventChannelFactory_i (void) +TAO_CosEventChannelFactory_i::TAO_CosEventChannelFactory_i () :poa_ (PortableServer::POA::_nil ()), naming_ (CosNaming::NamingContext::_nil ()) { } -TAO_CosEventChannelFactory_i::~TAO_CosEventChannelFactory_i (void) -{ -#if 0 - ACE_DEBUG ((LM_DEBUG, - "in TAO_CosEventChannelFactory_i dtor")); -#endif - // No-Op. -} - int TAO_CosEventChannelFactory_i::init (PortableServer::POA_ptr poa, const char* child_poa_name, @@ -90,7 +81,7 @@ TAO_CosEventChannelFactory_i::create (const char * channel_id, TAO_CEC_EventChannel (attr, 0, 0), CORBA::NO_MEMORY ()); - auto_ptr <TAO_CEC_EventChannel> ec (impl); + std::unique_ptr <TAO_CEC_EventChannel> ec (impl); impl->activate (); @@ -153,10 +144,8 @@ TAO_CosEventChannelFactory_i::create (const char * channel_id, void TAO_CosEventChannelFactory_i::destroy -( - const char * channel_id, - CORBA::Boolean unbind_from_naming_service - ) + (const char * channel_id, + CORBA::Boolean unbind_from_naming_service) { ACE_ASSERT (!CORBA::is_nil (this->poa_.in ())); @@ -204,10 +193,7 @@ TAO_CosEventChannelFactory_i::destroy } CosEventChannelAdmin::EventChannel_ptr -TAO_CosEventChannelFactory_i::find -( - const char * channel_id - ) +TAO_CosEventChannelFactory_i::find(const char * channel_id) { ACE_ASSERT (!CORBA::is_nil (this->poa_.in ())); @@ -232,10 +218,7 @@ TAO_CosEventChannelFactory_i::find } char* -TAO_CosEventChannelFactory_i::find_channel_id -( - CosEventChannelAdmin::EventChannel_ptr channel - ) +TAO_CosEventChannelFactory_i::find_channel_id(CosEventChannelAdmin::EventChannel_ptr channel) { ACE_ASSERT (!CORBA::is_nil (this->poa_.in ())); @@ -254,4 +237,3 @@ TAO_CosEventChannelFactory_i::find_channel_id return str_return._retn (); } - diff --git a/TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.h b/TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.h index 33acba29395..f600e51dd3f 100644 --- a/TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.h +++ b/TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.h @@ -26,12 +26,12 @@ class TAO_CosEventChannelFactory_i : public virtual POA_CosEventChannelFactory::ChannelFactory { - public: +public: /// Constructor. - TAO_CosEventChannelFactory_i (void); + TAO_CosEventChannelFactory_i (); /// Destructor. - ~TAO_CosEventChannelFactory_i (void); + ~TAO_CosEventChannelFactory_i () = default; /** * This method creates a child poa with <poa> as the @@ -57,30 +57,16 @@ class TAO_CosEventChannelFactory_i : CosNaming::NamingContext_ptr naming = CosNaming::NamingContext::_nil ()); // = CosEventChannelFactory::ChannelFactory methods. - virtual CosEventChannelAdmin::EventChannel_ptr create - ( - const char * channel_id, - CORBA::Boolean store_in_naming_service - ); - - virtual void destroy - ( - const char * channel_id, - CORBA::Boolean unbind_from_naming_service - ); - - virtual CosEventChannelAdmin::EventChannel_ptr find - ( - const char * channel_id - ); - - virtual char * find_channel_id - ( - CosEventChannelAdmin::EventChannel_ptr channel - ); - protected: - - /// The Poa with which we activate all the Event Channels. + virtual CosEventChannelAdmin::EventChannel_ptr create (const char * channel_id, + CORBA::Boolean store_in_naming_service); + + virtual void destroy (const char * channel_id, CORBA::Boolean unbind_from_naming_service); + + virtual CosEventChannelAdmin::EventChannel_ptr find (const char * channel_id); + + virtual char * find_channel_id (CosEventChannelAdmin::EventChannel_ptr channel); +protected: + /// The POA with which we activate all the Event Channels. PortableServer::POA_var poa_; /// The naming context to use. diff --git a/TAO/orbsvcs/examples/CosEC/Factory/FactoryDriver.cpp b/TAO/orbsvcs/examples/CosEC/Factory/FactoryDriver.cpp index fcee32c9c77..74021f65fb5 100644 --- a/TAO/orbsvcs/examples/CosEC/Factory/FactoryDriver.cpp +++ b/TAO/orbsvcs/examples/CosEC/Factory/FactoryDriver.cpp @@ -8,12 +8,6 @@ FactoryDriver::FactoryDriver (const ACE_TCHAR* name) child_poa_name_ ("CosEC_ChildPOA"), factory_servant_ (0) { - //No-Op. -} - -FactoryDriver::~FactoryDriver (void) -{ - //No-Op. } int diff --git a/TAO/orbsvcs/examples/CosEC/Factory/FactoryDriver.h b/TAO/orbsvcs/examples/CosEC/Factory/FactoryDriver.h index 942070c7dd5..e4ab7c4b0db 100644 --- a/TAO/orbsvcs/examples/CosEC/Factory/FactoryDriver.h +++ b/TAO/orbsvcs/examples/CosEC/Factory/FactoryDriver.h @@ -38,13 +38,13 @@ class FactoryDriver FactoryDriver (const ACE_TCHAR* factory = ACE_TEXT("CosEC_Factory")); /// Destructor. - ~FactoryDriver (void); + ~FactoryDriver () = default; /// Start the driver. int start (int argc, ACE_TCHAR *argv []); - ///Stop the driver. - int stop (void); + /// Stop the driver. + int stop (); protected: /// Parse the command-line arguments and set options. @@ -70,6 +70,5 @@ class FactoryDriver /// Use a naming client. TAO_Naming_Client naming_client_; - }; #endif /* TAO_FACTORYDRIVER_H */ diff --git a/TAO/orbsvcs/examples/CosEC/Factory/README b/TAO/orbsvcs/examples/CosEC/Factory/README index 85215015cda..8a528a026d4 100644 --- a/TAO/orbsvcs/examples/CosEC/Factory/README +++ b/TAO/orbsvcs/examples/CosEC/Factory/README @@ -1,4 +1,3 @@ - CosEventChannelFactory ====================================================== diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ConsumerAdmin_i.cpp b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ConsumerAdmin_i.cpp index 6dbebc8de06..49a0415e491 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ConsumerAdmin_i.cpp +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ConsumerAdmin_i.cpp @@ -1,16 +1,10 @@ #include "ConsumerAdmin_i.h" -#include "ace/Auto_Ptr.h" +#include <memory> TAO_CosEC_ConsumerAdmin_i::TAO_CosEC_ConsumerAdmin_i (void) : qos_ (), rtec_consumeradmin_ (RtecEventChannelAdmin::ConsumerAdmin::_nil ()) { - // No-Op. -} - -TAO_CosEC_ConsumerAdmin_i::~TAO_CosEC_ConsumerAdmin_i (void) -{ - // No-Op. } int @@ -39,11 +33,9 @@ TAO_CosEC_ConsumerAdmin_i::obtain_push_supplier (void) rtecproxypushsupplier.in ()), proxysupplier_nil); - auto_ptr<TAO_CosEC_ProxyPushSupplier_i> - auto_proxysupplier (proxypushsupplier); + std::unique_ptr<TAO_CosEC_ProxyPushSupplier_i> auto_proxysupplier (proxypushsupplier); - CosEventChannelAdmin::ProxyPushSupplier_ptr proxy_obj = - auto_proxysupplier.get ()->_this (); + CosEventChannelAdmin::ProxyPushSupplier_ptr proxy_obj = auto_proxysupplier.get ()->_this (); // give the ownership to the POA. auto_proxysupplier.get ()->_remove_ref (); diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ConsumerAdmin_i.h b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ConsumerAdmin_i.h index d94835c339e..f84f4654d4f 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ConsumerAdmin_i.h +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ConsumerAdmin_i.h @@ -34,7 +34,7 @@ public: TAO_CosEC_ConsumerAdmin_i (void); /// Destructor. - ~TAO_CosEC_ConsumerAdmin_i (void); + ~TAO_CosEC_ConsumerAdmin_i () = default; int init (const RtecEventChannelAdmin::ConsumerQOS &consumerqos, RtecEventChannelAdmin::ConsumerAdmin_ptr rtec_consumeradmin); diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/CosEvent_Utilities.cpp b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/CosEvent_Utilities.cpp index 4e7356da398..71fbff1ea65 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/CosEvent_Utilities.cpp +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/CosEvent_Utilities.cpp @@ -4,7 +4,7 @@ #include "orbsvcs/Event_Service_Constants.h" #include "EventChannel_i.h" #include "ace/Auto_Ptr.h" -#include "ace/OS_NS_string.h" +#include <memory> CosEC_ServantBase::CosEC_ServantBase (void) :poa_ (PortableServer::POA::_nil ()), @@ -16,15 +16,6 @@ CosEC_ServantBase::CosEC_ServantBase (void) eventSourceIds_ (0), source_type_pairs_ (0) { - // No-Op. -} - -CosEC_ServantBase::~CosEC_ServantBase (void) -{ - // No-Op. -#if 0 - ACE_DEBUG ((LM_DEBUG, "in cosec servant base %d\n", this)); -#endif } void @@ -41,10 +32,10 @@ CosEC_ServantBase::init (PortableServer::POA_ptr thispoa, this->thispoa_ = PortableServer::POA::_duplicate (thispoa); this->poa_ = PortableServer::POA::_duplicate (poa); - auto_ptr<POA_RtecEventChannelAdmin::EventChannel> + std::unique_ptr<POA_RtecEventChannelAdmin::EventChannel> auto_rtec_servant_ (this->create_rtec ()); - auto_ptr<TAO_CosEC_EventChannel_i> + std::unique_ptr<TAO_CosEC_EventChannel_i> auto_cosec_servant_ (this->create_cosec ()); // if all the servants were allocated then set the class pointers. diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/CosEvent_Utilities.h b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/CosEvent_Utilities.h index 4438de78581..f3e359d7934 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/CosEvent_Utilities.h +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/CosEvent_Utilities.h @@ -37,7 +37,7 @@ class TAO_RTEC_COSEC_Export CosEC_ServantBase : CosEC_ServantBase (void); /// Destructor. - virtual ~CosEC_ServantBase (void); + virtual ~CosEC_ServantBase () = default; /** * This method creates a local scheduler, rtec and cosec. diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/EventChannel_i.cpp b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/EventChannel_i.cpp index fac4613996d..126eed592a0 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/EventChannel_i.cpp +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/EventChannel_i.cpp @@ -1,5 +1,5 @@ #include "EventChannel_i.h" -#include "ace/Auto_Ptr.h" +#include <memory> TAO_CosEC_EventChannel_i::TAO_CosEC_EventChannel_i (void) : consumer_admin_ (0), @@ -7,12 +7,6 @@ TAO_CosEC_EventChannel_i::TAO_CosEC_EventChannel_i (void) consumeradmin_ (CosEventChannelAdmin::ConsumerAdmin::_nil ()), supplieradmin_ (CosEventChannelAdmin::SupplierAdmin::_nil ()) { - // No-Op. -} - -TAO_CosEC_EventChannel_i::~TAO_CosEC_EventChannel_i (void) -{ - //No-Op. } int @@ -26,14 +20,14 @@ TAO_CosEC_EventChannel_i::init (const RtecEventChannelAdmin::ConsumerQOS &consum TAO_CosEC_ConsumerAdmin_i (), -1); - auto_ptr <TAO_CosEC_ConsumerAdmin_i> auto_consumer_ (consumer_); + std::unique_ptr <TAO_CosEC_ConsumerAdmin_i> auto_consumer_ (consumer_); TAO_CosEC_SupplierAdmin_i *supplier_; ACE_NEW_RETURN (supplier_, TAO_CosEC_SupplierAdmin_i (), -1); - auto_ptr <TAO_CosEC_SupplierAdmin_i> auto_supplier_ (supplier_); + std::unique_ptr <TAO_CosEC_SupplierAdmin_i> auto_supplier_ (supplier_); RtecEventChannelAdmin::ConsumerAdmin_ptr rtec_consumeradmin = rtec->for_consumers (); @@ -68,21 +62,19 @@ TAO_CosEC_EventChannel_i::init (const RtecEventChannelAdmin::ConsumerQOS &consum } CosEventChannelAdmin::ConsumerAdmin_ptr -TAO_CosEC_EventChannel_i::for_consumers (void) +TAO_CosEC_EventChannel_i::for_consumers () { // @@ Pradeep: you must make a copy here, because the caller is // responsible of removing this object. - return - CosEventChannelAdmin::ConsumerAdmin::_duplicate (this->consumeradmin_.in()); + return CosEventChannelAdmin::ConsumerAdmin::_duplicate (this->consumeradmin_.in()); } CosEventChannelAdmin::SupplierAdmin_ptr -TAO_CosEC_EventChannel_i::for_suppliers (void) +TAO_CosEC_EventChannel_i::for_suppliers () { // @@ Pradeep: you must make a copy here, because the caller is // responsible of removing this object, same here.. - return - CosEventChannelAdmin::SupplierAdmin::_duplicate (this->supplieradmin_.in ()); + return CosEventChannelAdmin::SupplierAdmin::_duplicate (this->supplieradmin_.in ()); } void @@ -105,4 +97,3 @@ TAO_CosEC_EventChannel_i::shutdown (void) { this->destroy (); } - diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/EventChannel_i.h b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/EventChannel_i.h index 28cd1d26251..683f878d464 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/EventChannel_i.h +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/EventChannel_i.h @@ -36,10 +36,10 @@ class TAO_RTEC_COSEC_Export TAO_CosEC_EventChannel_i : // public: /// Constructor. - TAO_CosEC_EventChannel_i (void); + TAO_CosEC_EventChannel_i (); /// Destructor. - ~TAO_CosEC_EventChannel_i (void); + ~TAO_CosEC_EventChannel_i () = default; /// Activates the ConsumerAdmin and SupplierAdmin servants. Returns /// -1 on error, 0 on success. diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushConsumer_i.cpp b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushConsumer_i.cpp index a97f3de4c2d..0adcb289b62 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushConsumer_i.cpp +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushConsumer_i.cpp @@ -5,7 +5,7 @@ #include "orbsvcs/RtecEventCommS.h" #include "orbsvcs/CosEventCommS.h" #include "ProxyPushConsumer_i.h" -#include "ace/Auto_Ptr.h" +#include <memory> #if defined(_MSC_VER) #pragma warning(disable:4250) @@ -25,10 +25,10 @@ public: TAO_CosEC_PushSupplierWrapper (CosEventComm::PushSupplier_ptr supplier); // Constructor. - ~TAO_CosEC_PushSupplierWrapper (void); + ~TAO_CosEC_PushSupplierWrapper () = default; // Destructor. - virtual void disconnect_push_supplier (void); + virtual void disconnect_push_supplier (); // Disconnects the push supplier. private: @@ -50,12 +50,6 @@ TAO_CosEC_PushSupplierWrapper::TAO_CosEC_PushSupplierWrapper (CosEventComm::PushSupplier_ptr supplier) : supplier_ (CosEventComm::PushSupplier::_duplicate (supplier)) { - // No-Op. -} - -TAO_CosEC_PushSupplierWrapper::~TAO_CosEC_PushSupplierWrapper (void) -{ - // No-Op. } void @@ -82,12 +76,10 @@ TAO_CosEC_ProxyPushConsumer_i::TAO_CosEC_ProxyPushConsumer_i (const RtecEventCha proxypushconsumer_ (RtecEventChannelAdmin::ProxyPushConsumer::_duplicate (proxypushconsumer)), wrapper_ (0) { - // No-Op. } TAO_CosEC_ProxyPushConsumer_i::~TAO_CosEC_ProxyPushConsumer_i (void) { - // No-Op. } void @@ -153,8 +145,7 @@ TAO_CosEC_ProxyPushConsumer_i::connect_push_supplier (CosEventComm::PushSupplier TAO_CosEC_PushSupplierWrapper (push_supplier), CORBA::NO_MEMORY ()); - auto_ptr <TAO_CosEC_PushSupplierWrapper> - auto_wrapper (wrapper); + std::unique_ptr <TAO_CosEC_PushSupplierWrapper> auto_wrapper (wrapper); RtecEventComm::PushSupplier_ptr rtecpushsupplier = auto_wrapper.get ()->_this (); diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.cpp b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.cpp index 10672a7a5a2..7528c70dfe3 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.cpp +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.cpp @@ -5,7 +5,7 @@ #include "orbsvcs/CosEventCommS.h" #include "orbsvcs/RtecEventCommS.h" #include "ProxyPushSupplier_i.h" -#include "ace/Auto_Ptr.h" +#include <memory> #if defined(_MSC_VER) #pragma warning(disable:4250) @@ -25,13 +25,13 @@ public: TAO_CosEC_PushConsumerWrapper (CosEventComm::PushConsumer_ptr consumer); // Constructor. - ~TAO_CosEC_PushConsumerWrapper (void); + ~TAO_CosEC_PushConsumerWrapper () = default; // Destructor. - virtual void push (const RtecEventComm::EventSet & data); + void push (const RtecEventComm::EventSet & data) override; // This method is called by the RTEvent Channel to supply data. - virtual void disconnect_push_consumer (void); + void disconnect_push_consumer () override; // Disconnects the consumer from the event channel. private: @@ -47,12 +47,6 @@ TAO_CosEC_PushConsumerWrapper::TAO_CosEC_PushConsumerWrapper (CosEventComm::PushConsumer_ptr consumer) : consumer_ (CosEventComm::PushConsumer::_duplicate (consumer)) { - // No-Op. -} - -TAO_CosEC_PushConsumerWrapper::~TAO_CosEC_PushConsumerWrapper () -{ - // No-Op. } void @@ -98,12 +92,6 @@ TAO_CosEC_ProxyPushSupplier_i::TAO_CosEC_ProxyPushSupplier_i pps_ (RtecEventChannelAdmin::ProxyPushSupplier::_duplicate (pps)), wrapper_ (0) { - // No-Op. -} - -TAO_CosEC_ProxyPushSupplier_i::~TAO_CosEC_ProxyPushSupplier_i (void) -{ - // No-Op. } void @@ -138,7 +126,7 @@ TAO_CosEC_ProxyPushSupplier_i::connect_push_consumer (CosEventComm::PushConsumer TAO_CosEC_PushConsumerWrapper (push_consumer), CORBA::NO_MEMORY ()); - auto_ptr <TAO_CosEC_PushConsumerWrapper> auto_wrapper (wrapper); + std::unique_ptr <TAO_CosEC_PushConsumerWrapper> auto_wrapper (wrapper); // @@ This code is not exception safe. RtecEventComm::PushConsumer_ptr rtecpushconsumer = diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.h b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.h index fbadf4ef673..245f4f3c449 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.h +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.h @@ -37,7 +37,7 @@ public: RtecEventChannelAdmin::ProxyPushSupplier_ptr pps); /// Destructor. - ~TAO_CosEC_ProxyPushSupplier_i (void); + ~TAO_CosEC_ProxyPushSupplier_i () = default; /// Ends the event communication and disposes this object. virtual void disconnect_push_supplier (void); diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/SupplierAdmin_i.cpp b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/SupplierAdmin_i.cpp index ba277070aa2..9de4ca109e6 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/SupplierAdmin_i.cpp +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/SupplierAdmin_i.cpp @@ -1,16 +1,10 @@ #include "SupplierAdmin_i.h" -#include "ace/Auto_Ptr.h" +#include <memory> TAO_CosEC_SupplierAdmin_i::TAO_CosEC_SupplierAdmin_i (void) : qos_ (), rtec_supplieradmin_ (RtecEventChannelAdmin::SupplierAdmin::_nil ()) { - // No-Op. -} - -TAO_CosEC_SupplierAdmin_i::~TAO_CosEC_SupplierAdmin_i (void) -{ - // No-Op. } int @@ -38,7 +32,7 @@ TAO_CosEC_SupplierAdmin_i::obtain_push_consumer (void) TAO_CosEC_ProxyPushConsumer_i (this->qos_, rtecproxypushconsumer.in ()), proxyconsumer_nil); - auto_ptr <TAO_CosEC_ProxyPushConsumer_i> + std::unique_ptr <TAO_CosEC_ProxyPushConsumer_i> auto_proxyconsumer (proxypushconsumer); CosEventChannelAdmin::ProxyPushConsumer_ptr proxy_obj = @@ -57,4 +51,3 @@ TAO_CosEC_SupplierAdmin_i::obtain_pull_consumer (void) // TODO: implement this. return CosEventChannelAdmin::ProxyPullConsumer::_nil (); } - diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/SupplierAdmin_i.h b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/SupplierAdmin_i.h index d3981ec6f38..d3c7c3c763a 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/SupplierAdmin_i.h +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/SupplierAdmin_i.h @@ -30,10 +30,10 @@ class TAO_RTEC_COSEC_Export TAO_CosEC_SupplierAdmin_i : // TAO's RtecEventChannelAdmin::SupplierAdmin. public: /// Constructor. - TAO_CosEC_SupplierAdmin_i (void); + TAO_CosEC_SupplierAdmin_i (); /// Destructor. - ~TAO_CosEC_SupplierAdmin_i (void); + ~TAO_CosEC_SupplierAdmin_i () = default; /// Initializes the SupplierAdmin. Returns 0 on success, -1 on /// error. @@ -41,12 +41,10 @@ public: RtecEventChannelAdmin::SupplierAdmin_ptr rtec_supplieradmin); /// Returns a new ProxyPushConsumer_ptr. - virtual CosEventChannelAdmin::ProxyPushConsumer_ptr - obtain_push_consumer (void); + virtual CosEventChannelAdmin::ProxyPushConsumer_ptr obtain_push_consumer (); /// Returns a new ProxyPullConsumer_ptr. - virtual CosEventChannelAdmin::ProxyPullConsumer_ptr - obtain_pull_consumer(void); + virtual CosEventChannelAdmin::ProxyPullConsumer_ptr obtain_pull_consumer(void); private: /// The SupplierQOS specified by the user of this class. diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector_Loader.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector_Loader.cpp index 80f63e40ab1..8e464918e14 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector_Loader.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector_Loader.cpp @@ -43,7 +43,7 @@ namespace FTRTEC { if (argc > 0 && ACE_OS::strcasecmp (argv[0], ACE_TEXT("sctp")) == 0) { #if (TAO_HAS_SCIOP == 1) - ACE_auto_ptr_reset(detector_, detector); + detector_.reset (detector); #else ORBSVCS_DEBUG ((LM_DEBUG, "(%P|%t) SCTP not enabled. ", diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Replication_Service.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Replication_Service.cpp index 52656b42fba..124d4dfaad5 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Replication_Service.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Replication_Service.cpp @@ -68,7 +68,7 @@ namespace FTRTEC TAO_FTRTEC::Log(3, ACE_TEXT("Basic replication strategy\n")); } - ACE_auto_ptr_reset (replication_strategy, strategy); + replication_strategy.reset (strategy); try { @@ -104,7 +104,7 @@ namespace FTRTEC ACE_ASSERT(strategy); if (replication_strategy.get() != strategy) { - ACE_auto_ptr_reset(replication_strategy, strategy); + replication_strategy.reset (strategy); } } diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.cpp index 8be0a079531..ca950730ea5 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.cpp @@ -298,7 +298,7 @@ void TAO::PG_FactoryRegistry::register_factory ( RoleInfo(5), CORBA::NO_MEMORY()); - ACE_auto_ptr_reset (safe_entry, role_info); + safe_entry.reset (role_info); role_info->type_id_ = type_id; } else diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp index a1822362dce..8d3ebffb5ae 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp @@ -251,8 +251,7 @@ TAO::PG_Object_Group_Storable::PG_Object_Group_Storable ( // version already exists. bool stream_exists = false; { - ACE_Auto_Ptr<TAO::Storable_Base> stream ( - this->create_stream ("r")); + ACE_Auto_Ptr<TAO::Storable_Base> stream (this->create_stream ("r")); if (stream->exists ()) stream_exists = true; @@ -290,8 +289,7 @@ TAO::PG_Object_Group_Storable::PG_Object_Group_Storable ( // version already exists. bool stream_exists = false; { - ACE_Auto_Ptr<TAO::Storable_Base> stream ( - this->create_stream ("r")); + ACE_Auto_Ptr<TAO::Storable_Base> stream (this->create_stream ("r")); if (stream->exists ()) stream_exists = true; @@ -311,16 +309,13 @@ TAO::PG_Object_Group_Storable::~PG_Object_Group_Storable () { if (destroyed_) { - ACE_Auto_Ptr<TAO::Storable_Base> stream ( - this->create_stream ("r")); + ACE_Auto_Ptr<TAO::Storable_Base> stream (this->create_stream ("r")); if (stream->exists ()) { stream->remove (); } - } - } void diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Control.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Control.cpp index b2d7abaab8c..ffcc2320f5a 100644 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Control.cpp +++ b/TAO/orbsvcs/performance-tests/RTEvent/lib/Control.cpp @@ -113,18 +113,14 @@ Control::join (Federated_Test::Peer_ptr peer) this->peers_[j]->setup_loopback (experiment_id, base_event_type); - ACE_auto_ptr_reset (disconnects[lcount], - new Loopback_Disconnect ( - loopbacks[lcount].in ())); + disconnects[lcount].reset (new Loopback_Disconnect (loopbacks[lcount].in ())); lcount++; loopbacks[lcount] = this->peers_[j]->setup_loopback (experiment_id, base_event_type + 2); - ACE_auto_ptr_reset (disconnects[lcount], - new Loopback_Disconnect ( - loopbacks[lcount].in ())); + disconnects[lcount].reset (new Loopback_Disconnect (loopbacks[lcount].in ())); lcount++; } } diff --git a/TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.cpp b/TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.cpp index 3636ba44692..c83ad1204c4 100644 --- a/TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.cpp +++ b/TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.cpp @@ -75,10 +75,7 @@ Low_Priority_Setup (int consumer_count, this->clients_[j].supplier (), barrier); this->tasks_[j].thr_mgr (&this->thr_mgr_); - ACE_auto_ptr_reset (this->stoppers_[j], - new Send_Task_Stopper (thread_priority, - thread_sched_class, - &this->tasks_[j])); + this->stoppers_[j].reset (new Send_Task_Stopper (thread_priority, thread_sched_class, &this->tasks_[j])); } } diff --git a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.cpp b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.cpp index 397f37adb0e..4ae2f574a8e 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.cpp +++ b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.cpp @@ -13,7 +13,6 @@ EchoEventConsumer_i::EchoEventConsumer_i(CORBA::ORB_ptr orb, int event_limit) : orb_(CORBA::ORB::_duplicate(orb)) , event_limit_(event_limit) { - // Nothing to do. } // Implement the push() operation. diff --git a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.h b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.h index 0417aa89000..0dfdd9ed605 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.h +++ b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.h @@ -8,18 +8,18 @@ class EchoEventConsumer_i : public virtual POA_RtecEventComm::PushConsumer { - public: - // Constructor - EchoEventConsumer_i(CORBA::ORB_ptr orb, int event_limit); +public: + // Constructor + EchoEventConsumer_i(CORBA::ORB_ptr orb, int event_limit); - // Override operations from PushConsumer interface. - virtual void push(const RtecEventComm::EventSet& events); + // Override operations from PushConsumer interface. + virtual void push(const RtecEventComm::EventSet& events); - virtual void disconnect_push_consumer(); + virtual void disconnect_push_consumer(); - private: - CORBA::ORB_var orb_; - int event_limit_; +private: + CORBA::ORB_var orb_; + int event_limit_; }; #endif // _EchoEventConsumer_i_h_ diff --git a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplierMain.cpp b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplierMain.cpp index 99e1f474cce..275830979d2 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplierMain.cpp +++ b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplierMain.cpp @@ -20,7 +20,7 @@ #include "tao/ORB_Core.h" #include "ace/OS_NS_strings.h" -#include "ace/Auto_Ptr.h" +#include <memory> #include <fstream> const RtecEventComm::EventSourceID MY_SOURCE_ID = ACE_ES_EVENT_SOURCE_ANY + 1; @@ -193,22 +193,20 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) receiver->connect (pub); // Create the appropriate event handler and register it with the reactor - auto_ptr<ACE_Event_Handler> eh; + std::unique_ptr<ACE_Event_Handler> eh; if (mcast) { - auto_ptr<TAO_ECG_Mcast_EH> mcast_eh(new TAO_ECG_Mcast_EH (receiver.in())); + std::unique_ptr<TAO_ECG_Mcast_EH> mcast_eh(new TAO_ECG_Mcast_EH (receiver.in())); mcast_eh->reactor (orb->orb_core ()->reactor ()); mcast_eh->open (ec.in()); - ACE_auto_ptr_reset(eh,mcast_eh.release()); - //eh.reset(mcast_eh.release()); + eh.reset (mcast_eh.release()); } else { - auto_ptr<TAO_ECG_UDP_EH> udp_eh (new TAO_ECG_UDP_EH (receiver.in())); + std::unique_ptr<TAO_ECG_UDP_EH> udp_eh (new TAO_ECG_UDP_EH (receiver.in())); udp_eh->reactor (orb->orb_core ()->reactor ()); ACE_INET_Addr local_addr (listenport); if (udp_eh->open (local_addr) == -1) ACE_ERROR ((LM_ERROR,"Cannot open EH\n")); - ACE_auto_ptr_reset(eh,udp_eh.release()); - //eh.reset(udp_eh.release()); + eh.reset(udp_eh.release()); } // Create an event (just a string in this case). diff --git a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplier_i.cpp b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplier_i.cpp index af651e069a4..59540133373 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplier_i.cpp +++ b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplier_i.cpp @@ -8,7 +8,6 @@ EchoEventSupplier_i::EchoEventSupplier_i(CORBA::ORB_ptr orb) : orb_(CORBA::ORB::_duplicate(orb)) { - // Nothing to do. } // Override the disconnect_push_Supplier() operation. diff --git a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplier_i.h b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplier_i.h index 3cba086c295..7634682f6ab 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplier_i.h +++ b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplier_i.h @@ -8,14 +8,14 @@ class EchoEventSupplier_i : public virtual POA_RtecEventComm::PushSupplier { - public: - // Constructor - EchoEventSupplier_i(CORBA::ORB_ptr orb); +public: + // Constructor + EchoEventSupplier_i(CORBA::ORB_ptr orb); - virtual void disconnect_push_supplier(); + virtual void disconnect_push_supplier(); - private: - CORBA::ORB_var orb_; +private: + CORBA::ORB_var orb_; }; #endif // _EchoEventSupplier_i_h_ diff --git a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/README b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/README index 2fc738378e9..0fbc9d929e5 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/README +++ b/TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/README @@ -1,11 +1,5 @@ - - Real-Time Event Service - -File: TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/README - - This directory contains an example that shows how to create and federate real-time event channels using the classes in EC_Gateway_UDP.h. Depending on the options, it will use either UDP or multicast to link diff --git a/TAO/orbsvcs/tests/Notify/Blocking/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Blocking/Structured_Supplier.cpp index 8d8bb055f34..775a6705faf 100644 --- a/TAO/orbsvcs/tests/Notify/Blocking/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Blocking/Structured_Supplier.cpp @@ -2,7 +2,6 @@ // Include Section // ****************************************************************** -#include "ace/Auto_Ptr.h" #include "ace/Get_Opt.h" #include "tao/ORB_Core.h" @@ -17,6 +16,7 @@ #include "Notify_Test_Client.h" #include "ace/OS_NS_unistd.h" +#include <memory> // ****************************************************************** // Data Section @@ -164,7 +164,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; - ACE_Auto_Ptr< sig_i > sig_impl; + std::unique_ptr<sig_i> sig_impl; try { Supplier_Client client; diff --git a/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/Structured_Supplier.cpp index 5853851ca20..30bc187985d 100644 --- a/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/Structured_Supplier.cpp @@ -2,7 +2,6 @@ // Include Section // ****************************************************************** -#include "ace/Auto_Ptr.h" #include "ace/Get_Opt.h" #include "ace/OS_NS_unistd.h" @@ -16,7 +15,7 @@ #include "goS.h" #include "Notify_StructuredPushSupplier.h" #include "Notify_Test_Client.h" - +#include <memory> // ****************************************************************** // Data Section @@ -174,7 +173,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; - ACE_Auto_Ptr< sig_i > sig_impl; + std::unique_ptr<sig_i> sig_impl; try { Supplier_Client client; diff --git a/TAO/orbsvcs/tests/Notify/Bug_2415_Regression/Supplier.cpp b/TAO/orbsvcs/tests/Notify/Bug_2415_Regression/Supplier.cpp index 2628c22c28d..e48a65eba34 100644 --- a/TAO/orbsvcs/tests/Notify/Bug_2415_Regression/Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Bug_2415_Regression/Supplier.cpp @@ -3,7 +3,6 @@ // ****************************************************************** #include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" #include "tao/ORB_Core.h" @@ -17,6 +16,7 @@ #include "Notify_Test_Client.h" #include "ace/OS_NS_unistd.h" +#include <memory> // ****************************************************************** // Data Section @@ -181,7 +181,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - ACE_Auto_Ptr< sig_i > sig_impl; + std::unique_ptr<sig_i> sig_impl; int status = 0; try { diff --git a/TAO/orbsvcs/tests/Notify/Bug_2561_Regression/Supplier.cpp b/TAO/orbsvcs/tests/Notify/Bug_2561_Regression/Supplier.cpp index d434d603101..704b8e90969 100644 --- a/TAO/orbsvcs/tests/Notify/Bug_2561_Regression/Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Bug_2561_Regression/Supplier.cpp @@ -3,7 +3,6 @@ // ****************************************************************** #include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" #include "ace/Argv_Type_Converter.h" #include "tao/ORB_Core.h" @@ -16,7 +15,7 @@ #include "goS.h" #include "Notify_Test_Client.h" - +#include <memory> // ****************************************************************** // Data Section @@ -144,7 +143,7 @@ int ACE_TMAIN (int argc, ACE_TCHAR* argv[]) { int status = 0; - ACE_Auto_Ptr<sig_i> sig_impl; + std::unique_ptr<sig_i> sig_impl; try { Supplier_Client client; diff --git a/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp index 76323b2cf52..f4a34751c7e 100644 --- a/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp @@ -3,7 +3,6 @@ // ****************************************************************** #include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" #include "tao/ORB_Core.h" @@ -17,6 +16,7 @@ #include "Notify_Test_Client.h" #include "ace/OS_NS_unistd.h" +#include <memory> // ****************************************************************** // Data Section @@ -199,7 +199,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; - ACE_Auto_Ptr< sig_i > sig_impl; + std::unique_ptr<sig_i> sig_impl; try { Supplier_Client client; diff --git a/TAO/orbsvcs/tests/Notify/Discarding/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Discarding/Structured_Supplier.cpp index c32ac84d38e..804b17a6b9e 100644 --- a/TAO/orbsvcs/tests/Notify/Discarding/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Discarding/Structured_Supplier.cpp @@ -3,7 +3,6 @@ // ****************************************************************** #include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" #include "tao/ORB_Core.h" @@ -17,6 +16,7 @@ #include "Notify_Test_Client.h" #include "ace/OS_NS_unistd.h" +#include <memory> // ****************************************************************** // Data Section @@ -181,7 +181,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; - ACE_Auto_Ptr< sig_i > sig_impl; + std::unique_ptr<sig_i> sig_impl; try { Supplier_Client client; diff --git a/TAO/orbsvcs/tests/Notify/MT_Dispatching/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/MT_Dispatching/Structured_Supplier.cpp index c2240ce41d0..24b80db3734 100644 --- a/TAO/orbsvcs/tests/Notify/MT_Dispatching/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/MT_Dispatching/Structured_Supplier.cpp @@ -3,7 +3,6 @@ // ****************************************************************** #include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" #include "tao/ORB_Core.h" @@ -16,6 +15,7 @@ #include "Notify_Test_Client.h" #include "ace/OS_NS_unistd.h" +#include <memory> // ****************************************************************** // Data Section @@ -183,7 +183,7 @@ disconnect_suppliers (void) int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - ACE_Auto_Ptr< sig_i > sig_impl; + std::unique_ptr<sig_i> sig_impl; try { Consumer_Client client; diff --git a/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp index efaf293783e..5e27ddae75e 100644 --- a/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp @@ -12,7 +12,7 @@ #include "ace/Get_Opt.h" #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_strings.h" -#include "ace/Auto_Ptr.h" +#include <memory> static TAO_Notify_Tests_SequencePushSupplier* supplier_1 = 0; static CORBA::Short order_policy = CosNotification::FifoOrder; @@ -192,7 +192,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - ACE_Auto_Ptr< sig_i > sig_impl; + std::unique_ptr<sig_i> sig_impl; try { Supplier_Client client; diff --git a/TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp index 7529a8a8a21..5819d40c438 100644 --- a/TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp @@ -12,7 +12,7 @@ #include "ace/Get_Opt.h" #include "ace/OS_NS_unistd.h" -#include "ace/Auto_Ptr.h" +#include <memory> static TAO_Notify_Tests_StructuredPushSupplier* supplier_1 = 0; static CORBA::Short order_policy = CosNotification::FifoOrder; @@ -188,7 +188,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - ACE_Auto_Ptr< sig_i > sig_impl; + std::unique_ptr<sig_i> sig_impl; try { Supplier_Client client; diff --git a/TAO/orbsvcs/tests/Notify/Persistent_POA/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Persistent_POA/Structured_Supplier.cpp index 1dfc2c5ecdc..3cce413cf5b 100644 --- a/TAO/orbsvcs/tests/Notify/Persistent_POA/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Persistent_POA/Structured_Supplier.cpp @@ -14,6 +14,7 @@ #include "goS.h" #include "Notify_Test_Client.h" +#include <memory> // ****************************************************************** // Data Section @@ -166,7 +167,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; - ACE_Auto_Ptr< sig_i > sig_impl; + std::unique_ptr<sig_i> sig_impl; try { Supplier_Client client; diff --git a/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp index 5c552723a2d..574b52a02dd 100644 --- a/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp @@ -3,7 +3,6 @@ // ****************************************************************** #include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" #include "tao/ORB_Core.h" @@ -17,6 +16,7 @@ #include "Notify_Test_Client.h" #include "ace/OS_NS_unistd.h" +#include <memory> // ****************************************************************** // Data Section @@ -194,7 +194,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - ACE_Auto_Ptr< sig_i > sig_impl; + std::unique_ptr<sig_i> sig_impl; int status = 0; try { diff --git a/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Supplier.cpp index 432b91c5077..fd89827869b 100644 --- a/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Supplier.cpp @@ -3,7 +3,6 @@ // ****************************************************************** #include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" // FUZZ: disable check_for_streams_include #include "ace/streams.h" @@ -19,6 +18,7 @@ #include "Notify_Test_Client.h" #include "ace/OS_NS_unistd.h" +#include <memory> // ****************************************************************** // Data Section @@ -195,7 +195,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - ACE_Auto_Ptr< sig_i > sig_impl; + std::unique_ptr<sig_i> sig_impl; int status = 0; try { diff --git a/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp index 8007cf18b4b..a954f64c908 100644 --- a/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp @@ -13,8 +13,8 @@ #include "ace/Get_Opt.h" #include "ace/OS_NS_strings.h" -#include "ace/Auto_Ptr.h" #include "ace/OS_NS_unistd.h" +#include <memory> static const ACE_TCHAR *ior_file = ACE_TEXT ("supplier.ior"); static TAO_Notify_Tests_StructuredPushSupplier* supplier = 0; @@ -153,7 +153,7 @@ static void create_supplier (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - ACE_Auto_Ptr< sig_i > sig_impl; + std::unique_ptr<sig_i> sig_impl; try { Notify_Test_Client client; diff --git a/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Supplier.cpp index 37c90df467c..c3099b60ae0 100644 --- a/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Supplier.cpp @@ -10,8 +10,8 @@ #include "ace/Get_Opt.h" #include "ace/OS_NS_strings.h" -#include "ace/Auto_Ptr.h" #include "ace/OS_NS_unistd.h" +#include <memory> static const ACE_TCHAR *ior_output_file = ACE_TEXT ("supplier.ior"); static bool useFilters = false; @@ -191,7 +191,7 @@ void add_admin_filter (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - ACE_Auto_Ptr< sig_i > sig_impl; + std::unique_ptr<sig_i> sig_impl; try { Supplier_Client client; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Supplier.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Supplier.cpp index 09358f9d053..92a936634e6 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Supplier.cpp @@ -3,7 +3,6 @@ // ****************************************************************** #include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" #include "tao/ORB_Core.h" @@ -16,6 +15,7 @@ #include "Notify_Test_Client.h" #include "ace/OS_NS_unistd.h" +#include <memory> // ****************************************************************** // Data Section @@ -174,7 +174,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - ACE_Auto_Ptr< sig_i > sig_impl; + std::unique_ptr<sig_i> sig_impl; int status = 0; try { @@ -189,7 +189,7 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) CORBA::ORB_ptr orb = client.orb (); - sig_impl.reset( new sig_i( orb ) ); + sig_impl.reset(new sig_i( orb ) ); sig_var sig = sig_impl->_this (); CORBA::String_var ior = diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Supplier.cpp index 84d4860bb16..c140fa781cf 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Supplier.cpp @@ -3,7 +3,6 @@ // ****************************************************************** #include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" #include "tao/ORB_Core.h" @@ -16,6 +15,7 @@ #include "Notify_Test_Client.h" #include "ace/OS_NS_unistd.h" +#include <memory> // ****************************************************************** // Data Section @@ -169,7 +169,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - ACE_Auto_Ptr< sig_i > sig_impl; + std::unique_ptr<sig_i> sig_impl; int status = 0; try { |