mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-16 18:11:49 +00:00
FairMQ: Remove deprecated TransportFactory factory method
This commit is contained in:
committed by
Mohammad Al-Turany
parent
7cfd93c998
commit
9b7841e89e
65
fairmq/Transports.h
Normal file
65
fairmq/Transports.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/********************************************************************************
|
||||
* Copyright (C) 2014-2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||
* *
|
||||
* This software is distributed under the terms of the *
|
||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||
* copied verbatim in the file "LICENSE" *
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef FAIR_MQ_TRANSPORTS_H
|
||||
#define FAIR_MQ_TRANSPORTS_H
|
||||
|
||||
#include <fairmq/Tools.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
/// TODO deprecate this namespace
|
||||
namespace FairMQ
|
||||
{
|
||||
|
||||
enum class Transport
|
||||
{
|
||||
DEFAULT,
|
||||
ZMQ,
|
||||
#ifdef NANOMSG_FOUND
|
||||
NN,
|
||||
#endif
|
||||
SHM,
|
||||
OFI
|
||||
};
|
||||
|
||||
|
||||
static std::unordered_map<std::string, Transport> TransportTypes {
|
||||
{ "default", Transport::DEFAULT },
|
||||
{ "zeromq", Transport::ZMQ },
|
||||
#ifdef NANOMSG_FOUND
|
||||
{ "nanomsg", Transport::NN },
|
||||
#endif
|
||||
{ "shmem", Transport::SHM },
|
||||
{ "ofi", Transport::OFI }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace fair
|
||||
{
|
||||
namespace mq
|
||||
{
|
||||
|
||||
using Transport = ::FairMQ::Transport;
|
||||
using ::FairMQ::TransportTypes;
|
||||
|
||||
} /* namespace mq */
|
||||
} /* namespace fair */
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
template<>
|
||||
struct hash<FairMQ::Transport> : fair::mq::tools::HashEnum<FairMQ::Transport> {};
|
||||
|
||||
} /* namespace std */
|
||||
|
||||
#endif /* FAIR_MQ_TRANSPORTS_H */
|
Reference in New Issue
Block a user