17-ify namespaces

This commit is contained in:
Alexey Rybalchenko 2021-01-13 15:45:38 +01:00
parent d9a5e82160
commit 4a09154a91
119 changed files with 280 additions and 847 deletions

View File

@ -19,8 +19,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
namespace fair { namespace fair::mq
namespace mq { {
/** /**
* @class DeviceRunner DeviceRunner.h <fairmq/DeviceRunner.h> * @class DeviceRunner DeviceRunner.h <fairmq/DeviceRunner.h>
@ -88,7 +88,6 @@ struct ModifyRawCmdLineArgs : Event<DeviceRunner&> {};
struct InstantiateDevice : Event<DeviceRunner&> {}; struct InstantiateDevice : Event<DeviceRunner&> {};
} /* namespace hooks */ } /* namespace hooks */
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */
#endif /* FAIR_MQ_DEVICERUNNER_H */ #endif /* FAIR_MQ_DEVICERUNNER_H */

View File

@ -21,9 +21,7 @@
#include <boost/functional/hash.hpp> #include <boost/functional/hash.hpp>
#include <boost/signals2.hpp> #include <boost/signals2.hpp>
namespace fair namespace fair::mq
{
namespace mq
{ {
// Inherit from this base event type to create custom event types // Inherit from this base event type to create custom event types
@ -137,7 +135,6 @@ class EventManager
} }
}; /* class EventManager */ }; /* class EventManager */
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */
#endif /* FAIR_MQ_EVENTMANAGER_H */ #endif /* FAIR_MQ_EVENTMANAGER_H */

View File

@ -41,13 +41,10 @@ using FairMQChannelMap = std::unordered_map<std::string, std::vector<FairMQChann
using InputMsgCallback = std::function<bool(FairMQMessagePtr&, int)>; using InputMsgCallback = std::function<bool(FairMQMessagePtr&, int)>;
using InputMultipartCallback = std::function<bool(FairMQParts&, int)>; using InputMultipartCallback = std::function<bool(FairMQParts&, int)>;
namespace fair namespace fair::mq
{
namespace mq
{ {
struct OngoingTransition : std::runtime_error { using std::runtime_error::runtime_error; }; struct OngoingTransition : std::runtime_error { using std::runtime_error::runtime_error; };
} }
}
class FairMQDevice class FairMQDevice
{ {

View File

@ -18,9 +18,7 @@
using fairmq_free_fn = void(void* data, void* hint); using fairmq_free_fn = void(void* data, void* hint);
class FairMQTransportFactory; class FairMQTransportFactory;
namespace fair namespace fair::mq
{
namespace mq
{ {
struct Alignment struct Alignment
@ -29,8 +27,7 @@ struct Alignment
explicit operator size_t() const { return alignment; } explicit operator size_t() const { return alignment; }
}; };
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */
class FairMQMessage class FairMQMessage
{ {
@ -63,9 +60,7 @@ class FairMQMessage
using FairMQMessagePtr = std::unique_ptr<FairMQMessage>; using FairMQMessagePtr = std::unique_ptr<FairMQMessage>;
namespace fair namespace fair::mq
{
namespace mq
{ {
using Message = FairMQMessage; using Message = FairMQMessage;
@ -73,7 +68,6 @@ using MessagePtr = FairMQMessagePtr;
struct MessageError : std::runtime_error { using std::runtime_error::runtime_error; }; struct MessageError : std::runtime_error { using std::runtime_error::runtime_error; };
struct MessageBadAlloc : std::runtime_error { using std::runtime_error::runtime_error; }; struct MessageBadAlloc : std::runtime_error { using std::runtime_error::runtime_error; };
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */
#endif /* FAIRMQMESSAGE_H_ */ #endif /* FAIRMQMESSAGE_H_ */

View File

@ -26,16 +26,13 @@ class FairMQPoller
using FairMQPollerPtr = std::unique_ptr<FairMQPoller>; using FairMQPollerPtr = std::unique_ptr<FairMQPoller>;
namespace fair namespace fair::mq
{
namespace mq
{ {
using Poller = FairMQPoller; using Poller = FairMQPoller;
using PollerPtr = FairMQPollerPtr; using PollerPtr = FairMQPollerPtr;
struct PollerError : std::runtime_error { using std::runtime_error::runtime_error; }; struct PollerError : std::runtime_error { using std::runtime_error::runtime_error; };
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */
#endif /* FAIRMQPOLLER_H_ */ #endif /* FAIRMQPOLLER_H_ */

View File

@ -19,9 +19,7 @@
class FairMQTransportFactory; class FairMQTransportFactory;
namespace fair namespace fair::mq
{
namespace mq
{ {
enum class TransferCode : int enum class TransferCode : int
@ -32,8 +30,7 @@ enum class TransferCode : int
interrupted = -3 interrupted = -3
}; };
} // namespace mq } // namespace fair::mq
} // namespace fair
class FairMQSocket class FairMQSocket
{ {
@ -87,16 +84,13 @@ class FairMQSocket
using FairMQSocketPtr = std::unique_ptr<FairMQSocket>; using FairMQSocketPtr = std::unique_ptr<FairMQSocket>;
namespace fair namespace fair::mq
{
namespace mq
{ {
using Socket = FairMQSocket; using Socket = FairMQSocket;
using SocketPtr = FairMQSocketPtr; using SocketPtr = FairMQSocketPtr;
struct SocketError : std::runtime_error { using std::runtime_error::runtime_error; }; struct SocketError : std::runtime_error { using std::runtime_error::runtime_error; };
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */
#endif /* FAIRMQSOCKET_H_ */ #endif /* FAIRMQSOCKET_H_ */

View File

@ -24,7 +24,7 @@
#include <cstddef> // size_t #include <cstddef> // size_t
class FairMQChannel; class FairMQChannel;
namespace fair { namespace mq { class ProgOptions; } } namespace fair::mq { class ProgOptions; }
class FairMQTransportFactory class FairMQTransportFactory
{ {
@ -171,15 +171,12 @@ class FairMQTransportFactory
} }
}; };
namespace fair namespace fair::mq
{
namespace mq
{ {
using TransportFactory = FairMQTransportFactory; using TransportFactory = FairMQTransportFactory;
struct TransportFactoryError : std::runtime_error { using std::runtime_error::runtime_error; }; struct TransportFactoryError : std::runtime_error { using std::runtime_error::runtime_error; };
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */
#endif /* FAIRMQTRANSPORTFACTORY_H_ */ #endif /* FAIRMQTRANSPORTFACTORY_H_ */

View File

@ -104,9 +104,7 @@ inline std::ostream& operator<<(std::ostream& os, const FairMQRegionEvent& event
} }
} }
namespace fair namespace fair::mq
{
namespace mq
{ {
using RegionCallback = FairMQRegionCallback; using RegionCallback = FairMQRegionCallback;
@ -118,7 +116,6 @@ using RegionBlock = FairMQRegionBlock;
using UnmanagedRegion = FairMQUnmanagedRegion; using UnmanagedRegion = FairMQUnmanagedRegion;
using UnmanagedRegionPtr = FairMQUnmanagedRegionPtr; using UnmanagedRegionPtr = FairMQUnmanagedRegionPtr;
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */
#endif /* FAIRMQUNMANAGEDREGION_H_ */ #endif /* FAIRMQUNMANAGEDREGION_H_ */

View File

@ -30,9 +30,7 @@ using namespace fair::mq;
using namespace fair::mq::tools; using namespace fair::mq::tools;
using namespace boost::property_tree; using namespace boost::property_tree;
namespace fair namespace fair::mq
{
namespace mq
{ {
fair::mq::Properties PtreeParser(const ptree& pt, const string& id) fair::mq::Properties PtreeParser(const ptree& pt, const string& id)
@ -185,5 +183,4 @@ void SubChannelParser(const ptree& channelTree, fair::mq::Properties& properties
} }
} // helper namespace } // helper namespace
} // namespace mq } // namespace fair::mq
} // namespace fair

View File

@ -21,9 +21,7 @@
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace fair namespace fair::mq
{
namespace mq
{ {
struct ParserError : std::runtime_error { using std::runtime_error::runtime_error; }; struct ParserError : std::runtime_error { using std::runtime_error::runtime_error; };
@ -41,7 +39,6 @@ void SubChannelParser(const boost::property_tree::ptree& tree, fair::mq::Propert
} // helper namespace } // helper namespace
} // namespace mq } // namespace fair::mq
} // namespace fair
#endif /* FAIR_MQ_JSONPARSER_H */ #endif /* FAIR_MQ_JSONPARSER_H */

View File

@ -15,8 +15,8 @@
#include <fairmq/FairMQTransportFactory.h> #include <fairmq/FairMQTransportFactory.h>
#include <fairmq/MemoryResources.h> #include <fairmq/MemoryResources.h>
namespace fair { namespace fair::mq
namespace mq { {
using BytePmrAllocator = pmr::polymorphic_allocator<fair::mq::byte>; using BytePmrAllocator = pmr::polymorphic_allocator<fair::mq::byte>;
@ -62,5 +62,4 @@ FairMQMessagePtr getMessage(ContainerT &&container_, FairMQMemoryResource *targe
return message; return message;
} }
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */

View File

@ -26,8 +26,8 @@ class FairMQTransportFactory;
#include <stdexcept> #include <stdexcept>
#include <utility> #include <utility>
namespace fair { namespace fair::mq
namespace mq { {
using byte = unsigned char; using byte = unsigned char;
namespace pmr = boost::container::pmr; namespace pmr = boost::container::pmr;
@ -107,7 +107,6 @@ class ChannelResource : public FairMQMemoryResource
}; };
}; };
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */
#endif /* FAIR_MQ_MEMORY_RESOURCES_H */ #endif /* FAIR_MQ_MEMORY_RESOURCES_H */

View File

@ -24,9 +24,7 @@
#include <tuple> #include <tuple>
#include <utility> #include <utility>
namespace fair namespace fair::mq
{
namespace mq
{ {
/** /**
@ -133,8 +131,7 @@ class Plugin
PluginServices* fPluginServices; PluginServices* fPluginServices;
}; /* class Plugin */ }; /* class Plugin */
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */
#define REGISTER_FAIRMQ_PLUGIN(KLASS, NAME, VERSION, MAINTAINER, HOMEPAGE, PROGOPTIONS) \ #define REGISTER_FAIRMQ_PLUGIN(KLASS, NAME, VERSION, MAINTAINER, HOMEPAGE, PROGOPTIONS) \
static auto Make_##NAME##_Plugin(fair::mq::PluginServices* pluginServices) -> std::unique_ptr<fair::mq::Plugin> \ static auto Make_##NAME##_Plugin(fair::mq::PluginServices* pluginServices) -> std::unique_ptr<fair::mq::Plugin> \

View File

@ -30,9 +30,7 @@
#include <vector> #include <vector>
#include <utility> // forward #include <utility> // forward
namespace fair namespace fair::mq
{
namespace mq
{ {
/** /**
@ -125,7 +123,6 @@ class PluginManager
std::map<std::string, boost::program_options::options_description> fPluginProgOptions; std::map<std::string, boost::program_options::options_description> fPluginProgOptions;
}; /* class PluginManager */ }; /* class PluginManager */
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */
#endif /* FAIR_MQ_PLUGINMANAGER_H */ #endif /* FAIR_MQ_PLUGINMANAGER_H */

View File

@ -26,9 +26,7 @@
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
namespace fair namespace fair::mq
{
namespace mq
{ {
/** /**
@ -281,7 +279,6 @@ class PluginServices
std::condition_variable fReleaseDeviceControlCondition; std::condition_variable fReleaseDeviceControlCondition;
}; /* class PluginServices */ }; /* class PluginServices */
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */
#endif /* FAIR_MQ_PLUGINSERVICES_H */ #endif /* FAIR_MQ_PLUGINSERVICES_H */

View File

@ -39,9 +39,7 @@ struct ValInfo
string origin; string origin;
}; };
namespace fair namespace fair::mq
{
namespace mq
{ {
ValInfo ConvertVarValToValInfo(const po::variable_value& v) ValInfo ConvertVarValToValInfo(const po::variable_value& v)
@ -449,6 +447,4 @@ void ProgOptions::PrintOptionsRaw() const
} }
} }
} // namespace fair::mq
} // namespace mq
} // namespace fair

View File

@ -26,9 +26,7 @@
#include <vector> #include <vector>
#include <stdexcept> #include <stdexcept>
namespace fair namespace fair::mq
{
namespace mq
{ {
struct PropertyNotFoundError : std::runtime_error { using std::runtime_error::runtime_error; }; struct PropertyNotFoundError : std::runtime_error { using std::runtime_error::runtime_error; };
@ -270,7 +268,6 @@ class ProgOptions
mutable std::mutex fMtx; mutable std::mutex fMtx;
}; };
} // namespace mq } // namespace fair::mq
} // namespace fair
#endif /* FAIR_MQ_PROGOPTIONS_H */ #endif /* FAIR_MQ_PROGOPTIONS_H */

View File

@ -9,13 +9,10 @@
#ifndef FAIR_MQ_PROGOPTIONSFWD_H #ifndef FAIR_MQ_PROGOPTIONSFWD_H
#define FAIR_MQ_PROGOPTIONSFWD_H #define FAIR_MQ_PROGOPTIONSFWD_H
namespace fair namespace fair::mq
{
namespace mq
{ {
class ProgOptions; class ProgOptions;
} }
}
using FairMQProgOptions = fair::mq::ProgOptions; using FairMQProgOptions = fair::mq::ProgOptions;

View File

@ -13,9 +13,7 @@
using namespace std; using namespace std;
using boost::any_cast; using boost::any_cast;
namespace fair namespace fair::mq
{
namespace mq
{ {
template<class T> template<class T>
@ -143,5 +141,4 @@ unordered_map<type_index, void(*)(const EventManager&, const string&, const Prop
{ type_index(typeid(vector<boost::filesystem::path>)), [](const EventManager& em, const string& k, const Property& p) { em.Emit<PropertyChange, vector<boost::filesystem::path>>(k, any_cast<vector<boost::filesystem::path>>(p)); } }, { type_index(typeid(vector<boost::filesystem::path>)), [](const EventManager& em, const string& k, const Property& p) { em.Emit<PropertyChange, vector<boost::filesystem::path>>(k, any_cast<vector<boost::filesystem::path>>(p)); } },
}; };
} // namespace mq } // namespace fair::mq
} // namespace fair

View File

@ -22,9 +22,7 @@
#include <typeinfo> #include <typeinfo>
#include <utility> // pair #include <utility> // pair
namespace fair namespace fair::mq
{
namespace mq
{ {
using Property = boost::any; using Property = boost::any;
@ -72,7 +70,6 @@ class PropertyHelper
static std::unordered_map<std::type_index, std::function<std::pair<std::string, std::string>(const Property&)>> fTypeInfos; static std::unordered_map<std::type_index, std::function<std::pair<std::string, std::string>(const Property&)>> fTypeInfos;
}; };
}
} }
#endif /* FAIR_MQ_PROPERTIES_H */ #endif /* FAIR_MQ_PROPERTIES_H */

View File

@ -35,9 +35,7 @@ using namespace boost::msm::front;
using namespace boost::msm::back; using namespace boost::msm::back;
namespace bmpl = boost::mpl; namespace bmpl = boost::mpl;
namespace fair namespace fair::mq
{
namespace mq
{ {
namespace fsm namespace fsm
{ {
@ -239,8 +237,7 @@ struct Machine_ : public state_machine_def<Machine_>
using FairMQFSM = state_machine<Machine_>; using FairMQFSM = state_machine<Machine_>;
} // namespace fsm } // namespace fsm
} // namespace mq } // namespace fair::mq
} // namespace fair
using namespace fair::mq::fsm; using namespace fair::mq::fsm;
using namespace fair::mq; using namespace fair::mq;

View File

@ -16,9 +16,7 @@
#include <functional> #include <functional>
#include <stdexcept> #include <stdexcept>
namespace fair namespace fair::mq
{
namespace mq
{ {
class StateMachine class StateMachine
@ -56,7 +54,6 @@ class StateMachine
std::shared_ptr<void> fFsm; std::shared_ptr<void> fFsm;
}; };
} // namespace mq } // namespace fair::mq
} // namespace fair
#endif /* FAIRMQSTATEMACHINE_H_ */ #endif /* FAIRMQSTATEMACHINE_H_ */

View File

@ -17,9 +17,7 @@
#include <utility> // pair #include <utility> // pair
#include <condition_variable> #include <condition_variable>
namespace fair namespace fair::mq
{
namespace mq
{ {
class StateQueue class StateQueue
@ -88,7 +86,6 @@ class StateQueue
std::condition_variable fCV; std::condition_variable fCV;
}; };
} // namespace mq } // namespace fair::mq
} // namespace fair
#endif /* FAIRMQSTATEQUEUE_H_ */ #endif /* FAIRMQSTATEQUEUE_H_ */

View File

@ -13,9 +13,7 @@
using namespace std; using namespace std;
namespace fair namespace fair::mq
{
namespace mq
{ {
array<string, 16> stateNames = array<string, 16> stateNames =
@ -114,5 +112,4 @@ Transition GetTransition(const string& transition)
return transitions.at(transition); return transitions.at(transition);
} }
} // namespace mq } // namespace fair::mq
} // namespace fair

View File

@ -13,9 +13,7 @@
#include <ostream> #include <ostream>
#include <stdexcept> #include <stdexcept>
namespace fair namespace fair::mq
{
namespace mq
{ {
enum class State : int enum class State : int
@ -64,7 +62,6 @@ struct DeviceErrorState : std::runtime_error { using std::runtime_error::runtime
inline std::ostream& operator<<(std::ostream& os, const State& state) { return os << GetStateName(state); } inline std::ostream& operator<<(std::ostream& os, const State& state) { return os << GetStateName(state); }
inline std::ostream& operator<<(std::ostream& os, const Transition& transition) { return os << GetTransitionName(transition); } inline std::ostream& operator<<(std::ostream& os, const Transition& transition) { return os << GetTransitionName(transition); }
} // namespace mq } // namespace fair::mq
} // namespace fair
#endif /* FAIRMQSTATES_H_ */ #endif /* FAIRMQSTATES_H_ */

View File

@ -23,9 +23,7 @@
using boost::property_tree::ptree; using boost::property_tree::ptree;
using namespace std; using namespace std;
namespace fair namespace fair::mq
{
namespace mq
{ {
enum channelOptionKeyIds enum channelOptionKeyIds
@ -120,4 +118,3 @@ Properties SuboptParser(const vector<string>& channelConfig, const string& devic
} }
} }
}

View File

@ -19,9 +19,7 @@
#include <vector> #include <vector>
#include <string> #include <string>
namespace fair namespace fair::mq
{
namespace mq
{ {
/** /**
@ -43,7 +41,6 @@ namespace mq
Properties SuboptParser(const std::vector<std::string>& channelConfig, const std::string& deviceId); Properties SuboptParser(const std::vector<std::string>& channelConfig, const std::string& deviceId);
}
} }
#endif /* FAIR_MQ_SUBOPTPARSER_H */ #endif /* FAIR_MQ_SUBOPTPARSER_H */

View File

@ -17,9 +17,7 @@
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>
namespace fair namespace fair::mq
{
namespace mq
{ {
enum class Transport enum class Transport
@ -32,8 +30,7 @@ enum class Transport
struct TransportError : std::runtime_error { using std::runtime_error::runtime_error; }; struct TransportError : std::runtime_error { using std::runtime_error::runtime_error; };
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */
namespace std namespace std
{ {
@ -43,9 +40,7 @@ struct hash<fair::mq::Transport> : fair::mq::tools::HashEnum<fair::mq::Transport
} /* namespace std */ } /* namespace std */
namespace fair namespace fair::mq
{
namespace mq
{ {
static std::unordered_map<std::string, Transport> TransportTypes { static std::unordered_map<std::string, Transport> TransportTypes {
@ -74,7 +69,6 @@ try {
throw TransportError(tools::ToString("Unknown transport provided: ", transport)); throw TransportError(tools::ToString("Unknown transport provided: ", transport));
} }
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */
#endif /* FAIR_MQ_TRANSPORTS_H */ #endif /* FAIR_MQ_TRANSPORTS_H */

View File

@ -22,11 +22,7 @@
#include <string.h> #include <string.h>
#include <sys/socket.h> #include <sys/socket.h>
namespace fair namespace fair::mq::ofi
{
namespace mq
{
namespace ofi
{ {
using namespace std; using namespace std;
@ -134,6 +130,4 @@ auto Context::MakeSendMessage(size_t size) -> MessagePtr
return fSendFactory.CreateMessage(size); return fSendFactory.CreateMessage(size);
} }
} /* namespace ofi */ } // namespace fair::mq::ofi
} /* namespace mq */
} /* namespace fair */

View File

@ -24,11 +24,7 @@
#include <thread> #include <thread>
#include <vector> #include <vector>
namespace fair namespace fair::mq::ofi
{
namespace mq
{
namespace ofi
{ {
enum class ConnectionType : bool { Bind, Connect }; enum class ConnectionType : bool { Bind, Connect };
@ -88,8 +84,6 @@ class Context
struct ContextError : std::runtime_error { using std::runtime_error::runtime_error; }; struct ContextError : std::runtime_error { using std::runtime_error::runtime_error; };
} /* namespace ofi */ } // namespace fair::mq::ofi
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_OFI_CONTEXT_H */ #endif /* FAIR_MQ_OFI_CONTEXT_H */

View File

@ -17,8 +17,8 @@
#include <memory> #include <memory>
#include <type_traits> #include <type_traits>
namespace boost { namespace boost::asio
namespace asio { {
template<typename PodType> template<typename PodType>
auto buffer(const PodType& obj) -> boost::asio::const_buffer auto buffer(const PodType& obj) -> boost::asio::const_buffer
@ -26,12 +26,10 @@ auto buffer(const PodType& obj) -> boost::asio::const_buffer
return boost::asio::const_buffer(static_cast<const void*>(&obj), sizeof(PodType)); return boost::asio::const_buffer(static_cast<const void*>(&obj), sizeof(PodType));
} }
} // namespace asio } // namespace boost::asio
} // namespace boost
namespace fair { namespace fair::mq::ofi
namespace mq { {
namespace ofi {
enum class ControlMessageType enum class ControlMessageType
{ {
@ -109,8 +107,6 @@ auto MakeControlMessage(Args&&... args) -> ControlMessage
return ctrl; return ctrl;
} }
} // namespace ofi } // namespace fair::mq::ofi
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_OFI_CONTROLMESSAGES_H */ #endif /* FAIR_MQ_OFI_CONTROLMESSAGES_H */

View File

@ -14,11 +14,7 @@
#include <cstdlib> #include <cstdlib>
#include <zmq.h> #include <zmq.h>
namespace fair namespace fair::mq::ofi
{
namespace mq
{
namespace ofi
{ {
using namespace std; using namespace std;
@ -201,6 +197,4 @@ Message::~Message()
} }
} }
} /* namespace ofi */ } // namespace fair::mq::ofi
} /* namespace mq */
} /* namespace fair */

View File

@ -17,11 +17,7 @@
#include <cstddef> // size_t #include <cstddef> // size_t
#include <zmq.h> #include <zmq.h>
namespace fair namespace fair::mq::ofi
{
namespace mq
{
namespace ofi
{ {
/** /**
@ -77,8 +73,6 @@ class Message final : public fair::mq::Message
boost::container::pmr::memory_resource* fPmr; boost::container::pmr::memory_resource* fPmr;
}; /* class Message */ }; /* class Message */
} /* namespace ofi */ } // namespace fair::mq::ofi
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_OFI_MESSAGE_H */ #endif /* FAIR_MQ_OFI_MESSAGE_H */

View File

@ -13,11 +13,7 @@
#include <zmq.h> #include <zmq.h>
namespace fair namespace fair::mq::ofi
{
namespace mq
{
namespace ofi
{ {
using namespace std; using namespace std;
@ -153,6 +149,4 @@ Poller::~Poller()
delete[] fItems; delete[] fItems;
} }
} /* namespace ofi */ } // namespace fair::mq::ofi
} /* namespace mq */
} /* namespace fair */

View File

@ -18,11 +18,7 @@
#include <zmq.h> #include <zmq.h>
namespace fair namespace fair::mq::ofi
{
namespace mq
{
namespace ofi
{ {
class TransportFactory; class TransportFactory;
@ -63,8 +59,6 @@ class Poller final : public FairMQPoller
std::unordered_map<std::string, int> fOffsetMap; std::unordered_map<std::string, int> fOffsetMap;
}; /* class Poller */ }; /* class Poller */
} /* namespace ofi */ } // namespace fair::mq::ofi
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_OFI_POLLER_H */ #endif /* FAIR_MQ_OFI_POLLER_H */

View File

@ -25,11 +25,7 @@
#include <mutex> #include <mutex>
#include <queue> #include <queue>
namespace fair namespace fair::mq::ofi
{
namespace mq
{
namespace ofi
{ {
using namespace std; using namespace std;
@ -683,6 +679,4 @@ Socket::~Socket()
} }
} }
} /* namespace ofi */ } // namespace fair::mq::ofi
} /* namespace mq */
} /* namespace fair */

View File

@ -23,11 +23,7 @@
#include <mutex> #include <mutex>
namespace fair namespace fair::mq::ofi
{
namespace mq
{
namespace ofi
{ {
/** /**
@ -120,8 +116,6 @@ class Socket final : public fair::mq::Socket
struct SilentSocketError : SocketError { using SocketError::SocketError; }; struct SilentSocketError : SocketError { using SocketError::SocketError; };
} /* namespace ofi */ } // namespace fair::mq::ofi
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_OFI_SOCKET_H */ #endif /* FAIR_MQ_OFI_SOCKET_H */

View File

@ -13,11 +13,7 @@
#include <stdexcept> #include <stdexcept>
namespace fair namespace fair::mq::ofi
{
namespace mq
{
namespace ofi
{ {
using namespace std; using namespace std;
@ -121,6 +117,4 @@ auto TransportFactory::GetType() const -> Transport
return Transport::OFI; return Transport::OFI;
} }
} /* namespace ofi */ } // namespace fair::mq::ofi
} /* namespace mq */
} /* namespace fair */

View File

@ -15,11 +15,7 @@
#include <asiofi.hpp> #include <asiofi.hpp>
namespace fair namespace fair::mq::ofi
{
namespace mq
{
namespace ofi
{ {
/** /**
@ -69,8 +65,6 @@ class TransportFactory final : public FairMQTransportFactory
asiofi::allocated_pool_resource fMemoryResource; asiofi::allocated_pool_resource fMemoryResource;
}; /* class TransportFactory */ }; /* class TransportFactory */
} /* namespace ofi */ } // namespace fair::mq::ofi
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_OFI_TRANSPORTFACTORY_H */ #endif /* FAIR_MQ_OFI_TRANSPORTFACTORY_H */

View File

@ -43,11 +43,7 @@ namespace
} }
} }
namespace fair namespace fair::mq::plugins
{
namespace mq
{
namespace plugins
{ {
Control::Control(const string& name, const Plugin::Version version, const string& maintainer, const string& homepage, PluginServices* pluginServices) Control::Control(const string& name, const Plugin::Version version, const string& maintainer, const string& homepage, PluginServices* pluginServices)
@ -475,6 +471,4 @@ Control::~Control()
UnsubscribeFromDeviceStateChange(); UnsubscribeFromDeviceStateChange();
} }
} /* namespace plugins */ } // namespace fair::mq::plugins
} /* namespace mq */
} /* namespace fair */

View File

@ -21,11 +21,7 @@
#include <atomic> #include <atomic>
#include <stdexcept> #include <stdexcept>
namespace fair namespace fair::mq::plugins
{
namespace mq
{
namespace plugins
{ {
class Control : public Plugin class Control : public Plugin
@ -68,8 +64,6 @@ REGISTER_FAIRMQ_PLUGIN(
// boost::optional<boost::program_options::options_description> // boost::optional<boost::program_options::options_description>
) )
} /* namespace plugins */ } // namespace fair::mq::plugins
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_PLUGINS_CONTROL */ #endif /* FAIR_MQ_PLUGINS_CONTROL */

View File

@ -22,11 +22,7 @@
using namespace std; using namespace std;
using fair::mq::tools::ToString; using fair::mq::tools::ToString;
namespace fair namespace fair::mq::plugins
{
namespace mq
{
namespace plugins
{ {
DDS::DDS(const string& name, DDS::DDS(const string& name,
@ -458,6 +454,4 @@ DDS::~DDS()
} }
} }
} /* namespace plugins */ } // namespace fair::mq::plugins
} /* namespace mq */
} /* namespace fair */

View File

@ -32,11 +32,7 @@
#include <utility> // pair #include <utility> // pair
#include <vector> #include <vector>
namespace fair namespace fair::mq::plugins
{
namespace mq
{
namespace plugins
{ {
struct DDSConfig struct DDSConfig
@ -196,8 +192,6 @@ REGISTER_FAIRMQ_PLUGIN(
DDSProgramOptions // custom program options for the plugin DDSProgramOptions // custom program options for the plugin
) )
} /* namespace plugins */ } // namespace fair::mq::plugins
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_PLUGINS_DDS */ #endif /* FAIR_MQ_PLUGINS_DDS */

View File

@ -18,11 +18,7 @@
using namespace std; using namespace std;
using namespace fair::mq::sdk::cmd; using namespace fair::mq::sdk::cmd;
namespace fair namespace fair::mq::plugins
{
namespace mq
{
namespace plugins
{ {
PMIxPlugin::PMIxPlugin(const string& name, PMIxPlugin::PMIxPlugin(const string& name,
@ -304,6 +300,4 @@ auto PMIxPlugin::WaitForExitingAck() -> void
}); });
} }
} /* namespace plugins */ } // namespace fair::mq::plugins
} /* namespace mq */
} /* namespace fair */

View File

@ -24,11 +24,7 @@
#include <unistd.h> #include <unistd.h>
#include <vector> #include <vector>
namespace fair namespace fair::mq::plugins
{
namespace mq
{
namespace plugins
{ {
class PMIxPlugin : public Plugin class PMIxPlugin : public Plugin
@ -88,8 +84,6 @@ REGISTER_FAIRMQ_PLUGIN(
PMIxProgramOptions // custom program options for the plugin PMIxProgramOptions // custom program options for the plugin
) )
} /* namespace plugins */ } // namespace fair::mq::plugins
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_PLUGINS_PMIX */ #endif /* FAIR_MQ_PLUGINS_PMIX */

View File

@ -15,11 +15,7 @@
using namespace std; using namespace std;
namespace fair namespace fair::mq::plugins
{
namespace mq
{
namespace plugins
{ {
Config::Config(const string& name, const Plugin::Version version, const string& maintainer, const string& homepage, PluginServices* pluginServices) Config::Config(const string& name, const Plugin::Version version, const string& maintainer, const string& homepage, PluginServices* pluginServices)
@ -89,6 +85,4 @@ Config::~Config()
UnsubscribeFromDeviceStateChange(); UnsubscribeFromDeviceStateChange();
} }
} /* namespace plugins */ } // namespace fair::mq::plugins
} /* namespace mq */
} /* namespace fair */

View File

@ -14,11 +14,7 @@
#include <string> #include <string>
namespace fair namespace fair::mq::plugins
{
namespace mq
{
namespace plugins
{ {
class Config : public Plugin class Config : public Plugin
@ -40,8 +36,6 @@ REGISTER_FAIRMQ_PLUGIN(
ConfigPluginProgramOptions ConfigPluginProgramOptions
) )
} /* namespace plugins */ } // namespace fair::mq::plugins
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_PLUGINS_CONFIG */ #endif /* FAIR_MQ_PLUGINS_CONFIG */

View File

@ -29,9 +29,8 @@
#define FAIR_LOG LOG #define FAIR_LOG LOG
#endif /* ifndef FAIR_LOG */ #endif /* ifndef FAIR_LOG */
namespace fair { namespace fair::mq::sdk
namespace mq { {
namespace sdk {
template<typename... SignatureArgTypes> template<typename... SignatureArgTypes>
struct AsioAsyncOpImplBase struct AsioAsyncOpImplBase
@ -219,9 +218,6 @@ struct AsioAsyncOp<Executor,
} }
}; };
} /* namespace sdk */ } // namespace fair::mq::sdk
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_SDK_ASIOASYNCOP_H */ #endif /* FAIR_MQ_SDK_ASIOASYNCOP_H */

View File

@ -14,9 +14,8 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
namespace fair { namespace fair::mq::sdk
namespace mq { {
namespace sdk {
using DefaultExecutor = asio::any_io_executor; using DefaultExecutor = asio::any_io_executor;
using DefaultAllocator = std::allocator<int>; using DefaultAllocator = std::allocator<int>;
@ -69,8 +68,6 @@ class AsioBase
AllocatorType fAllocator; AllocatorType fAllocator;
}; };
} /* namespace sdk */ } // namespace fair::mq::sdk
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_SDK_ASIOBASE_H */ #endif /* FAIR_MQ_SDK_ASIOBASE_H */

View File

@ -16,9 +16,8 @@
#include <chrono> #include <chrono>
#include <cstdint> #include <cstdint>
namespace fair { namespace fair::mq::sdk
namespace mq { {
namespace sdk {
/** /**
* @class DDSAgent <fairmq/sdk/DDSAgent.h> * @class DDSAgent <fairmq/sdk/DDSAgent.h>
@ -74,8 +73,6 @@ class DDSAgent
std::string fUsername; std::string fUsername;
}; };
} // namespace sdk } // namespace fair::mq::sdk
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_SDK_DDSSAGENT_H */ #endif /* FAIR_MQ_SDK_DDSSAGENT_H */

View File

@ -14,9 +14,8 @@
#include <ostream> #include <ostream>
#include <cstdint> #include <cstdint>
namespace fair { namespace fair::mq::sdk
namespace mq { {
namespace sdk {
/** /**
* @class DDSCollection <fairmq/sdk/DDSCollection.h> * @class DDSCollection <fairmq/sdk/DDSCollection.h>
@ -42,8 +41,6 @@ class DDSCollection
Id fId; Id fId;
}; };
} // namespace sdk } // namespace fair::mq::sdk
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_SDK_DDSCOLLECTION_H */ #endif /* FAIR_MQ_SDK_DDSCOLLECTION_H */

View File

@ -16,9 +16,8 @@
#include <sstream> #include <sstream>
#include <utility> #include <utility>
namespace fair { namespace fair::mq::sdk
namespace mq { {
namespace sdk {
struct DDSEnvironment::Impl struct DDSEnvironment::Impl
{ {
@ -133,6 +132,4 @@ auto operator<<(std::ostream& os, DDSEnvironment env) -> std::ostream&
<< "$DDS_CONFIG_HOME: " << env.GetConfigHome() / DDSEnvironment::Path(".DDS"); << "$DDS_CONFIG_HOME: " << env.GetConfigHome() / DDSEnvironment::Path(".DDS");
} }
} // namespace sdk } // namespace fair::mq::sdk
} // namespace mq
} // namespace fair

View File

@ -13,9 +13,8 @@
#include <memory> #include <memory>
#include <ostream> #include <ostream>
namespace fair { namespace fair::mq::sdk
namespace mq { {
namespace sdk {
/** /**
* @class DDSEnvironment DDSSession.h <fairmq/sdk/DDSSession.h> * @class DDSEnvironment DDSSession.h <fairmq/sdk/DDSSession.h>
@ -40,8 +39,6 @@ class DDSEnvironment
using DDSEnv = DDSEnvironment; using DDSEnv = DDSEnvironment;
} // namespace sdk } // namespace fair::mq::sdk
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_SDK_DDSENVIRONMENT_H */ #endif /* FAIR_MQ_SDK_DDSENVIRONMENT_H */

View File

@ -11,23 +11,11 @@
#include <string> #include <string>
namespace dds { namespace dds::tools_api { class CSession; }
namespace tools_api { namespace dds::topology_api { class CTopology; }
class CSession; namespace fair::mq::sdk
{
} // namespace tools_api
namespace topology_api {
class CTopology;
} // namespace topology_api
} // namespace dds
namespace fair {
namespace mq {
namespace sdk {
const std::string DDSVersion("@DDS_VERSION@"); const std::string DDSVersion("@DDS_VERSION@");
const std::string DDSInstallPrefix("@DDS_INSTALL_PREFIX@"); const std::string DDSInstallPrefix("@DDS_INSTALL_PREFIX@");
@ -36,8 +24,6 @@ const std::string DDSIncludeDir("@DDS_INCDIR@");
const std::string DDSLibraryDir("@DDS_LIBDIR@"); const std::string DDSLibraryDir("@DDS_LIBDIR@");
const std::string DDSPluginDir("@DDS_PLUGINDIR@"); const std::string DDSPluginDir("@DDS_PLUGINDIR@");
} // namespace sdk } // namespace fair::mq::sdk
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_SDK_DDSINFO_H */ #endif /* FAIR_MQ_SDK_DDSINFO_H */

View File

@ -25,9 +25,8 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
namespace fair { namespace fair::mq::sdk
namespace mq { {
namespace sdk {
auto operator<<(std::ostream& os, DDSRMSPlugin plugin) -> std::ostream& auto operator<<(std::ostream& os, DDSRMSPlugin plugin) -> std::ostream&
{ {
@ -384,6 +383,4 @@ auto getMostRecentRunningDDSSession(DDSEnv env) -> DDSSession
return DDSSession(DDSSession::Id(sessionId), std::move(env)); return DDSSession(DDSSession::Id(sessionId), std::move(env));
} }
} // namespace sdk } // namespace fair::mq::sdk
} // namespace mq
} // namespace fair

View File

@ -24,9 +24,8 @@
#include <functional> #include <functional>
#include <vector> #include <vector>
namespace fair { namespace fair::mq::sdk
namespace mq { {
namespace sdk {
/** /**
* @enum DDSRMSPlugin DDSSession.h <fairmq/sdk/DDSSession.h> * @enum DDSRMSPlugin DDSSession.h <fairmq/sdk/DDSSession.h>
@ -114,8 +113,6 @@ class DDSSession
auto getMostRecentRunningDDSSession(DDSEnv env = {}) -> DDSSession; auto getMostRecentRunningDDSSession(DDSEnv env = {}) -> DDSSession;
} // namespace sdk } // namespace fair::mq::sdk
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_SDK_DDSSESSION_H */ #endif /* FAIR_MQ_SDK_DDSSESSION_H */

View File

@ -14,9 +14,8 @@
#include <ostream> #include <ostream>
#include <cstdint> #include <cstdint>
namespace fair { namespace fair::mq::sdk
namespace mq { {
namespace sdk {
/** /**
* @class DDSTask <fairmq/sdk/DDSTask.h> * @class DDSTask <fairmq/sdk/DDSTask.h>
@ -45,8 +44,6 @@ class DDSTask
DDSCollection::Id fCollectionId; DDSCollection::Id fCollectionId;
}; };
} // namespace sdk } // namespace fair::mq::sdk
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_SDK_DDSTASK_H */ #endif /* FAIR_MQ_SDK_DDSTASK_H */

View File

@ -17,9 +17,8 @@
#include <stdexcept> #include <stdexcept>
#include <utility> #include <utility>
namespace fair { namespace fair::mq::sdk
namespace mq { {
namespace sdk {
struct DDSTopology::Impl struct DDSTopology::Impl
{ {
@ -112,6 +111,4 @@ try {
return os << "DDS topology: " << t.GetName(); return os << "DDS topology: " << t.GetName();
} }
} // namespace sdk } // namespace fair::mq::sdk
} // namespace mq
} // namespace fair

View File

@ -18,9 +18,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
namespace fair { namespace fair::mq::sdk
namespace mq { {
namespace sdk {
/** /**
* @class DDSTopology DDSTopology.h <fairmq/sdk/DDSTopology.h> * @class DDSTopology DDSTopology.h <fairmq/sdk/DDSTopology.h>
@ -71,8 +70,6 @@ class DDSTopology
using DDSTopo = DDSTopology; using DDSTopo = DDSTopology;
} // namespace sdk } // namespace fair::mq::sdk
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_SDK_DDSTOPOLOGY_H */ #endif /* FAIR_MQ_SDK_DDSTOPOLOGY_H */

View File

@ -8,8 +8,8 @@
#include "Error.h" #include "Error.h"
namespace fair { namespace fair::mq
namespace mq { {
const char* ErrorCategory::name() const noexcept const char* ErrorCategory::name() const noexcept
{ {
@ -40,5 +40,4 @@ const ErrorCategory errorCategory{};
std::error_code MakeErrorCode(ErrorCode e) { return {static_cast<int>(e), errorCategory}; } std::error_code MakeErrorCode(ErrorCode e) { return {static_cast<int>(e), errorCategory}; }
} // namespace mq } // namespace fair::mq
} // namespace fair

View File

@ -13,9 +13,11 @@
#include <stdexcept> #include <stdexcept>
#include <system_error> #include <system_error>
namespace fair { namespace fair::mq
namespace mq { {
namespace sdk {
namespace sdk
{
struct RuntimeError : ::std::runtime_error struct RuntimeError : ::std::runtime_error
{ {
@ -45,15 +47,15 @@ struct ErrorCategory : std::error_category
std::string message(int ev) const override; std::string message(int ev) const override;
}; };
} /* namespace mq */ } // namespace fair::mq
} /* namespace fair */
namespace std { namespace std
{
template<> template<>
struct is_error_code_enum<fair::mq::ErrorCode> : true_type struct is_error_code_enum<fair::mq::ErrorCode> : true_type
{}; {};
} // namespace std } // namespace std
#endif /* FAIR_MQ_SDK_ERROR_H */ #endif /* FAIR_MQ_SDK_ERROR_H */

View File

@ -10,9 +10,8 @@
#include <dds/dds.h> #include <dds/dds.h>
namespace fair { namespace fair::mq::sdk
namespace mq { {
namespace sdk {
/// @brief Helper to (Re)Construct a FairMQ topology based on already existing native DDS API objects /// @brief Helper to (Re)Construct a FairMQ topology based on already existing native DDS API objects
/// @param nativeSession Existing and initialized CSession (either via create() or attach()) /// @param nativeSession Existing and initialized CSession (either via create() or attach())
@ -27,6 +26,4 @@ auto MakeTopology(dds::topology_api::CTopology nativeTopo,
return {DDSTopo(std::move(nativeTopo), env), DDSSession(std::move(nativeSession), env), blockUntilConnected}; return {DDSTopo(std::move(nativeTopo), env), DDSSession(std::move(nativeSession), env), blockUntilConnected};
} }
} // namespace sdk } // namespace fair::mq::sdk
} // namespace mq
} // namespace fair

View File

@ -48,9 +48,8 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
namespace fair { namespace fair::mq::sdk
namespace mq { {
namespace sdk {
using DeviceId = std::string; using DeviceId = std::string;
using DeviceState = fair::mq::State; using DeviceState = fair::mq::State;
@ -1366,8 +1365,6 @@ auto MakeTopology(dds::topology_api::CTopology nativeTopo,
DDSEnv env = {}, DDSEnv env = {},
bool blockUntilConnected = false) -> Topology; bool blockUntilConnected = false) -> Topology;
} // namespace sdk } // namespace fair::mq::sdk
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_SDK_TOPOLOGY_H */ #endif /* FAIR_MQ_SDK_TOPOLOGY_H */

View File

@ -13,8 +13,7 @@
#include <asio/associated_executor.hpp> #include <asio/associated_executor.hpp>
#include <type_traits> #include <type_traits>
namespace asio { namespace asio::detail {
namespace detail {
/// Specialize to match our coding conventions /// Specialize to match our coding conventions
template<typename T, typename Executor> template<typename T, typename Executor>
@ -44,7 +43,6 @@ struct associated_allocator_impl<T,
} }
}; };
} /* namespace detail */ } /* namespace asio::detail */
} /* namespace asio */
#endif /* FAIR_MQ_SDK_TRAITS_H */ #endif /* FAIR_MQ_SDK_TRAITS_H */

View File

@ -17,10 +17,8 @@
using namespace std; using namespace std;
namespace fair { namespace fair::mq::sdk::cmd
namespace mq { {
namespace sdk {
namespace cmd {
array<Result, 2> fbResultToResult = array<Result, 2> fbResultToResult =
{ {
@ -478,7 +476,4 @@ void Cmds::Deserialize(const string& str, const Format type)
} }
} }
} // namespace cmd } // namespace fair::mq::sdk::cmd
} // namespace sdk
} // namespace mq
} // namespace fair

View File

@ -17,13 +17,7 @@
#include <type_traits> #include <type_traits>
#include <stdexcept> #include <stdexcept>
namespace fair namespace fair::mq::sdk::cmd
{
namespace mq
{
namespace sdk
{
namespace cmd
{ {
enum class Format : int { enum class Format : int {
@ -414,9 +408,6 @@ std::string GetTypeName(const Type type);
inline std::ostream& operator<<(std::ostream& os, const Result& result) { return os << GetResultName(result); } inline std::ostream& operator<<(std::ostream& os, const Result& result) { return os << GetResultName(result); }
inline std::ostream& operator<<(std::ostream& os, const Type& type) { return os << GetTypeName(type); } inline std::ostream& operator<<(std::ostream& os, const Type& type) { return os << GetTypeName(type); }
} /* namespace cmd */ } // namespace fair::mq::sdk::cmd
} /* namespace sdk */
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_SDK_COMMANDFACTORY */ #endif /* FAIR_MQ_SDK_COMMANDFACTORY */

View File

@ -8,14 +8,11 @@
#include <string> #include <string>
namespace fair { namespace fair::mq::sdk
namespace mq { {
namespace sdk {
namespace cmd { namespace cmd {
constexpr auto commandsFormatDefFbs = R"(@commands_format_def_fbs@)"; constexpr auto commandsFormatDefFbs = R"(@commands_format_def_fbs@)";
} // namespace cmd } // namespace cmd
} // namespace sdk } // namespace fair::mq::sdk
} // namespace mq
} // namespace fair

View File

@ -28,11 +28,7 @@
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
namespace fair namespace fair::mq::shmem
{
namespace mq
{
namespace shmem
{ {
struct SharedMemoryError : std::runtime_error { using std::runtime_error::runtime_error; }; struct SharedMemoryError : std::runtime_error { using std::runtime_error::runtime_error; };
@ -293,8 +289,6 @@ struct SegmentDeallocate : public boost::static_visitor<>
void* ptr; void* ptr;
}; };
} // namespace shmem } // namespace fair::mq::shmem
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_SHMEM_COMMON_H_ */ #endif /* FAIR_MQ_SHMEM_COMMON_H_ */

View File

@ -48,11 +48,7 @@
#include <sys/mman.h> // mlock #include <sys/mman.h> // mlock
namespace fair namespace fair::mq::shmem
{
namespace mq
{
namespace shmem
{ {
class Manager class Manager
@ -643,8 +639,6 @@ class Manager
bool fThrowOnBadAlloc; bool fThrowOnBadAlloc;
}; };
} // namespace shmem } // namespace fair::mq::shmem
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_SHMEM_MANAGER_H_ */ #endif /* FAIR_MQ_SHMEM_MANAGER_H_ */

View File

@ -24,11 +24,7 @@
#include <sys/types.h> // getpid #include <sys/types.h> // getpid
#include <unistd.h> // pid_t #include <unistd.h> // pid_t
namespace fair namespace fair::mq::shmem
{
namespace mq
{
namespace shmem
{ {
class Socket; class Socket;
@ -299,8 +295,6 @@ class Message final : public fair::mq::Message
} }
}; };
} } // namespace fair::mq::shmem
}
}
#endif /* FAIR_MQ_SHMEM_MESSAGE_H_ */ #endif /* FAIR_MQ_SHMEM_MESSAGE_H_ */

View File

@ -42,11 +42,7 @@ namespace
volatile sig_atomic_t gSignalStatus = 0; volatile sig_atomic_t gSignalStatus = 0;
} }
namespace fair namespace fair::mq::shmem
{
namespace mq
{
namespace shmem
{ {
void signalHandler(int signal) void signalHandler(int signal)
@ -575,6 +571,4 @@ Monitor::~Monitor()
} }
} }
} // namespace shmem } // namespace fair::mq::shmem
} // namespace mq
} // namespace fair

View File

@ -17,11 +17,7 @@
#include <utility> // pair #include <utility> // pair
#include <vector> #include <vector>
namespace fair namespace fair::mq::shmem
{
namespace mq
{
namespace shmem
{ {
struct SessionId struct SessionId
@ -120,8 +116,6 @@ class Monitor
std::unordered_map<std::string, std::chrono::high_resolution_clock::time_point> fDeviceHeartbeats; std::unordered_map<std::string, std::chrono::high_resolution_clock::time_point> fDeviceHeartbeats;
}; };
} // namespace shmem } // namespace fair::mq::shmem
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_SHMEM_MONITOR_H_ */ #endif /* FAIR_MQ_SHMEM_MONITOR_H_ */

View File

@ -21,9 +21,8 @@
class FairMQChannel; class FairMQChannel;
namespace fair { namespace fair::mq::shmem
namespace mq { {
namespace shmem {
class Poller final : public fair::mq::Poller class Poller final : public fair::mq::Poller
{ {
@ -201,8 +200,6 @@ class Poller final : public fair::mq::Poller
std::unordered_map<std::string, int> fOffsetMap; std::unordered_map<std::string, int> fOffsetMap;
}; };
} // namespace shmem } // namespace fair::mq::shmem
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_SHMEM_POLLER_H_ */ #endif /* FAIR_MQ_SHMEM_POLLER_H_ */

View File

@ -39,11 +39,7 @@
#include <chrono> #include <chrono>
#include <ios> #include <ios>
namespace fair namespace fair::mq::shmem
{
namespace mq
{
namespace shmem
{ {
struct Region struct Region
@ -276,8 +272,6 @@ struct Region
RegionBulkCallback fBulkCallback; RegionBulkCallback fBulkCallback;
}; };
} // namespace shmem } // namespace fair::mq::shmem
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_SHMEM_REGION_H_ */ #endif /* FAIR_MQ_SHMEM_REGION_H_ */

View File

@ -24,11 +24,7 @@
class FairMQTransportFactory; class FairMQTransportFactory;
namespace fair namespace fair::mq::shmem
{
namespace mq
{
namespace shmem
{ {
struct ZMsg struct ZMsg
@ -524,8 +520,6 @@ class Socket final : public fair::mq::Socket
int fTimeout; int fTimeout;
}; };
} } // namespace fair::mq::shmem
}
}
#endif /* FAIR_MQ_SHMEM_SOCKET_H_ */ #endif /* FAIR_MQ_SHMEM_SOCKET_H_ */

View File

@ -29,11 +29,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
namespace fair namespace fair::mq::shmem
{
namespace mq
{
namespace shmem
{ {
class TransportFactory final : public fair::mq::TransportFactory class TransportFactory final : public fair::mq::TransportFactory
@ -210,8 +206,6 @@ class TransportFactory final : public fair::mq::TransportFactory
std::unique_ptr<Manager> fManager; std::unique_ptr<Manager> fManager;
}; };
} // namespace shmem } // namespace fair::mq::shmem
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_SHMEM_TRANSPORTFACTORY_H_ */ #endif /* FAIR_MQ_SHMEM_TRANSPORTFACTORY_H_ */

View File

@ -20,11 +20,7 @@
#include <cstddef> // size_t #include <cstddef> // size_t
#include <string> #include <string>
namespace fair namespace fair::mq::shmem
{
namespace mq
{
namespace shmem
{ {
class Message; class Message;
@ -68,8 +64,6 @@ class UnmanagedRegion final : public fair::mq::UnmanagedRegion
uint16_t fRegionId; uint16_t fRegionId;
}; };
} } // namespace fair::mq::shmem
}
}
#endif /* FAIR_MQ_SHMEM_UNMANAGEDREGION_H_ */ #endif /* FAIR_MQ_SHMEM_UNMANAGEDREGION_H_ */

View File

@ -13,11 +13,7 @@
#include <memory> #include <memory>
#include <type_traits> #include <type_traits>
namespace fair namespace fair::mq::tools
{
namespace mq
{
namespace tools
{ {
// provide an enum hasher to compensate std::hash not supporting enums in C++11 // provide an enum hasher to compensate std::hash not supporting enums in C++11
@ -32,8 +28,6 @@ struct HashEnum
} }
}; };
} /* namespace tools */ } // namespace fair::mq::tools
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_TOOLS_CPPSTL_H */ #endif /* FAIR_MQ_TOOLS_CPPSTL_H */

View File

@ -11,9 +11,8 @@
#include "Strings.h" #include "Strings.h"
namespace fair { namespace fair::mq::tools
namespace mq { {
namespace tools {
template<typename Tag, int Max> template<typename Tag, int Max>
struct InstanceLimiter struct InstanceLimiter
@ -50,8 +49,6 @@ struct InstanceLimiter
template<typename Tag, int Max> template<typename Tag, int Max>
int InstanceLimiter<Tag, Max>::fCount(0); int InstanceLimiter<Tag, Max>::fCount(0);
} /* namespace tools */ } // namespace fair::mq::tools
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_TOOLS_INSTANCELIMIT_H */ #endif /* FAIR_MQ_TOOLS_INSTANCELIMIT_H */

View File

@ -33,11 +33,7 @@
using namespace std; using namespace std;
namespace fair namespace fair::mq::tools
{
namespace mq
{
namespace tools
{ {
// returns a map with network interface names as keys and their IP addresses as values // returns a map with network interface names as keys and their IP addresses as values
@ -184,6 +180,4 @@ string getIpFromHostname(const string& hostname, boost::asio::io_service& ios)
} }
} }
} /* namespace tools */ } // namespace fair::mq::tools
} /* namespace mq */
} /* namespace fair */

View File

@ -25,11 +25,7 @@ using io_service = class io_context;
} // namespace asio } // namespace asio
} // namespace boost } // namespace boost
namespace fair namespace fair::mq::tools
{
namespace mq
{
namespace tools
{ {
struct DefaultRouteDetectionError : std::runtime_error { using std::runtime_error::runtime_error; }; struct DefaultRouteDetectionError : std::runtime_error { using std::runtime_error::runtime_error; };
@ -47,8 +43,6 @@ std::string getIpFromHostname(const std::string& hostname);
std::string getIpFromHostname(const std::string& hostname, boost::asio::io_service& ios); std::string getIpFromHostname(const std::string& hostname, boost::asio::io_service& ios);
} /* namespace tools */ } // namespace fair::mq::tools
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_TOOLS_NETWORK_H */ #endif /* FAIR_MQ_TOOLS_NETWORK_H */

View File

@ -44,11 +44,7 @@ class LinePrinter
const string fPrefix; const string fPrefix;
}; };
namespace fair namespace fair::mq::tools
{
namespace mq
{
namespace tools
{ {
/** /**
@ -167,6 +163,4 @@ execute_result execute(const string& cmd, const string& prefix, const string& in
return result; return result;
} }
} /* namespace tools */ } // namespace fair::mq::tools
} /* namespace mq */
} /* namespace fair */

View File

@ -11,11 +11,7 @@
#include <string> #include <string>
namespace fair namespace fair::mq::tools
{
namespace mq
{
namespace tools
{ {
/** /**
@ -41,8 +37,6 @@ execute_result execute(const std::string& cmd,
const std::string& input = "", const std::string& input = "",
int sig = -1); int sig = -1);
} /* namespace tools */ } // namespace fair::mq::tools
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_TOOLS_PROCESS_H */ #endif /* FAIR_MQ_TOOLS_PROCESS_H */

View File

@ -16,11 +16,7 @@
#include <thread> #include <thread>
#include <chrono> #include <chrono>
namespace fair namespace fair::mq::tools
{
namespace mq
{
namespace tools
{ {
/** /**
@ -136,8 +132,6 @@ class RateLimiter
int skip_check_count = 1; int skip_check_count = 1;
}; };
} /* namespace tools */ } // namespace fair::mq::tools
} /* namespace mq */
} /* namespace fair */
#endif // FAIR_MQ_TOOLS_RATELIMIT_H #endif // FAIR_MQ_TOOLS_RATELIMIT_H

View File

@ -8,9 +8,8 @@
#include "Semaphore.h" #include "Semaphore.h"
namespace fair { namespace fair::mq::tools
namespace mq { {
namespace tools {
Semaphore::Semaphore() Semaphore::Semaphore()
: Semaphore(0) : Semaphore(0)
@ -68,6 +67,4 @@ auto SharedSemaphore::GetCount() const -> std::size_t
return fSemaphore->GetCount(); return fSemaphore->GetCount();
} }
} /* namespace tools */ } // namespace fair::mq::tools
} /* namespace mq */
} /* namespace fair */

View File

@ -15,9 +15,8 @@
#include <memory> #include <memory>
#include <mutex> #include <mutex>
namespace fair { namespace fair::mq::tools
namespace mq { {
namespace tools {
/** /**
* @struct Semaphore Semaphore.h <fairmq/tools/Semaphore.h> * @struct Semaphore Semaphore.h <fairmq/tools/Semaphore.h>
@ -55,8 +54,6 @@ private:
std::shared_ptr<Semaphore> fSemaphore; std::shared_ptr<Semaphore> fSemaphore;
}; };
} /* namespace tools */ } // namespace fair::mq::tools
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_TOOLS_SEMAPHORE_H */ #endif /* FAIR_MQ_TOOLS_SEMAPHORE_H */

View File

@ -15,11 +15,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
namespace fair namespace fair::mq::tools
{
namespace mq
{
namespace tools
{ {
/// @brief concatenates a variable number of args with the << operator via a stringstream /// @brief concatenates a variable number of args with the << operator via a stringstream
@ -43,8 +39,6 @@ inline auto ToStrVector(const int argc, char*const* argv, const bool dropProgram
} }
} }
} /* namespace tools */ } // namespace fair::mq::tools
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_TOOLS_STRINGS_H */ #endif /* FAIR_MQ_TOOLS_STRINGS_H */

View File

@ -19,11 +19,7 @@
using namespace std; using namespace std;
namespace fair namespace fair::mq::tools
{
namespace mq
{
namespace tools
{ {
// generates UUID string // generates UUID string
@ -43,6 +39,4 @@ size_t UuidHash()
return uuid_hasher(u); return uuid_hasher(u);
} }
} /* namespace tools */ } // namespace fair::mq::tools
} /* namespace mq */
} /* namespace fair */

View File

@ -11,11 +11,7 @@
#include <string> #include <string>
namespace fair namespace fair::mq::tools
{
namespace mq
{
namespace tools
{ {
// generates UUID string // generates UUID string
@ -24,8 +20,6 @@ std::string Uuid();
// generates UUID and returns its hash // generates UUID and returns its hash
std::size_t UuidHash(); std::size_t UuidHash();
} /* namespace tools */ } // namespace fair::mq::tools
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_TOOLS_UNIQUE_H */ #endif /* FAIR_MQ_TOOLS_UNIQUE_H */

View File

@ -12,11 +12,7 @@
#include <ostream> #include <ostream>
#include <tuple> #include <tuple>
namespace fair namespace fair::mq::tools
{
namespace mq
{
namespace tools
{ {
struct Version struct Version
@ -32,8 +28,6 @@ struct Version
friend auto operator<<(std::ostream& os, const Version& v) -> std::ostream& { return os << v.fkMajor << "." << v.fkMinor << "." << v.fkPatch; } friend auto operator<<(std::ostream& os, const Version& v) -> std::ostream& { return os << v.fkMajor << "." << v.fkMinor << "." << v.fkPatch; }
}; };
} /* namespace tools */ } // namespace fair::mq::tools
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_TOOLS_VERSION_H */ #endif /* FAIR_MQ_TOOLS_VERSION_H */

View File

@ -25,11 +25,7 @@
#include <thread> #include <thread>
#include <vector> #include <vector>
namespace fair namespace fair::mq::zmq
{
namespace mq
{
namespace zmq
{ {
struct ContextError : std::runtime_error { using std::runtime_error::runtime_error; }; struct ContextError : std::runtime_error { using std::runtime_error::runtime_error; };
@ -191,8 +187,6 @@ class Context
bool fRegionEventsSubscriptionActive; bool fRegionEventsSubscriptionActive;
}; };
} // namespace zmq } // namespace fair::mq::zmq
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_ZMQ_CONTEXT_H_ */ #endif /* FAIR_MQ_ZMQ_CONTEXT_H_ */

View File

@ -23,11 +23,7 @@
#include <new> // bad_alloc #include <new> // bad_alloc
#include <string> #include <string>
namespace fair namespace fair::mq::zmq
{
namespace mq
{
namespace zmq
{ {
class Socket; class Socket;
@ -279,8 +275,6 @@ class Message final : public fair::mq::Message
} }
}; };
} // namespace zmq } // namespace fair::mq::zmq
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_ZMQ_MESSAGE_H */ #endif /* FAIR_MQ_ZMQ_MESSAGE_H */

View File

@ -20,11 +20,7 @@
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
namespace fair namespace fair::mq::zmq
{
namespace mq
{
namespace zmq
{ {
class Poller final : public fair::mq::Poller class Poller final : public fair::mq::Poller
@ -204,8 +200,6 @@ class Poller final : public fair::mq::Poller
std::unordered_map<std::string, int> fOffsetMap; std::unordered_map<std::string, int> fOffsetMap;
}; };
} // namespace zmq } // namespace fair::mq::zmq
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_ZMQ_POLLER_H */ #endif /* FAIR_MQ_ZMQ_POLLER_H */

View File

@ -21,9 +21,8 @@
#include <atomic> #include <atomic>
#include <memory> // unique_ptr, make_unique #include <memory> // unique_ptr, make_unique
namespace fair { namespace fair::mq::zmq
namespace mq { {
namespace zmq {
class Socket final : public fair::mq::Socket class Socket final : public fair::mq::Socket
{ {
@ -471,8 +470,6 @@ class Socket final : public fair::mq::Socket
int fTimeout; int fTimeout;
}; };
} // namespace zmq } // namespace fair::mq::zmq
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_ZMQ_SOCKET_H */ #endif /* FAIR_MQ_ZMQ_SOCKET_H */

View File

@ -21,11 +21,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
namespace fair namespace fair::mq::zmq
{
namespace mq
{
namespace zmq
{ {
class TransportFactory final : public FairMQTransportFactory class TransportFactory final : public FairMQTransportFactory
@ -145,8 +141,6 @@ class TransportFactory final : public FairMQTransportFactory
std::unique_ptr<Context> fCtx; std::unique_ptr<Context> fCtx;
}; };
} // namespace zmq } // namespace fair::mq::zmq
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_ZMQ_TRANSPORTFACTORY_H */ #endif /* FAIR_MQ_ZMQ_TRANSPORTFACTORY_H */

View File

@ -16,11 +16,7 @@
#include <cstddef> // size_t #include <cstddef> // size_t
#include <string> #include <string>
namespace fair namespace fair::mq::zmq
{
namespace mq
{
namespace zmq
{ {
class UnmanagedRegion final : public fair::mq::UnmanagedRegion class UnmanagedRegion final : public fair::mq::UnmanagedRegion
@ -72,8 +68,6 @@ class UnmanagedRegion final : public fair::mq::UnmanagedRegion
RegionBulkCallback fBulkCallback; RegionBulkCallback fBulkCallback;
}; };
} // namespace zmq } // namespace fair::mq::zmq
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_ZMQ_UNMANAGEDREGION_H */ #endif /* FAIR_MQ_ZMQ_UNMANAGEDREGION_H */

View File

@ -15,11 +15,7 @@
#include <string> #include <string>
#include <thread> #include <thread>
namespace fair namespace fair::mq::test
{
namespace mq
{
namespace test
{ {
class Receiver : public FairMQDevice class Receiver : public FairMQDevice
@ -48,8 +44,6 @@ class Receiver : public FairMQDevice
std::string fChannelName; std::string fChannelName;
}; };
} // namespace test } // namespace fair::mq::test
} // namespace mq
} // namespace fair
#endif // FAIR_MQ_TEST_TESTRECEIVER_H #endif // FAIR_MQ_TEST_TESTRECEIVER_H

View File

@ -15,11 +15,7 @@
#include <string> #include <string>
#include <thread> #include <thread>
namespace fair namespace fair::mq::test
{
namespace mq
{
namespace test
{ {
class Sender : public FairMQDevice class Sender : public FairMQDevice
@ -48,8 +44,6 @@ class Sender : public FairMQDevice
std::string fChannelName; std::string fChannelName;
}; };
} // namespace test } // namespace fair::mq::test
} // namespace mq
} // namespace fair
#endif // FAIR_MQ_TEST_TESTSENDER_H #endif // FAIR_MQ_TEST_TESTSENDER_H

View File

@ -14,11 +14,7 @@
#include <iostream> #include <iostream>
namespace fair namespace fair::mq::test
{
namespace mq
{
namespace test
{ {
class ErrorState : public FairMQDevice class ErrorState : public FairMQDevice
@ -106,8 +102,6 @@ class ErrorState : public FairMQDevice
} }
}; };
} // namespace test } // namespace fair::mq::test
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_TEST_ERROR_STATE_H */ #endif /* FAIR_MQ_TEST_ERROR_STATE_H */

View File

@ -15,11 +15,7 @@
#include <iostream> #include <iostream>
#include <stdexcept> #include <stdexcept>
namespace fair namespace fair::mq::test
{
namespace mq
{
namespace test
{ {
class Exceptions : public FairMQDevice class Exceptions : public FairMQDevice
@ -98,8 +94,6 @@ class Exceptions : public FairMQDevice
} }
}; };
} // namespace test } // namespace fair::mq::test
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_TEST_EXCEPTIONS_H */ #endif /* FAIR_MQ_TEST_EXCEPTIONS_H */

Some files were not shown because too many files have changed in this diff Show More