summaryrefslogtreecommitdiff
path: root/cpp/test/IceGrid/deployer/Service.cpp
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2021-02-03 11:16:06 -0500
committerJoe George <joe@zeroc.com>2021-02-03 11:42:30 -0500
commit48f9b28634908c43a23c30e219a9abfb038c1539 (patch)
tree81420c7142bb57902ad96de1d057b5259c29a287 /cpp/test/IceGrid/deployer/Service.cpp
parentIceGrid and IceStorm fixes (diff)
downloadice-48f9b28634908c43a23c30e219a9abfb038c1539.tar.bz2
ice-48f9b28634908c43a23c30e219a9abfb038c1539.tar.xz
ice-48f9b28634908c43a23c30e219a9abfb038c1539.zip
Additional C++11 fixes
Diffstat (limited to 'cpp/test/IceGrid/deployer/Service.cpp')
-rw-r--r--cpp/test/IceGrid/deployer/Service.cpp32
1 files changed, 10 insertions, 22 deletions
diff --git a/cpp/test/IceGrid/deployer/Service.cpp b/cpp/test/IceGrid/deployer/Service.cpp
index 2071fde15cd..4605f2cecba 100644
--- a/cpp/test/IceGrid/deployer/Service.cpp
+++ b/cpp/test/IceGrid/deployer/Service.cpp
@@ -9,18 +9,15 @@
using namespace std;
using namespace Ice;
-class ServiceI : public ::IceBox::Service
+class ServiceI : public IceBox::Service
{
public:
- ServiceI();
- virtual ~ServiceI();
+ void start(const string&,
+ const shared_ptr<Communicator>&,
+ const StringSeq&) override;
- virtual void start(const string&,
- const CommunicatorPtr&,
- const StringSeq&);
-
- virtual void stop();
+ void stop() override;
};
extern "C"
@@ -30,30 +27,21 @@ extern "C"
// Factory function
//
ICE_DECLSPEC_EXPORT ::IceBox::Service*
-create(CommunicatorPtr)
+create(const shared_ptr<Communicator>&)
{
return new ServiceI;
}
}
-ServiceI::ServiceI()
-{
-}
-
-ServiceI::~ServiceI()
-{
-}
-
void
ServiceI::start(const string& name,
- const CommunicatorPtr& communicator,
+ const shared_ptr<Communicator>& communicator,
const StringSeq&)
{
- Ice::PropertiesPtr properties = communicator->getProperties();
- Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter(name);
- Ice::ObjectPtr object = new TestI(properties);
- adapter->add(object, stringToIdentity(properties->getProperty(name + ".Identity")));
+ auto properties = communicator->getProperties();
+ auto adapter = communicator->createObjectAdapter(name);
+ adapter->add(make_shared<TestI>(properties), stringToIdentity(properties->getProperty(name + ".Identity")));
adapter->activate();
}