Add new Send/Receive methods with smart pointers and no flag checks.

This commit is contained in:
Alexey Rybalchenko
2015-08-17 14:45:31 +02:00
committed by Mohammad Al-Turany
parent 105e734808
commit a7ab33a10e
22 changed files with 204 additions and 121 deletions

View File

@@ -418,6 +418,11 @@ int FairMQDevice::GetProperty(const int key, const int default_ /*= 0*/)
}
}
void FairMQDevice::SetTransport(unique_ptr<FairMQTransportFactory>& factory)
{
fTransportFactory = factory.get();
}
void FairMQDevice::SetTransport(FairMQTransportFactory* factory)
{
fTransportFactory = factory;
@@ -637,8 +642,6 @@ void FairMQDevice::ResetWrapper()
void FairMQDevice::Reset()
{
LOG(DEBUG) << "Resetting Device...";
// iterate over the channels map
for (auto mi = fChannels.begin(); mi != fChannels.end(); ++mi)
{
@@ -657,8 +660,6 @@ void FairMQDevice::Reset()
vi->fCmdSocket = nullptr;
}
}
LOG(DEBUG) << "Device reset finished!";
}
void FairMQDevice::Terminate()
@@ -725,4 +726,6 @@ FairMQDevice::~FairMQDevice()
delete fCmdSocket;
fCmdSocket = nullptr;
}
delete fTransportFactory;
}