mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 17:41:45 +00:00
Refactor TransportFactory to RAII
* Remove explicit Initialize and Terminate states, map them onto ctor/dtor * Remove no longer needed Shutdown state * Remove deprecated SetTransport()
This commit is contained in:
committed by
Mohammad Al-Turany
parent
733794657c
commit
8bc21675af
@@ -25,7 +25,7 @@ FairMQTransportFactory::FairMQTransportFactory(const std::string& id)
|
||||
{
|
||||
}
|
||||
|
||||
auto FairMQTransportFactory::CreateTransportFactory(const std::string& type, const std::string& id) -> std::shared_ptr<FairMQTransportFactory>
|
||||
auto FairMQTransportFactory::CreateTransportFactory(const std::string& type, const std::string& id, const FairMQProgOptions* config) -> std::shared_ptr<FairMQTransportFactory>
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
@@ -39,16 +39,16 @@ auto FairMQTransportFactory::CreateTransportFactory(const std::string& type, con
|
||||
|
||||
if (type == "zeromq")
|
||||
{
|
||||
return std::make_shared<FairMQTransportFactoryZMQ>(final_id);
|
||||
return std::make_shared<FairMQTransportFactoryZMQ>(final_id, config);
|
||||
}
|
||||
else if (type == "shmem")
|
||||
{
|
||||
return std::make_shared<FairMQTransportFactorySHM>(final_id);
|
||||
return std::make_shared<FairMQTransportFactorySHM>(final_id, config);
|
||||
}
|
||||
#ifdef NANOMSG_FOUND
|
||||
else if (type == "nanomsg")
|
||||
{
|
||||
return std::make_shared<FairMQTransportFactoryNN>(final_id);
|
||||
return std::make_shared<FairMQTransportFactoryNN>(final_id, config);
|
||||
}
|
||||
#endif /* NANOMSG_FOUND */
|
||||
else
|
||||
|
Reference in New Issue
Block a user