diff options
Diffstat (limited to 'cpp/test/IceGrid/deployer/Service.cpp')
-rw-r--r-- | cpp/test/IceGrid/deployer/Service.cpp | 32 |
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(); } |