summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-09-26 19:10:02 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-09-26 19:10:02 +0200
commitad7a6707a41f88f8fdf043cfc44f8674698880f0 (patch)
tree4bbb35e047ed1d561947b5df32be323b32ec6dd4 /TAO
parent27010649539be8117b37516080a7091969a4b03a (diff)
downloadATCD-ad7a6707a41f88f8fdf043cfc44f8674698880f0.tar.gz
Use std::unique_ptr and default
* ACE/ace/INET_Addr.cpp: * ACE/ace/Parse_Node.h: * ACE/ace/Service_Gestalt.cpp: * ACE/ace/TLI.cpp: * ACE/ace/Thread_Manager.cpp: * ACE/ace/UUID.cpp: * ACE/ace/UUID.h: * ACE/ace/WFMO_Reactor.cpp: * ACE/tests/CDR_File_Test.cpp: * TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplierMain.cpp: * TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.cpp: * TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.h: * TAO/orbsvcs/examples/CosEC/Factory/FactoryDriver.cpp: * TAO/orbsvcs/examples/CosEC/Factory/FactoryDriver.h: * TAO/orbsvcs/examples/CosEC/Factory/README: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ConsumerAdmin_i.cpp: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ConsumerAdmin_i.h: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/CosEvent_Utilities.cpp: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/CosEvent_Utilities.h: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/EventChannel_i.cpp: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/EventChannel_i.h: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushConsumer_i.cpp: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.cpp: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.h: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/SupplierAdmin_i.cpp: * TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/SupplierAdmin_i.h: * TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector_Loader.cpp: * TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Replication_Service.cpp: * TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.cpp: * TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp: * TAO/orbsvcs/performance-tests/RTEvent/lib/Control.cpp: * TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.cpp: * TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.cpp: * TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.h: * TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplierMain.cpp: * TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplier_i.cpp: * TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplier_i.h: * TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/README: * TAO/orbsvcs/tests/Notify/Blocking/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Bug_1385_Regression/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Bug_2415_Regression/Supplier.cpp: * TAO/orbsvcs/tests/Notify/Bug_2561_Regression/Supplier.cpp: * TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Discarding/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/MT_Dispatching/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Persistent_POA/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Supplier.cpp: * TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Supplier.cpp: * TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Supplier.cpp: * TAO/tao/IORManipulation/IORManipulation.cpp: * TAO/tao/Leader_Follower.cpp: * TAO/tao/Load_Protocol_Factory_T.h: * TAO/tao/ORB_Core.cpp: * TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp: * TAO/tao/default_resource.cpp: * TAO/tests/Oneway_Send_Timeouts/Server.cpp: * TAO/tests/Storable/Savable.cpp:
Diffstat (limited to 'TAO')
-rw-r--r--TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_MCast_Federated/EchoEventSupplierMain.cpp14
-rw-r--r--TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.cpp32
-rw-r--r--TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory_i.h40
-rw-r--r--TAO/orbsvcs/examples/CosEC/Factory/FactoryDriver.cpp6
-rw-r--r--TAO/orbsvcs/examples/CosEC/Factory/FactoryDriver.h7
-rw-r--r--TAO/orbsvcs/examples/CosEC/Factory/README1
-rw-r--r--TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ConsumerAdmin_i.cpp14
-rw-r--r--TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ConsumerAdmin_i.h2
-rw-r--r--TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/CosEvent_Utilities.cpp15
-rw-r--r--TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/CosEvent_Utilities.h2
-rw-r--r--TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/EventChannel_i.cpp23
-rw-r--r--TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/EventChannel_i.h4
-rw-r--r--TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushConsumer_i.cpp17
-rw-r--r--TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.cpp22
-rw-r--r--TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.h2
-rw-r--r--TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/SupplierAdmin_i.cpp11
-rw-r--r--TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/SupplierAdmin_i.h10
-rw-r--r--TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector_Loader.cpp2
-rw-r--r--TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Replication_Service.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.cpp2
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp11
-rw-r--r--TAO/orbsvcs/performance-tests/RTEvent/lib/Control.cpp8
-rw-r--r--TAO/orbsvcs/performance-tests/RTEvent/lib/Low_Priority_Setup.cpp5
-rw-r--r--TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.cpp1
-rw-r--r--TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.h18
-rw-r--r--TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplierMain.cpp14
-rw-r--r--TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplier_i.cpp1
-rw-r--r--TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventSupplier_i.h12
-rw-r--r--TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/README6
-rw-r--r--TAO/orbsvcs/tests/Notify/Blocking/Structured_Supplier.cpp4
-rw-r--r--TAO/orbsvcs/tests/Notify/Bug_1385_Regression/Structured_Supplier.cpp5
-rw-r--r--TAO/orbsvcs/tests/Notify/Bug_2415_Regression/Supplier.cpp4
-rw-r--r--TAO/orbsvcs/tests/Notify/Bug_2561_Regression/Supplier.cpp5
-rw-r--r--TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp4
-rw-r--r--TAO/orbsvcs/tests/Notify/Discarding/Structured_Supplier.cpp4
-rw-r--r--TAO/orbsvcs/tests/Notify/MT_Dispatching/Structured_Supplier.cpp4
-rw-r--r--TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp4
-rw-r--r--TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp4
-rw-r--r--TAO/orbsvcs/tests/Notify/Persistent_POA/Structured_Supplier.cpp3
-rw-r--r--TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp4
-rw-r--r--TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Supplier.cpp4
-rw-r--r--TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp4
-rw-r--r--TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Supplier.cpp4
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Supplier.cpp6
-rw-r--r--TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Supplier.cpp4
-rw-r--r--TAO/tao/IORManipulation/IORManipulation.cpp6
-rw-r--r--TAO/tao/Leader_Follower.cpp5
-rw-r--r--TAO/tao/Load_Protocol_Factory_T.h3
-rw-r--r--TAO/tao/ORB_Core.cpp5
-rw-r--r--TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp2
-rw-r--r--TAO/tao/default_resource.cpp5
-rw-r--r--TAO/tests/Oneway_Send_Timeouts/Server.cpp4
-rw-r--r--TAO/tests/Storable/Savable.cpp3
53 files changed, 142 insertions, 264 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
{
diff --git a/TAO/tao/IORManipulation/IORManipulation.cpp b/TAO/tao/IORManipulation/IORManipulation.cpp
index 8eac641e59e..4f6772fd90d 100644
--- a/TAO/tao/IORManipulation/IORManipulation.cpp
+++ b/TAO/tao/IORManipulation/IORManipulation.cpp
@@ -55,8 +55,7 @@ TAO_IOR_Manipulation_impl::merge_iors (
for (i = 1; i < iors.length () ; i++)
{
// this gets a copy of the MProfile, hence the auto_ptr;
- ACE_auto_ptr_reset (tmp_pfiles,
- iors[i]->_stubobj ()->make_profiles ());
+ tmp_pfiles.reset (iors[i]->_stubobj ()->make_profiles ());
// check to see if any of the profiles in tmp_pfiles are already
// in Merged_Profiles. If so raise exception.
@@ -183,8 +182,7 @@ TAO_IOR_Manipulation_impl::remove_profiles (
// Now we can remove the profiles which we want to eliminate from
// the Object.
- ACE_auto_ptr_reset (tmp_pfiles,
- ior2->_stubobj ()->make_profiles ());
+ tmp_pfiles.reset (ior2->_stubobj ()->make_profiles ());
TAO_MProfile& mp = stub -> base_profiles();
if (mp.remove_profiles (tmp_pfiles.get ()) < 0)
diff --git a/TAO/tao/Leader_Follower.cpp b/TAO/tao/Leader_Follower.cpp
index 7baf6687771..8ba45c8dab6 100644
--- a/TAO/tao/Leader_Follower.cpp
+++ b/TAO/tao/Leader_Follower.cpp
@@ -1,6 +1,5 @@
#include "ace/OS_NS_sys_time.h"
#include "ace/Reactor.h"
-#include "ace/Auto_Ptr.h"
#include "tao/Leader_Follower.h"
#include "tao/LF_Follower_Auto_Ptr.h"
@@ -12,6 +11,8 @@
#include "tao/ORB_Core.h"
#include "tao/ORB_Time_Policy.h"
+#include <memory>
+
#if !defined (__ACE_INLINE__)
# include "tao/Leader_Follower.inl"
#endif /* ! __ACE_INLINE__ */
@@ -225,7 +226,7 @@ TAO_Leader_Follower::resume_events ()
// not need to obtain the lock, only called when holding the lock
while (!this->deferred_event_set_.is_empty ())
{
- ACE_Auto_Ptr<Deferred_Event> event (this->deferred_event_set_.pop_front ());
+ std::unique_ptr<Deferred_Event> event (this->deferred_event_set_.pop_front ());
// Send a notification to the reactor to cause the awakening of a new
// follower, if there is one already available.
ACE_Reactor *reactor = this->orb_core_->reactor ();
diff --git a/TAO/tao/Load_Protocol_Factory_T.h b/TAO/tao/Load_Protocol_Factory_T.h
index af0c7f18731..5928452f5d3 100644
--- a/TAO/tao/Load_Protocol_Factory_T.h
+++ b/TAO/tao/Load_Protocol_Factory_T.h
@@ -58,8 +58,7 @@ namespace TAO
T,
-1);
- ACE_auto_ptr_reset (safe_protocol_factory,
- protocol_factory);
+ safe_protocol_factory.reset (protocol_factory);
transfer_ownership = true;
}
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index 4073819bfd0..a2519a100f3 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -66,6 +66,7 @@
#include "ace/OS_NS_string.h"
#include "ace/Message_Block.h"
#include <cstring>
+#include <memory>
#if TAO_HAS_INTERCEPTORS == 1
# include "tao/ClientRequestInterceptor_Adapter.h"
@@ -2761,7 +2762,7 @@ TAO_ORB_Core::resolve_ior_table_i ()
if (factory != nullptr)
{
- ACE_Auto_Ptr <TAO_Adapter> iortable_adapter (factory->create (this));
+ std::unique_ptr <TAO_Adapter> iortable_adapter (factory->create (this));
iortable_adapter->open ();
CORBA::Object_var tmp_root = iortable_adapter->root ();
@@ -2795,7 +2796,7 @@ TAO_ORB_Core::resolve_async_ior_table_i ()
if (factory != nullptr)
{
- ACE_Auto_Ptr <TAO_Adapter> iortable_adapter (factory->create (this));
+ std::unique_ptr <TAO_Adapter> iortable_adapter (factory->create (this));
iortable_adapter->open ();
CORBA::Object_var tmp_root = iortable_adapter->root ();
diff --git a/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp b/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp
index b92e56025cc..efcd7935078 100644
--- a/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp
+++ b/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp
@@ -47,7 +47,7 @@ namespace TAO
poa->orb_core().server_factory ()->active_object_map_creation_parameters ()
), CORBA::NO_MEMORY ());
- ACE_auto_ptr_reset (this->active_object_map_, active_object_map);
+ this->active_object_map_.reset (active_object_map);
#if defined (TAO_HAS_MONITOR_POINTS) && (TAO_HAS_MONITOR_POINTS == 1)
ACE_CString name_str ("Active_Object_Map_");
diff --git a/TAO/tao/default_resource.cpp b/TAO/tao/default_resource.cpp
index cee00e985c0..e51280730e5 100644
--- a/TAO/tao/default_resource.cpp
+++ b/TAO/tao/default_resource.cpp
@@ -27,6 +27,8 @@
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_strings.h"
+#include <memory>
+
#if !defined (__ACE_INLINE__)
#include "tao/default_resource.inl"
#endif /* __ACE_INLINE__ */
@@ -1192,7 +1194,7 @@ TAO_Default_Resource_Factory::codeset_manager()
}
- ACE_Auto_Ptr<TAO_Codeset_Manager> safemgr (mgr);
+ std::unique_ptr<TAO_Codeset_Manager> safemgr (mgr);
if (TAO_debug_level >= 1)
TAOLIB_DEBUG ((LM_DEBUG,
@@ -1203,7 +1205,6 @@ TAO_Default_Resource_Factory::codeset_manager()
this->wchar_codeset_parameters_.apply_to (mgr->wchar_codeset_descriptor());
return safemgr.release ();
-
}
TAO_Resource_Factory::Resource_Usage
diff --git a/TAO/tests/Oneway_Send_Timeouts/Server.cpp b/TAO/tests/Oneway_Send_Timeouts/Server.cpp
index ca501d47a9e..d4757949f57 100644
--- a/TAO/tests/Oneway_Send_Timeouts/Server.cpp
+++ b/TAO/tests/Oneway_Send_Timeouts/Server.cpp
@@ -78,7 +78,7 @@ Server::Server (int , ACE_TCHAR* argv[])
PortableServer::POA::_narrow (obj.in ());
PortableServer::POAManager_var poa_manager = root_poa->the_POAManager ();
- ACE_auto_ptr_reset (test_i_, new Test_i (orb_.in()));
+ test_i_.reset (new Test_i (orb_.in()));
PortableServer::ObjectId_var oid =
root_poa->activate_object (test_i_.get());
obj = root_poa->id_to_reference (oid.in());
@@ -187,7 +187,7 @@ Server::shutdown ()
management_orb_->shutdown (true);
ACE_OS::sleep (1); // Let management thread clear out
}
- ACE_auto_ptr_reset (test_i_, (Test_i*)0);
+ test_i_.reset ((Test_i*)0);
if (!CORBA::is_nil (orb_.in())) {
orb_->destroy ();
diff --git a/TAO/tests/Storable/Savable.cpp b/TAO/tests/Storable/Savable.cpp
index 11aad54585a..2bc0a00d7f1 100644
--- a/TAO/tests/Storable/Savable.cpp
+++ b/TAO/tests/Storable/Savable.cpp
@@ -104,8 +104,7 @@ Savable::Savable (TAO::Storable_Factory & storable_factory)
}
}
- ACE_Auto_Ptr<TAO::Storable_Base>
- stream (storable_factory_.create_stream("test.dat", "r"));
+ ACE_Auto_Ptr<TAO::Storable_Base> stream (storable_factory_.create_stream("test.dat", "r"));
if (stream->exists ())
{
Savable_File_Guard fg(*this, SFG::CREATE_WITH_FILE);