summaryrefslogtreecommitdiff
path: root/cpp/test/IceGrid/replicaGroup/Service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/IceGrid/replicaGroup/Service.cpp')
-rw-r--r--cpp/test/IceGrid/replicaGroup/Service.cpp29
1 files changed, 9 insertions, 20 deletions
diff --git a/cpp/test/IceGrid/replicaGroup/Service.cpp b/cpp/test/IceGrid/replicaGroup/Service.cpp
index c5954bcf7dc..c14058a5de1 100644
--- a/cpp/test/IceGrid/replicaGroup/Service.cpp
+++ b/cpp/test/IceGrid/replicaGroup/Service.cpp
@@ -9,18 +9,15 @@
using namespace std;
using namespace Ice;
-class ServiceI : public ::IceBox::Service
+class ServiceI final : 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,28 +27,20 @@ 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::ObjectAdapterPtr adapter = communicator->createObjectAdapter(name);
- Ice::ObjectPtr object = new TestI(communicator->getProperties());
+ auto adapter = communicator->createObjectAdapter(name);
+ auto object = make_shared<TestI>(communicator->getProperties());
adapter->add(object, stringToIdentity(name));
adapter->add(object, stringToIdentity(communicator->getProperties()->getProperty("Identity")));
adapter->activate();