diff --git a/fairmq/DeviceRunner.h b/fairmq/DeviceRunner.h index 2588d7cb..4f9931f2 100644 --- a/fairmq/DeviceRunner.h +++ b/fairmq/DeviceRunner.h @@ -19,8 +19,8 @@ #include #include -namespace fair { -namespace mq { +namespace fair::mq +{ /** * @class DeviceRunner DeviceRunner.h @@ -88,7 +88,6 @@ struct ModifyRawCmdLineArgs : Event {}; struct InstantiateDevice : Event {}; } /* namespace hooks */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq #endif /* FAIR_MQ_DEVICERUNNER_H */ diff --git a/fairmq/EventManager.h b/fairmq/EventManager.h index d4b3380f..bb119d95 100644 --- a/fairmq/EventManager.h +++ b/fairmq/EventManager.h @@ -21,9 +21,7 @@ #include #include -namespace fair -{ -namespace mq +namespace fair::mq { // Inherit from this base event type to create custom event types @@ -137,7 +135,6 @@ class EventManager } }; /* class EventManager */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq #endif /* FAIR_MQ_EVENTMANAGER_H */ diff --git a/fairmq/FairMQDevice.h b/fairmq/FairMQDevice.h index 92ebb6fa..5d2eb010 100644 --- a/fairmq/FairMQDevice.h +++ b/fairmq/FairMQDevice.h @@ -41,13 +41,10 @@ using FairMQChannelMap = std::unordered_map; using InputMultipartCallback = std::function; -namespace fair -{ -namespace mq +namespace fair::mq { struct OngoingTransition : std::runtime_error { using std::runtime_error::runtime_error; }; } -} class FairMQDevice { diff --git a/fairmq/FairMQMessage.h b/fairmq/FairMQMessage.h index f9eacaa7..5a2ccd74 100644 --- a/fairmq/FairMQMessage.h +++ b/fairmq/FairMQMessage.h @@ -18,9 +18,7 @@ using fairmq_free_fn = void(void* data, void* hint); class FairMQTransportFactory; -namespace fair -{ -namespace mq +namespace fair::mq { struct Alignment @@ -29,8 +27,7 @@ struct Alignment explicit operator size_t() const { return alignment; } }; -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq class FairMQMessage { @@ -63,9 +60,7 @@ class FairMQMessage using FairMQMessagePtr = std::unique_ptr; -namespace fair -{ -namespace mq +namespace fair::mq { using Message = FairMQMessage; @@ -73,7 +68,6 @@ using MessagePtr = FairMQMessagePtr; struct MessageError : std::runtime_error { using std::runtime_error::runtime_error; }; struct MessageBadAlloc : std::runtime_error { using std::runtime_error::runtime_error; }; -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq #endif /* FAIRMQMESSAGE_H_ */ diff --git a/fairmq/FairMQPoller.h b/fairmq/FairMQPoller.h index 1b41e19d..44bf924a 100644 --- a/fairmq/FairMQPoller.h +++ b/fairmq/FairMQPoller.h @@ -26,16 +26,13 @@ class FairMQPoller using FairMQPollerPtr = std::unique_ptr; -namespace fair -{ -namespace mq +namespace fair::mq { using Poller = FairMQPoller; using PollerPtr = FairMQPollerPtr; struct PollerError : std::runtime_error { using std::runtime_error::runtime_error; }; -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq #endif /* FAIRMQPOLLER_H_ */ diff --git a/fairmq/FairMQSocket.h b/fairmq/FairMQSocket.h index f95dbe6a..3513523f 100644 --- a/fairmq/FairMQSocket.h +++ b/fairmq/FairMQSocket.h @@ -19,9 +19,7 @@ class FairMQTransportFactory; -namespace fair -{ -namespace mq +namespace fair::mq { enum class TransferCode : int @@ -32,8 +30,7 @@ enum class TransferCode : int interrupted = -3 }; -} // namespace mq -} // namespace fair +} // namespace fair::mq class FairMQSocket { @@ -87,16 +84,13 @@ class FairMQSocket using FairMQSocketPtr = std::unique_ptr; -namespace fair -{ -namespace mq +namespace fair::mq { using Socket = FairMQSocket; using SocketPtr = FairMQSocketPtr; struct SocketError : std::runtime_error { using std::runtime_error::runtime_error; }; -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq #endif /* FAIRMQSOCKET_H_ */ diff --git a/fairmq/FairMQTransportFactory.h b/fairmq/FairMQTransportFactory.h index ee896b1a..a53484df 100644 --- a/fairmq/FairMQTransportFactory.h +++ b/fairmq/FairMQTransportFactory.h @@ -24,7 +24,7 @@ #include // size_t class FairMQChannel; -namespace fair { namespace mq { class ProgOptions; } } +namespace fair::mq { class ProgOptions; } class FairMQTransportFactory { @@ -171,15 +171,12 @@ class FairMQTransportFactory } }; -namespace fair -{ -namespace mq +namespace fair::mq { using TransportFactory = FairMQTransportFactory; struct TransportFactoryError : std::runtime_error { using std::runtime_error::runtime_error; }; -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq #endif /* FAIRMQTRANSPORTFACTORY_H_ */ diff --git a/fairmq/FairMQUnmanagedRegion.h b/fairmq/FairMQUnmanagedRegion.h index a353e0b6..46a3855c 100644 --- a/fairmq/FairMQUnmanagedRegion.h +++ b/fairmq/FairMQUnmanagedRegion.h @@ -104,9 +104,7 @@ inline std::ostream& operator<<(std::ostream& os, const FairMQRegionEvent& event } } -namespace fair -{ -namespace mq +namespace fair::mq { using RegionCallback = FairMQRegionCallback; @@ -118,7 +116,6 @@ using RegionBlock = FairMQRegionBlock; using UnmanagedRegion = FairMQUnmanagedRegion; using UnmanagedRegionPtr = FairMQUnmanagedRegionPtr; -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq #endif /* FAIRMQUNMANAGEDREGION_H_ */ diff --git a/fairmq/JSONParser.cxx b/fairmq/JSONParser.cxx index b2665af4..5c945d25 100644 --- a/fairmq/JSONParser.cxx +++ b/fairmq/JSONParser.cxx @@ -30,9 +30,7 @@ using namespace fair::mq; using namespace fair::mq::tools; using namespace boost::property_tree; -namespace fair -{ -namespace mq +namespace fair::mq { 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 -} // namespace mq -} // namespace fair +} // namespace fair::mq diff --git a/fairmq/JSONParser.h b/fairmq/JSONParser.h index d57cb802..f832683b 100644 --- a/fairmq/JSONParser.h +++ b/fairmq/JSONParser.h @@ -21,9 +21,7 @@ #include #include -namespace fair -{ -namespace mq +namespace fair::mq { 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 -} // namespace mq -} // namespace fair +} // namespace fair::mq #endif /* FAIR_MQ_JSONPARSER_H */ diff --git a/fairmq/MemoryResourceTools.h b/fairmq/MemoryResourceTools.h index 7ad7ebc9..45391680 100644 --- a/fairmq/MemoryResourceTools.h +++ b/fairmq/MemoryResourceTools.h @@ -15,8 +15,8 @@ #include #include -namespace fair { -namespace mq { +namespace fair::mq +{ using BytePmrAllocator = pmr::polymorphic_allocator; @@ -62,5 +62,4 @@ FairMQMessagePtr getMessage(ContainerT &&container_, FairMQMemoryResource *targe return message; } -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq diff --git a/fairmq/MemoryResources.h b/fairmq/MemoryResources.h index 396f66ef..fe02d346 100644 --- a/fairmq/MemoryResources.h +++ b/fairmq/MemoryResources.h @@ -26,8 +26,8 @@ class FairMQTransportFactory; #include #include -namespace fair { -namespace mq { +namespace fair::mq +{ using byte = unsigned char; namespace pmr = boost::container::pmr; @@ -107,7 +107,6 @@ class ChannelResource : public FairMQMemoryResource }; }; -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq #endif /* FAIR_MQ_MEMORY_RESOURCES_H */ diff --git a/fairmq/Plugin.h b/fairmq/Plugin.h index 870d5420..e7fee637 100644 --- a/fairmq/Plugin.h +++ b/fairmq/Plugin.h @@ -24,9 +24,7 @@ #include #include -namespace fair -{ -namespace mq +namespace fair::mq { /** @@ -133,8 +131,7 @@ class Plugin PluginServices* fPluginServices; }; /* class Plugin */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq #define REGISTER_FAIRMQ_PLUGIN(KLASS, NAME, VERSION, MAINTAINER, HOMEPAGE, PROGOPTIONS) \ static auto Make_##NAME##_Plugin(fair::mq::PluginServices* pluginServices) -> std::unique_ptr \ diff --git a/fairmq/PluginManager.h b/fairmq/PluginManager.h index eb5866ab..848c3fd2 100644 --- a/fairmq/PluginManager.h +++ b/fairmq/PluginManager.h @@ -30,9 +30,7 @@ #include #include // forward -namespace fair -{ -namespace mq +namespace fair::mq { /** @@ -125,7 +123,6 @@ class PluginManager std::map fPluginProgOptions; }; /* class PluginManager */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq #endif /* FAIR_MQ_PLUGINMANAGER_H */ diff --git a/fairmq/PluginServices.h b/fairmq/PluginServices.h index 9bb6814e..6bb933fa 100644 --- a/fairmq/PluginServices.h +++ b/fairmq/PluginServices.h @@ -26,9 +26,7 @@ #include #include -namespace fair -{ -namespace mq +namespace fair::mq { /** @@ -281,7 +279,6 @@ class PluginServices std::condition_variable fReleaseDeviceControlCondition; }; /* class PluginServices */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq #endif /* FAIR_MQ_PLUGINSERVICES_H */ diff --git a/fairmq/ProgOptions.cxx b/fairmq/ProgOptions.cxx index 6565fea5..9f805dec 100644 --- a/fairmq/ProgOptions.cxx +++ b/fairmq/ProgOptions.cxx @@ -39,9 +39,7 @@ struct ValInfo string origin; }; -namespace fair -{ -namespace mq +namespace fair::mq { ValInfo ConvertVarValToValInfo(const po::variable_value& v) @@ -449,6 +447,4 @@ void ProgOptions::PrintOptionsRaw() const } } - -} // namespace mq -} // namespace fair +} // namespace fair::mq diff --git a/fairmq/ProgOptions.h b/fairmq/ProgOptions.h index 7cbba282..4d679763 100644 --- a/fairmq/ProgOptions.h +++ b/fairmq/ProgOptions.h @@ -26,9 +26,7 @@ #include #include -namespace fair -{ -namespace mq +namespace fair::mq { struct PropertyNotFoundError : std::runtime_error { using std::runtime_error::runtime_error; }; @@ -270,7 +268,6 @@ class ProgOptions mutable std::mutex fMtx; }; -} // namespace mq -} // namespace fair +} // namespace fair::mq #endif /* FAIR_MQ_PROGOPTIONS_H */ diff --git a/fairmq/ProgOptionsFwd.h b/fairmq/ProgOptionsFwd.h index daea799a..9a805ae0 100644 --- a/fairmq/ProgOptionsFwd.h +++ b/fairmq/ProgOptionsFwd.h @@ -9,13 +9,10 @@ #ifndef FAIR_MQ_PROGOPTIONSFWD_H #define FAIR_MQ_PROGOPTIONSFWD_H -namespace fair -{ -namespace mq +namespace fair::mq { class ProgOptions; } -} using FairMQProgOptions = fair::mq::ProgOptions; diff --git a/fairmq/Properties.cxx b/fairmq/Properties.cxx index 19b51a76..fd710fd4 100644 --- a/fairmq/Properties.cxx +++ b/fairmq/Properties.cxx @@ -13,9 +13,7 @@ using namespace std; using boost::any_cast; -namespace fair -{ -namespace mq +namespace fair::mq { template @@ -143,5 +141,4 @@ unordered_map)), [](const EventManager& em, const string& k, const Property& p) { em.Emit>(k, any_cast>(p)); } }, }; -} // namespace mq -} // namespace fair +} // namespace fair::mq diff --git a/fairmq/Properties.h b/fairmq/Properties.h index fe6442bb..b2b6b802 100644 --- a/fairmq/Properties.h +++ b/fairmq/Properties.h @@ -22,9 +22,7 @@ #include #include // pair -namespace fair -{ -namespace mq +namespace fair::mq { using Property = boost::any; @@ -72,7 +70,6 @@ class PropertyHelper static std::unordered_map(const Property&)>> fTypeInfos; }; -} } #endif /* FAIR_MQ_PROPERTIES_H */ diff --git a/fairmq/StateMachine.cxx b/fairmq/StateMachine.cxx index cb118f1d..c5b21893 100644 --- a/fairmq/StateMachine.cxx +++ b/fairmq/StateMachine.cxx @@ -35,9 +35,7 @@ using namespace boost::msm::front; using namespace boost::msm::back; namespace bmpl = boost::mpl; -namespace fair -{ -namespace mq +namespace fair::mq { namespace fsm { @@ -239,8 +237,7 @@ struct Machine_ : public state_machine_def using FairMQFSM = state_machine; } // namespace fsm -} // namespace mq -} // namespace fair +} // namespace fair::mq using namespace fair::mq::fsm; using namespace fair::mq; diff --git a/fairmq/StateMachine.h b/fairmq/StateMachine.h index bac4f41f..1f1386cf 100644 --- a/fairmq/StateMachine.h +++ b/fairmq/StateMachine.h @@ -16,9 +16,7 @@ #include #include -namespace fair -{ -namespace mq +namespace fair::mq { class StateMachine @@ -56,7 +54,6 @@ class StateMachine std::shared_ptr fFsm; }; -} // namespace mq -} // namespace fair +} // namespace fair::mq #endif /* FAIRMQSTATEMACHINE_H_ */ diff --git a/fairmq/StateQueue.h b/fairmq/StateQueue.h index b65dc295..61db5a54 100644 --- a/fairmq/StateQueue.h +++ b/fairmq/StateQueue.h @@ -17,9 +17,7 @@ #include // pair #include -namespace fair -{ -namespace mq +namespace fair::mq { class StateQueue @@ -88,7 +86,6 @@ class StateQueue std::condition_variable fCV; }; -} // namespace mq -} // namespace fair +} // namespace fair::mq -#endif /* FAIRMQSTATEQUEUE_H_ */ \ No newline at end of file +#endif /* FAIRMQSTATEQUEUE_H_ */ diff --git a/fairmq/States.cxx b/fairmq/States.cxx index 2b8261ef..1f733c46 100644 --- a/fairmq/States.cxx +++ b/fairmq/States.cxx @@ -13,9 +13,7 @@ using namespace std; -namespace fair -{ -namespace mq +namespace fair::mq { array stateNames = @@ -114,5 +112,4 @@ Transition GetTransition(const string& transition) return transitions.at(transition); } -} // namespace mq -} // namespace fair +} // namespace fair::mq diff --git a/fairmq/States.h b/fairmq/States.h index 2d540ed6..14090c45 100644 --- a/fairmq/States.h +++ b/fairmq/States.h @@ -13,9 +13,7 @@ #include #include -namespace fair -{ -namespace mq +namespace fair::mq { 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 Transition& transition) { return os << GetTransitionName(transition); } -} // namespace mq -} // namespace fair +} // namespace fair::mq #endif /* FAIRMQSTATES_H_ */ diff --git a/fairmq/SuboptParser.cxx b/fairmq/SuboptParser.cxx index 397906f0..2e53fe18 100644 --- a/fairmq/SuboptParser.cxx +++ b/fairmq/SuboptParser.cxx @@ -23,9 +23,7 @@ using boost::property_tree::ptree; using namespace std; -namespace fair -{ -namespace mq +namespace fair::mq { enum channelOptionKeyIds @@ -120,4 +118,3 @@ Properties SuboptParser(const vector& channelConfig, const string& devic } } -} diff --git a/fairmq/SuboptParser.h b/fairmq/SuboptParser.h index 1ed99300..e8c50b56 100644 --- a/fairmq/SuboptParser.h +++ b/fairmq/SuboptParser.h @@ -19,9 +19,7 @@ #include #include -namespace fair -{ -namespace mq +namespace fair::mq { /** @@ -43,7 +41,6 @@ namespace mq Properties SuboptParser(const std::vector& channelConfig, const std::string& deviceId); -} } #endif /* FAIR_MQ_SUBOPTPARSER_H */ diff --git a/fairmq/Transports.h b/fairmq/Transports.h index c4b3d155..fd37ac0f 100644 --- a/fairmq/Transports.h +++ b/fairmq/Transports.h @@ -17,9 +17,7 @@ #include #include -namespace fair -{ -namespace mq +namespace fair::mq { enum class Transport @@ -32,8 +30,7 @@ enum class Transport struct TransportError : std::runtime_error { using std::runtime_error::runtime_error; }; -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq namespace std { @@ -43,9 +40,7 @@ struct hash : fair::mq::tools::HashEnum TransportTypes { @@ -74,7 +69,6 @@ try { throw TransportError(tools::ToString("Unknown transport provided: ", transport)); } -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq #endif /* FAIR_MQ_TRANSPORTS_H */ diff --git a/fairmq/ofi/Context.cxx b/fairmq/ofi/Context.cxx index f3b06e72..aafec40d 100644 --- a/fairmq/ofi/Context.cxx +++ b/fairmq/ofi/Context.cxx @@ -22,11 +22,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace ofi +namespace fair::mq::ofi { using namespace std; @@ -134,6 +130,4 @@ auto Context::MakeSendMessage(size_t size) -> MessagePtr return fSendFactory.CreateMessage(size); } -} /* namespace ofi */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::ofi diff --git a/fairmq/ofi/Context.h b/fairmq/ofi/Context.h index 814461e9..b6a821d9 100644 --- a/fairmq/ofi/Context.h +++ b/fairmq/ofi/Context.h @@ -24,11 +24,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace ofi +namespace fair::mq::ofi { enum class ConnectionType : bool { Bind, Connect }; @@ -88,8 +84,6 @@ class Context struct ContextError : std::runtime_error { using std::runtime_error::runtime_error; }; -} /* namespace ofi */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::ofi #endif /* FAIR_MQ_OFI_CONTEXT_H */ diff --git a/fairmq/ofi/ControlMessages.h b/fairmq/ofi/ControlMessages.h index 2f78798a..f8082fe3 100644 --- a/fairmq/ofi/ControlMessages.h +++ b/fairmq/ofi/ControlMessages.h @@ -17,8 +17,8 @@ #include #include -namespace boost { -namespace asio { +namespace boost::asio +{ template 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(&obj), sizeof(PodType)); } -} // namespace asio -} // namespace boost +} // namespace boost::asio -namespace fair { -namespace mq { -namespace ofi { +namespace fair::mq::ofi +{ enum class ControlMessageType { @@ -109,8 +107,6 @@ auto MakeControlMessage(Args&&... args) -> ControlMessage return ctrl; } -} // namespace ofi -} // namespace mq -} // namespace fair +} // namespace fair::mq::ofi #endif /* FAIR_MQ_OFI_CONTROLMESSAGES_H */ diff --git a/fairmq/ofi/Message.cxx b/fairmq/ofi/Message.cxx index 1cf56c6c..9ff9df5b 100644 --- a/fairmq/ofi/Message.cxx +++ b/fairmq/ofi/Message.cxx @@ -14,11 +14,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace ofi +namespace fair::mq::ofi { using namespace std; @@ -201,6 +197,4 @@ Message::~Message() } } -} /* namespace ofi */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::ofi diff --git a/fairmq/ofi/Message.h b/fairmq/ofi/Message.h index e1c1daab..db18f6f0 100644 --- a/fairmq/ofi/Message.h +++ b/fairmq/ofi/Message.h @@ -17,11 +17,7 @@ #include // size_t #include -namespace fair -{ -namespace mq -{ -namespace ofi +namespace fair::mq::ofi { /** @@ -77,8 +73,6 @@ class Message final : public fair::mq::Message boost::container::pmr::memory_resource* fPmr; }; /* class Message */ -} /* namespace ofi */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::ofi #endif /* FAIR_MQ_OFI_MESSAGE_H */ diff --git a/fairmq/ofi/Poller.cxx b/fairmq/ofi/Poller.cxx index bed8b9e9..0dad03a1 100644 --- a/fairmq/ofi/Poller.cxx +++ b/fairmq/ofi/Poller.cxx @@ -13,11 +13,7 @@ #include -namespace fair -{ -namespace mq -{ -namespace ofi +namespace fair::mq::ofi { using namespace std; @@ -153,6 +149,4 @@ Poller::~Poller() delete[] fItems; } -} /* namespace ofi */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::ofi diff --git a/fairmq/ofi/Poller.h b/fairmq/ofi/Poller.h index a6d08a2d..cb264f18 100644 --- a/fairmq/ofi/Poller.h +++ b/fairmq/ofi/Poller.h @@ -18,11 +18,7 @@ #include -namespace fair -{ -namespace mq -{ -namespace ofi +namespace fair::mq::ofi { class TransportFactory; @@ -63,8 +59,6 @@ class Poller final : public FairMQPoller std::unordered_map fOffsetMap; }; /* class Poller */ -} /* namespace ofi */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::ofi #endif /* FAIR_MQ_OFI_POLLER_H */ diff --git a/fairmq/ofi/Socket.cxx b/fairmq/ofi/Socket.cxx index 0a99e5c2..809f69b3 100644 --- a/fairmq/ofi/Socket.cxx +++ b/fairmq/ofi/Socket.cxx @@ -25,11 +25,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace ofi +namespace fair::mq::ofi { using namespace std; @@ -683,6 +679,4 @@ Socket::~Socket() } } -} /* namespace ofi */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::ofi diff --git a/fairmq/ofi/Socket.h b/fairmq/ofi/Socket.h index 8f52e2c8..ebd7fe9f 100644 --- a/fairmq/ofi/Socket.h +++ b/fairmq/ofi/Socket.h @@ -23,11 +23,7 @@ #include -namespace fair -{ -namespace mq -{ -namespace ofi +namespace fair::mq::ofi { /** @@ -120,8 +116,6 @@ class Socket final : public fair::mq::Socket struct SilentSocketError : SocketError { using SocketError::SocketError; }; -} /* namespace ofi */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::ofi #endif /* FAIR_MQ_OFI_SOCKET_H */ diff --git a/fairmq/ofi/TransportFactory.cxx b/fairmq/ofi/TransportFactory.cxx index 51ac1ff3..297f4a4a 100644 --- a/fairmq/ofi/TransportFactory.cxx +++ b/fairmq/ofi/TransportFactory.cxx @@ -13,11 +13,7 @@ #include -namespace fair -{ -namespace mq -{ -namespace ofi +namespace fair::mq::ofi { using namespace std; @@ -121,6 +117,4 @@ auto TransportFactory::GetType() const -> Transport return Transport::OFI; } -} /* namespace ofi */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::ofi diff --git a/fairmq/ofi/TransportFactory.h b/fairmq/ofi/TransportFactory.h index b0d55930..d3dda3ce 100644 --- a/fairmq/ofi/TransportFactory.h +++ b/fairmq/ofi/TransportFactory.h @@ -15,11 +15,7 @@ #include -namespace fair -{ -namespace mq -{ -namespace ofi +namespace fair::mq::ofi { /** @@ -69,8 +65,6 @@ class TransportFactory final : public FairMQTransportFactory asiofi::allocated_pool_resource fMemoryResource; }; /* class TransportFactory */ -} /* namespace ofi */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::ofi #endif /* FAIR_MQ_OFI_TRANSPORTFACTORY_H */ diff --git a/fairmq/plugins/Control.cxx b/fairmq/plugins/Control.cxx index a975ce7b..9dedf3fa 100644 --- a/fairmq/plugins/Control.cxx +++ b/fairmq/plugins/Control.cxx @@ -43,11 +43,7 @@ namespace } } -namespace fair -{ -namespace mq -{ -namespace plugins +namespace fair::mq::plugins { Control::Control(const string& name, const Plugin::Version version, const string& maintainer, const string& homepage, PluginServices* pluginServices) @@ -475,6 +471,4 @@ Control::~Control() UnsubscribeFromDeviceStateChange(); } -} /* namespace plugins */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::plugins diff --git a/fairmq/plugins/Control.h b/fairmq/plugins/Control.h index 9d0695dc..c3976185 100644 --- a/fairmq/plugins/Control.h +++ b/fairmq/plugins/Control.h @@ -21,11 +21,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace plugins +namespace fair::mq::plugins { class Control : public Plugin @@ -68,8 +64,6 @@ REGISTER_FAIRMQ_PLUGIN( // boost::optional ) -} /* namespace plugins */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::plugins #endif /* FAIR_MQ_PLUGINS_CONTROL */ diff --git a/fairmq/plugins/DDS/DDS.cxx b/fairmq/plugins/DDS/DDS.cxx index 9d396552..e758e617 100644 --- a/fairmq/plugins/DDS/DDS.cxx +++ b/fairmq/plugins/DDS/DDS.cxx @@ -22,11 +22,7 @@ using namespace std; using fair::mq::tools::ToString; -namespace fair -{ -namespace mq -{ -namespace plugins +namespace fair::mq::plugins { DDS::DDS(const string& name, @@ -458,6 +454,4 @@ DDS::~DDS() } } -} /* namespace plugins */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::plugins diff --git a/fairmq/plugins/DDS/DDS.h b/fairmq/plugins/DDS/DDS.h index 10f6e6d4..4c82a8b4 100644 --- a/fairmq/plugins/DDS/DDS.h +++ b/fairmq/plugins/DDS/DDS.h @@ -32,11 +32,7 @@ #include // pair #include -namespace fair -{ -namespace mq -{ -namespace plugins +namespace fair::mq::plugins { struct DDSConfig @@ -196,8 +192,6 @@ REGISTER_FAIRMQ_PLUGIN( DDSProgramOptions // custom program options for the plugin ) -} /* namespace plugins */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::plugins #endif /* FAIR_MQ_PLUGINS_DDS */ diff --git a/fairmq/plugins/PMIx/PMIxPlugin.cxx b/fairmq/plugins/PMIx/PMIxPlugin.cxx index 00aeb97d..bc2a81ff 100644 --- a/fairmq/plugins/PMIx/PMIxPlugin.cxx +++ b/fairmq/plugins/PMIx/PMIxPlugin.cxx @@ -18,11 +18,7 @@ using namespace std; using namespace fair::mq::sdk::cmd; -namespace fair -{ -namespace mq -{ -namespace plugins +namespace fair::mq::plugins { PMIxPlugin::PMIxPlugin(const string& name, @@ -304,6 +300,4 @@ auto PMIxPlugin::WaitForExitingAck() -> void }); } -} /* namespace plugins */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::plugins diff --git a/fairmq/plugins/PMIx/PMIxPlugin.h b/fairmq/plugins/PMIx/PMIxPlugin.h index e22db4ef..ca3e305b 100644 --- a/fairmq/plugins/PMIx/PMIxPlugin.h +++ b/fairmq/plugins/PMIx/PMIxPlugin.h @@ -24,11 +24,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace plugins +namespace fair::mq::plugins { class PMIxPlugin : public Plugin @@ -88,8 +84,6 @@ REGISTER_FAIRMQ_PLUGIN( PMIxProgramOptions // custom program options for the plugin ) -} /* namespace plugins */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::plugins #endif /* FAIR_MQ_PLUGINS_PMIX */ diff --git a/fairmq/plugins/config/Config.cxx b/fairmq/plugins/config/Config.cxx index 22a53632..987b5752 100644 --- a/fairmq/plugins/config/Config.cxx +++ b/fairmq/plugins/config/Config.cxx @@ -15,11 +15,7 @@ using namespace std; -namespace fair -{ -namespace mq -{ -namespace plugins +namespace fair::mq::plugins { Config::Config(const string& name, const Plugin::Version version, const string& maintainer, const string& homepage, PluginServices* pluginServices) @@ -89,6 +85,4 @@ Config::~Config() UnsubscribeFromDeviceStateChange(); } -} /* namespace plugins */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::plugins diff --git a/fairmq/plugins/config/Config.h b/fairmq/plugins/config/Config.h index db1a03a0..28515f1f 100644 --- a/fairmq/plugins/config/Config.h +++ b/fairmq/plugins/config/Config.h @@ -14,11 +14,7 @@ #include -namespace fair -{ -namespace mq -{ -namespace plugins +namespace fair::mq::plugins { class Config : public Plugin @@ -40,8 +36,6 @@ REGISTER_FAIRMQ_PLUGIN( ConfigPluginProgramOptions ) -} /* namespace plugins */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::plugins #endif /* FAIR_MQ_PLUGINS_CONFIG */ diff --git a/fairmq/sdk/AsioAsyncOp.h b/fairmq/sdk/AsioAsyncOp.h index d5b60507..a1a76a27 100644 --- a/fairmq/sdk/AsioAsyncOp.h +++ b/fairmq/sdk/AsioAsyncOp.h @@ -29,9 +29,8 @@ #define FAIR_LOG LOG #endif /* ifndef FAIR_LOG */ -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq::sdk +{ template struct AsioAsyncOpImplBase @@ -219,9 +218,6 @@ struct AsioAsyncOp #include -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq::sdk +{ using DefaultExecutor = asio::any_io_executor; using DefaultAllocator = std::allocator; @@ -69,8 +68,6 @@ class AsioBase AllocatorType fAllocator; }; -} /* namespace sdk */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::sdk #endif /* FAIR_MQ_SDK_ASIOBASE_H */ diff --git a/fairmq/sdk/DDSAgent.h b/fairmq/sdk/DDSAgent.h index 153d74ad..a3db515c 100644 --- a/fairmq/sdk/DDSAgent.h +++ b/fairmq/sdk/DDSAgent.h @@ -16,9 +16,8 @@ #include #include -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq::sdk +{ /** * @class DDSAgent @@ -74,8 +73,6 @@ class DDSAgent std::string fUsername; }; -} // namespace sdk -} // namespace mq -} // namespace fair +} // namespace fair::mq::sdk #endif /* FAIR_MQ_SDK_DDSSAGENT_H */ diff --git a/fairmq/sdk/DDSCollection.h b/fairmq/sdk/DDSCollection.h index a17a7d94..2a56700c 100644 --- a/fairmq/sdk/DDSCollection.h +++ b/fairmq/sdk/DDSCollection.h @@ -14,9 +14,8 @@ #include #include -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq::sdk +{ /** * @class DDSCollection @@ -42,8 +41,6 @@ class DDSCollection Id fId; }; -} // namespace sdk -} // namespace mq -} // namespace fair +} // namespace fair::mq::sdk #endif /* FAIR_MQ_SDK_DDSCOLLECTION_H */ diff --git a/fairmq/sdk/DDSEnvironment.cxx b/fairmq/sdk/DDSEnvironment.cxx index 7a66abab..9eaf64d0 100644 --- a/fairmq/sdk/DDSEnvironment.cxx +++ b/fairmq/sdk/DDSEnvironment.cxx @@ -16,9 +16,8 @@ #include #include -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq::sdk +{ struct DDSEnvironment::Impl { @@ -133,6 +132,4 @@ auto operator<<(std::ostream& os, DDSEnvironment env) -> std::ostream& << "$DDS_CONFIG_HOME: " << env.GetConfigHome() / DDSEnvironment::Path(".DDS"); } -} // namespace sdk -} // namespace mq -} // namespace fair +} // namespace fair::mq::sdk diff --git a/fairmq/sdk/DDSEnvironment.h b/fairmq/sdk/DDSEnvironment.h index 2ba72eca..529f1ba1 100644 --- a/fairmq/sdk/DDSEnvironment.h +++ b/fairmq/sdk/DDSEnvironment.h @@ -13,9 +13,8 @@ #include #include -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq::sdk +{ /** * @class DDSEnvironment DDSSession.h @@ -40,8 +39,6 @@ class DDSEnvironment using DDSEnv = DDSEnvironment; -} // namespace sdk -} // namespace mq -} // namespace fair +} // namespace fair::mq::sdk #endif /* FAIR_MQ_SDK_DDSENVIRONMENT_H */ diff --git a/fairmq/sdk/DDSInfo.h.in b/fairmq/sdk/DDSInfo.h.in index 156d219c..e3c9d723 100644 --- a/fairmq/sdk/DDSInfo.h.in +++ b/fairmq/sdk/DDSInfo.h.in @@ -11,23 +11,11 @@ #include -namespace dds { -namespace tools_api { +namespace dds::tools_api { class CSession; } +namespace dds::topology_api { class CTopology; } -class CSession; - -} // namespace tools_api - -namespace topology_api { - -class CTopology; - -} // namespace topology_api -} // namespace dds - -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq::sdk +{ const std::string DDSVersion("@DDS_VERSION@"); 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 DDSPluginDir("@DDS_PLUGINDIR@"); -} // namespace sdk -} // namespace mq -} // namespace fair +} // namespace fair::mq::sdk #endif /* FAIR_MQ_SDK_DDSINFO_H */ diff --git a/fairmq/sdk/DDSSession.cxx b/fairmq/sdk/DDSSession.cxx index dcc530af..f8e8dc53 100644 --- a/fairmq/sdk/DDSSession.cxx +++ b/fairmq/sdk/DDSSession.cxx @@ -25,9 +25,8 @@ #include #include -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq::sdk +{ 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)); } -} // namespace sdk -} // namespace mq -} // namespace fair +} // namespace fair::mq::sdk diff --git a/fairmq/sdk/DDSSession.h b/fairmq/sdk/DDSSession.h index d1ee9486..93034b9e 100644 --- a/fairmq/sdk/DDSSession.h +++ b/fairmq/sdk/DDSSession.h @@ -24,9 +24,8 @@ #include #include -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq::sdk +{ /** * @enum DDSRMSPlugin DDSSession.h @@ -114,8 +113,6 @@ class DDSSession auto getMostRecentRunningDDSSession(DDSEnv env = {}) -> DDSSession; -} // namespace sdk -} // namespace mq -} // namespace fair +} // namespace fair::mq::sdk #endif /* FAIR_MQ_SDK_DDSSESSION_H */ diff --git a/fairmq/sdk/DDSTask.h b/fairmq/sdk/DDSTask.h index d593b212..5be55853 100644 --- a/fairmq/sdk/DDSTask.h +++ b/fairmq/sdk/DDSTask.h @@ -14,9 +14,8 @@ #include #include -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq::sdk +{ /** * @class DDSTask @@ -45,8 +44,6 @@ class DDSTask DDSCollection::Id fCollectionId; }; -} // namespace sdk -} // namespace mq -} // namespace fair +} // namespace fair::mq::sdk #endif /* FAIR_MQ_SDK_DDSTASK_H */ diff --git a/fairmq/sdk/DDSTopology.cxx b/fairmq/sdk/DDSTopology.cxx index 51774011..09adfd9f 100644 --- a/fairmq/sdk/DDSTopology.cxx +++ b/fairmq/sdk/DDSTopology.cxx @@ -17,9 +17,8 @@ #include #include -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq::sdk +{ struct DDSTopology::Impl { @@ -112,6 +111,4 @@ try { return os << "DDS topology: " << t.GetName(); } -} // namespace sdk -} // namespace mq -} // namespace fair +} // namespace fair::mq::sdk diff --git a/fairmq/sdk/DDSTopology.h b/fairmq/sdk/DDSTopology.h index b85ad7d7..e4166d22 100644 --- a/fairmq/sdk/DDSTopology.h +++ b/fairmq/sdk/DDSTopology.h @@ -18,9 +18,8 @@ #include #include -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq::sdk +{ /** * @class DDSTopology DDSTopology.h @@ -71,8 +70,6 @@ class DDSTopology using DDSTopo = DDSTopology; -} // namespace sdk -} // namespace mq -} // namespace fair +} // namespace fair::mq::sdk #endif /* FAIR_MQ_SDK_DDSTOPOLOGY_H */ diff --git a/fairmq/sdk/Error.cxx b/fairmq/sdk/Error.cxx index fd61959c..865994d1 100644 --- a/fairmq/sdk/Error.cxx +++ b/fairmq/sdk/Error.cxx @@ -8,8 +8,8 @@ #include "Error.h" -namespace fair { -namespace mq { +namespace fair::mq +{ const char* ErrorCategory::name() const noexcept { @@ -40,5 +40,4 @@ const ErrorCategory errorCategory{}; std::error_code MakeErrorCode(ErrorCode e) { return {static_cast(e), errorCategory}; } -} // namespace mq -} // namespace fair +} // namespace fair::mq diff --git a/fairmq/sdk/Error.h b/fairmq/sdk/Error.h index 5f8ae5f2..a8848b49 100644 --- a/fairmq/sdk/Error.h +++ b/fairmq/sdk/Error.h @@ -13,9 +13,11 @@ #include #include -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq +{ + +namespace sdk +{ struct RuntimeError : ::std::runtime_error { @@ -45,15 +47,15 @@ struct ErrorCategory : std::error_category std::string message(int ev) const override; }; -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq -namespace std { +namespace std +{ template<> struct is_error_code_enum : true_type {}; -} // namespace std +} // namespace std #endif /* FAIR_MQ_SDK_ERROR_H */ diff --git a/fairmq/sdk/Topology.cxx b/fairmq/sdk/Topology.cxx index 597644c9..5db81dd2 100644 --- a/fairmq/sdk/Topology.cxx +++ b/fairmq/sdk/Topology.cxx @@ -10,9 +10,8 @@ #include -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq::sdk +{ /// @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()) @@ -27,6 +26,4 @@ auto MakeTopology(dds::topology_api::CTopology nativeTopo, return {DDSTopo(std::move(nativeTopo), env), DDSSession(std::move(nativeSession), env), blockUntilConnected}; } -} // namespace sdk -} // namespace mq -} // namespace fair +} // namespace fair::mq::sdk diff --git a/fairmq/sdk/Topology.h b/fairmq/sdk/Topology.h index 0fc18425..f57d6220 100644 --- a/fairmq/sdk/Topology.h +++ b/fairmq/sdk/Topology.h @@ -48,9 +48,8 @@ #include #include -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq::sdk +{ using DeviceId = std::string; using DeviceState = fair::mq::State; @@ -1366,8 +1365,6 @@ auto MakeTopology(dds::topology_api::CTopology nativeTopo, DDSEnv env = {}, bool blockUntilConnected = false) -> Topology; -} // namespace sdk -} // namespace mq -} // namespace fair +} // namespace fair::mq::sdk #endif /* FAIR_MQ_SDK_TOPOLOGY_H */ diff --git a/fairmq/sdk/Traits.h b/fairmq/sdk/Traits.h index be30115e..8c5929c7 100644 --- a/fairmq/sdk/Traits.h +++ b/fairmq/sdk/Traits.h @@ -13,8 +13,7 @@ #include #include -namespace asio { -namespace detail { +namespace asio::detail { /// Specialize to match our coding conventions template @@ -44,7 +43,6 @@ struct associated_allocator_impl fbResultToResult = { @@ -478,7 +476,4 @@ void Cmds::Deserialize(const string& str, const Format type) } } -} // namespace cmd -} // namespace sdk -} // namespace mq -} // namespace fair +} // namespace fair::mq::sdk::cmd diff --git a/fairmq/sdk/commands/Commands.h b/fairmq/sdk/commands/Commands.h index 919ac41e..abf579a6 100644 --- a/fairmq/sdk/commands/Commands.h +++ b/fairmq/sdk/commands/Commands.h @@ -17,13 +17,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace sdk -{ -namespace cmd +namespace fair::mq::sdk::cmd { 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 Type& type) { return os << GetTypeName(type); } -} /* namespace cmd */ -} /* namespace sdk */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::sdk::cmd #endif /* FAIR_MQ_SDK_COMMANDFACTORY */ diff --git a/fairmq/sdk/commands/CommandsFormatDef.h.in b/fairmq/sdk/commands/CommandsFormatDef.h.in index a04967d1..cfadaf63 100644 --- a/fairmq/sdk/commands/CommandsFormatDef.h.in +++ b/fairmq/sdk/commands/CommandsFormatDef.h.in @@ -8,14 +8,11 @@ #include -namespace fair { -namespace mq { -namespace sdk { +namespace fair::mq::sdk +{ namespace cmd { constexpr auto commandsFormatDefFbs = R"(@commands_format_def_fbs@)"; } // namespace cmd -} // namespace sdk -} // namespace mq -} // namespace fair +} // namespace fair::mq::sdk diff --git a/fairmq/shmem/Common.h b/fairmq/shmem/Common.h index 95d38030..4cdfd905 100644 --- a/fairmq/shmem/Common.h +++ b/fairmq/shmem/Common.h @@ -28,11 +28,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace shmem +namespace fair::mq::shmem { struct SharedMemoryError : std::runtime_error { using std::runtime_error::runtime_error; }; @@ -293,8 +289,6 @@ struct SegmentDeallocate : public boost::static_visitor<> void* ptr; }; -} // namespace shmem -} // namespace mq -} // namespace fair +} // namespace fair::mq::shmem #endif /* FAIR_MQ_SHMEM_COMMON_H_ */ diff --git a/fairmq/shmem/Manager.h b/fairmq/shmem/Manager.h index a5c3283a..e35b7cb6 100644 --- a/fairmq/shmem/Manager.h +++ b/fairmq/shmem/Manager.h @@ -48,11 +48,7 @@ #include // mlock -namespace fair -{ -namespace mq -{ -namespace shmem +namespace fair::mq::shmem { class Manager @@ -643,8 +639,6 @@ class Manager bool fThrowOnBadAlloc; }; -} // namespace shmem -} // namespace mq -} // namespace fair +} // namespace fair::mq::shmem #endif /* FAIR_MQ_SHMEM_MANAGER_H_ */ diff --git a/fairmq/shmem/Message.h b/fairmq/shmem/Message.h index 9ca5e1d2..20c78e1b 100644 --- a/fairmq/shmem/Message.h +++ b/fairmq/shmem/Message.h @@ -24,11 +24,7 @@ #include // getpid #include // pid_t -namespace fair -{ -namespace mq -{ -namespace shmem +namespace fair::mq::shmem { class Socket; @@ -299,8 +295,6 @@ class Message final : public fair::mq::Message } }; -} -} -} +} // namespace fair::mq::shmem #endif /* FAIR_MQ_SHMEM_MESSAGE_H_ */ diff --git a/fairmq/shmem/Monitor.cxx b/fairmq/shmem/Monitor.cxx index 1f7a8cc8..d044310f 100644 --- a/fairmq/shmem/Monitor.cxx +++ b/fairmq/shmem/Monitor.cxx @@ -42,11 +42,7 @@ namespace volatile sig_atomic_t gSignalStatus = 0; } -namespace fair -{ -namespace mq -{ -namespace shmem +namespace fair::mq::shmem { void signalHandler(int signal) @@ -575,6 +571,4 @@ Monitor::~Monitor() } } -} // namespace shmem -} // namespace mq -} // namespace fair +} // namespace fair::mq::shmem diff --git a/fairmq/shmem/Monitor.h b/fairmq/shmem/Monitor.h index 8efab7c6..558902cc 100644 --- a/fairmq/shmem/Monitor.h +++ b/fairmq/shmem/Monitor.h @@ -17,11 +17,7 @@ #include // pair #include -namespace fair -{ -namespace mq -{ -namespace shmem +namespace fair::mq::shmem { struct SessionId @@ -120,8 +116,6 @@ class Monitor std::unordered_map fDeviceHeartbeats; }; -} // namespace shmem -} // namespace mq -} // namespace fair +} // namespace fair::mq::shmem #endif /* FAIR_MQ_SHMEM_MONITOR_H_ */ diff --git a/fairmq/shmem/Poller.h b/fairmq/shmem/Poller.h index 468758fe..898942f7 100644 --- a/fairmq/shmem/Poller.h +++ b/fairmq/shmem/Poller.h @@ -21,9 +21,8 @@ class FairMQChannel; -namespace fair { -namespace mq { -namespace shmem { +namespace fair::mq::shmem +{ class Poller final : public fair::mq::Poller { @@ -201,8 +200,6 @@ class Poller final : public fair::mq::Poller std::unordered_map fOffsetMap; }; -} // namespace shmem -} // namespace mq -} // namespace fair +} // namespace fair::mq::shmem #endif /* FAIR_MQ_SHMEM_POLLER_H_ */ diff --git a/fairmq/shmem/Region.h b/fairmq/shmem/Region.h index a8c54095..6be11135 100644 --- a/fairmq/shmem/Region.h +++ b/fairmq/shmem/Region.h @@ -39,11 +39,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace shmem +namespace fair::mq::shmem { struct Region @@ -276,8 +272,6 @@ struct Region RegionBulkCallback fBulkCallback; }; -} // namespace shmem -} // namespace mq -} // namespace fair +} // namespace fair::mq::shmem #endif /* FAIR_MQ_SHMEM_REGION_H_ */ diff --git a/fairmq/shmem/Socket.h b/fairmq/shmem/Socket.h index 447d9bb6..e2dc6f4c 100644 --- a/fairmq/shmem/Socket.h +++ b/fairmq/shmem/Socket.h @@ -24,11 +24,7 @@ class FairMQTransportFactory; -namespace fair -{ -namespace mq -{ -namespace shmem +namespace fair::mq::shmem { struct ZMsg @@ -524,8 +520,6 @@ class Socket final : public fair::mq::Socket int fTimeout; }; -} -} -} +} // namespace fair::mq::shmem #endif /* FAIR_MQ_SHMEM_SOCKET_H_ */ diff --git a/fairmq/shmem/TransportFactory.h b/fairmq/shmem/TransportFactory.h index 5d61d23e..61849ecb 100644 --- a/fairmq/shmem/TransportFactory.h +++ b/fairmq/shmem/TransportFactory.h @@ -29,11 +29,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace shmem +namespace fair::mq::shmem { class TransportFactory final : public fair::mq::TransportFactory @@ -210,8 +206,6 @@ class TransportFactory final : public fair::mq::TransportFactory std::unique_ptr fManager; }; -} // namespace shmem -} // namespace mq -} // namespace fair +} // namespace fair::mq::shmem #endif /* FAIR_MQ_SHMEM_TRANSPORTFACTORY_H_ */ diff --git a/fairmq/shmem/UnmanagedRegion.h b/fairmq/shmem/UnmanagedRegion.h index 333198a3..7c2777d3 100644 --- a/fairmq/shmem/UnmanagedRegion.h +++ b/fairmq/shmem/UnmanagedRegion.h @@ -20,11 +20,7 @@ #include // size_t #include -namespace fair -{ -namespace mq -{ -namespace shmem +namespace fair::mq::shmem { class Message; @@ -68,8 +64,6 @@ class UnmanagedRegion final : public fair::mq::UnmanagedRegion uint16_t fRegionId; }; -} -} -} +} // namespace fair::mq::shmem #endif /* FAIR_MQ_SHMEM_UNMANAGEDREGION_H_ */ diff --git a/fairmq/tools/CppSTL.h b/fairmq/tools/CppSTL.h index 4789778b..356e9ad1 100644 --- a/fairmq/tools/CppSTL.h +++ b/fairmq/tools/CppSTL.h @@ -13,11 +13,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace tools +namespace fair::mq::tools { // provide an enum hasher to compensate std::hash not supporting enums in C++11 @@ -32,8 +28,6 @@ struct HashEnum } }; -} /* namespace tools */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::tools #endif /* FAIR_MQ_TOOLS_CPPSTL_H */ diff --git a/fairmq/tools/InstanceLimit.h b/fairmq/tools/InstanceLimit.h index ee9ed64b..5e09e9df 100644 --- a/fairmq/tools/InstanceLimit.h +++ b/fairmq/tools/InstanceLimit.h @@ -11,9 +11,8 @@ #include "Strings.h" -namespace fair { -namespace mq { -namespace tools { +namespace fair::mq::tools +{ template struct InstanceLimiter @@ -50,8 +49,6 @@ struct InstanceLimiter template int InstanceLimiter::fCount(0); -} /* namespace tools */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::tools #endif /* FAIR_MQ_TOOLS_INSTANCELIMIT_H */ diff --git a/fairmq/tools/Network.cxx b/fairmq/tools/Network.cxx index 8c6085e2..c44cf0c9 100644 --- a/fairmq/tools/Network.cxx +++ b/fairmq/tools/Network.cxx @@ -33,11 +33,7 @@ using namespace std; -namespace fair -{ -namespace mq -{ -namespace tools +namespace fair::mq::tools { // 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 mq */ -} /* namespace fair */ +} // namespace fair::mq::tools diff --git a/fairmq/tools/Network.h b/fairmq/tools/Network.h index ed45ff9e..c3868a5b 100644 --- a/fairmq/tools/Network.h +++ b/fairmq/tools/Network.h @@ -25,11 +25,7 @@ using io_service = class io_context; } // namespace asio } // namespace boost -namespace fair -{ -namespace mq -{ -namespace tools +namespace fair::mq::tools { 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); -} /* namespace tools */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::tools #endif /* FAIR_MQ_TOOLS_NETWORK_H */ diff --git a/fairmq/tools/Process.cxx b/fairmq/tools/Process.cxx index 219c61a3..95eaf638 100644 --- a/fairmq/tools/Process.cxx +++ b/fairmq/tools/Process.cxx @@ -44,11 +44,7 @@ class LinePrinter const string fPrefix; }; -namespace fair -{ -namespace mq -{ -namespace tools +namespace fair::mq::tools { /** @@ -167,6 +163,4 @@ execute_result execute(const string& cmd, const string& prefix, const string& in return result; } -} /* namespace tools */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::tools diff --git a/fairmq/tools/Process.h b/fairmq/tools/Process.h index 4a96770b..839b345d 100644 --- a/fairmq/tools/Process.h +++ b/fairmq/tools/Process.h @@ -11,11 +11,7 @@ #include -namespace fair -{ -namespace mq -{ -namespace tools +namespace fair::mq::tools { /** @@ -41,8 +37,6 @@ execute_result execute(const std::string& cmd, const std::string& input = "", int sig = -1); -} /* namespace tools */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::tools #endif /* FAIR_MQ_TOOLS_PROCESS_H */ diff --git a/fairmq/tools/RateLimit.h b/fairmq/tools/RateLimit.h index 0b37b66c..cbca179c 100644 --- a/fairmq/tools/RateLimit.h +++ b/fairmq/tools/RateLimit.h @@ -16,11 +16,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace tools +namespace fair::mq::tools { /** @@ -136,8 +132,6 @@ class RateLimiter int skip_check_count = 1; }; -} /* namespace tools */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::tools #endif // FAIR_MQ_TOOLS_RATELIMIT_H diff --git a/fairmq/tools/Semaphore.cxx b/fairmq/tools/Semaphore.cxx index fc5c424c..07fe74fa 100644 --- a/fairmq/tools/Semaphore.cxx +++ b/fairmq/tools/Semaphore.cxx @@ -8,9 +8,8 @@ #include "Semaphore.h" -namespace fair { -namespace mq { -namespace tools { +namespace fair::mq::tools +{ Semaphore::Semaphore() : Semaphore(0) @@ -68,6 +67,4 @@ auto SharedSemaphore::GetCount() const -> std::size_t return fSemaphore->GetCount(); } -} /* namespace tools */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::tools diff --git a/fairmq/tools/Semaphore.h b/fairmq/tools/Semaphore.h index 2549b65e..bf376355 100644 --- a/fairmq/tools/Semaphore.h +++ b/fairmq/tools/Semaphore.h @@ -15,9 +15,8 @@ #include #include -namespace fair { -namespace mq { -namespace tools { +namespace fair::mq::tools +{ /** * @struct Semaphore Semaphore.h @@ -55,8 +54,6 @@ private: std::shared_ptr fSemaphore; }; -} /* namespace tools */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::tools #endif /* FAIR_MQ_TOOLS_SEMAPHORE_H */ diff --git a/fairmq/tools/Strings.h b/fairmq/tools/Strings.h index e2ea0efe..3080b02a 100644 --- a/fairmq/tools/Strings.h +++ b/fairmq/tools/Strings.h @@ -15,11 +15,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace tools +namespace fair::mq::tools { /// @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 mq */ -} /* namespace fair */ +} // namespace fair::mq::tools #endif /* FAIR_MQ_TOOLS_STRINGS_H */ diff --git a/fairmq/tools/Unique.cxx b/fairmq/tools/Unique.cxx index 1660e6dc..1a85902a 100644 --- a/fairmq/tools/Unique.cxx +++ b/fairmq/tools/Unique.cxx @@ -19,11 +19,7 @@ using namespace std; -namespace fair -{ -namespace mq -{ -namespace tools +namespace fair::mq::tools { // generates UUID string @@ -43,6 +39,4 @@ size_t UuidHash() return uuid_hasher(u); } -} /* namespace tools */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::tools diff --git a/fairmq/tools/Unique.h b/fairmq/tools/Unique.h index 42e2ed21..13696912 100644 --- a/fairmq/tools/Unique.h +++ b/fairmq/tools/Unique.h @@ -11,11 +11,7 @@ #include -namespace fair -{ -namespace mq -{ -namespace tools +namespace fair::mq::tools { // generates UUID string @@ -24,8 +20,6 @@ std::string Uuid(); // generates UUID and returns its hash std::size_t UuidHash(); -} /* namespace tools */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::tools #endif /* FAIR_MQ_TOOLS_UNIQUE_H */ diff --git a/fairmq/tools/Version.h b/fairmq/tools/Version.h index 53d3b37d..156d9f61 100644 --- a/fairmq/tools/Version.h +++ b/fairmq/tools/Version.h @@ -12,11 +12,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace tools +namespace fair::mq::tools { 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; } }; -} /* namespace tools */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::tools #endif /* FAIR_MQ_TOOLS_VERSION_H */ diff --git a/fairmq/zeromq/Context.h b/fairmq/zeromq/Context.h index 2c3af60d..8443b7b2 100644 --- a/fairmq/zeromq/Context.h +++ b/fairmq/zeromq/Context.h @@ -25,11 +25,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace zmq +namespace fair::mq::zmq { struct ContextError : std::runtime_error { using std::runtime_error::runtime_error; }; @@ -191,8 +187,6 @@ class Context bool fRegionEventsSubscriptionActive; }; -} // namespace zmq -} // namespace mq -} // namespace fair +} // namespace fair::mq::zmq #endif /* FAIR_MQ_ZMQ_CONTEXT_H_ */ diff --git a/fairmq/zeromq/Message.h b/fairmq/zeromq/Message.h index f56f5283..f0e3953c 100644 --- a/fairmq/zeromq/Message.h +++ b/fairmq/zeromq/Message.h @@ -23,11 +23,7 @@ #include // bad_alloc #include -namespace fair -{ -namespace mq -{ -namespace zmq +namespace fair::mq::zmq { class Socket; @@ -279,8 +275,6 @@ class Message final : public fair::mq::Message } }; -} // namespace zmq -} // namespace mq -} // namespace fair +} // namespace fair::mq::zmq #endif /* FAIR_MQ_ZMQ_MESSAGE_H */ diff --git a/fairmq/zeromq/Poller.h b/fairmq/zeromq/Poller.h index 3edf1b32..85744261 100644 --- a/fairmq/zeromq/Poller.h +++ b/fairmq/zeromq/Poller.h @@ -20,11 +20,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace zmq +namespace fair::mq::zmq { class Poller final : public fair::mq::Poller @@ -204,8 +200,6 @@ class Poller final : public fair::mq::Poller std::unordered_map fOffsetMap; }; -} // namespace zmq -} // namespace mq -} // namespace fair +} // namespace fair::mq::zmq #endif /* FAIR_MQ_ZMQ_POLLER_H */ diff --git a/fairmq/zeromq/Socket.h b/fairmq/zeromq/Socket.h index 912c3640..f9ee36ff 100644 --- a/fairmq/zeromq/Socket.h +++ b/fairmq/zeromq/Socket.h @@ -21,9 +21,8 @@ #include #include // unique_ptr, make_unique -namespace fair { -namespace mq { -namespace zmq { +namespace fair::mq::zmq +{ class Socket final : public fair::mq::Socket { @@ -471,8 +470,6 @@ class Socket final : public fair::mq::Socket int fTimeout; }; -} // namespace zmq -} // namespace mq -} // namespace fair +} // namespace fair::mq::zmq #endif /* FAIR_MQ_ZMQ_SOCKET_H */ diff --git a/fairmq/zeromq/TransportFactory.h b/fairmq/zeromq/TransportFactory.h index 3ca9f516..de3eb3a5 100644 --- a/fairmq/zeromq/TransportFactory.h +++ b/fairmq/zeromq/TransportFactory.h @@ -21,11 +21,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace zmq +namespace fair::mq::zmq { class TransportFactory final : public FairMQTransportFactory @@ -145,8 +141,6 @@ class TransportFactory final : public FairMQTransportFactory std::unique_ptr fCtx; }; -} // namespace zmq -} // namespace mq -} // namespace fair +} // namespace fair::mq::zmq #endif /* FAIR_MQ_ZMQ_TRANSPORTFACTORY_H */ diff --git a/fairmq/zeromq/UnmanagedRegion.h b/fairmq/zeromq/UnmanagedRegion.h index b8b3c982..201ddb43 100644 --- a/fairmq/zeromq/UnmanagedRegion.h +++ b/fairmq/zeromq/UnmanagedRegion.h @@ -16,11 +16,7 @@ #include // size_t #include -namespace fair -{ -namespace mq -{ -namespace zmq +namespace fair::mq::zmq { class UnmanagedRegion final : public fair::mq::UnmanagedRegion @@ -72,8 +68,6 @@ class UnmanagedRegion final : public fair::mq::UnmanagedRegion RegionBulkCallback fBulkCallback; }; -} // namespace zmq -} // namespace mq -} // namespace fair +} // namespace fair::mq::zmq #endif /* FAIR_MQ_ZMQ_UNMANAGEDREGION_H */ diff --git a/test/device/TestReceiver.h b/test/device/TestReceiver.h index 9a33494c..00a2f920 100644 --- a/test/device/TestReceiver.h +++ b/test/device/TestReceiver.h @@ -15,11 +15,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class Receiver : public FairMQDevice @@ -48,8 +44,6 @@ class Receiver : public FairMQDevice std::string fChannelName; }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif // FAIR_MQ_TEST_TESTRECEIVER_H diff --git a/test/device/TestSender.h b/test/device/TestSender.h index d1cca38c..1666e6d9 100644 --- a/test/device/TestSender.h +++ b/test/device/TestSender.h @@ -15,11 +15,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class Sender : public FairMQDevice @@ -48,8 +44,6 @@ class Sender : public FairMQDevice std::string fChannelName; }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif // FAIR_MQ_TEST_TESTSENDER_H diff --git a/test/helper/devices/TestErrorState.h b/test/helper/devices/TestErrorState.h index e7e7af78..2e89addd 100644 --- a/test/helper/devices/TestErrorState.h +++ b/test/helper/devices/TestErrorState.h @@ -14,11 +14,7 @@ #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class ErrorState : public FairMQDevice @@ -106,8 +102,6 @@ class ErrorState : public FairMQDevice } }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_ERROR_STATE_H */ diff --git a/test/helper/devices/TestExceptions.h b/test/helper/devices/TestExceptions.h index d0a2abf4..48de0870 100644 --- a/test/helper/devices/TestExceptions.h +++ b/test/helper/devices/TestExceptions.h @@ -15,11 +15,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class Exceptions : public FairMQDevice @@ -98,8 +94,6 @@ class Exceptions : public FairMQDevice } }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_EXCEPTIONS_H */ diff --git a/test/helper/devices/TestPairLeft.h b/test/helper/devices/TestPairLeft.h index 66172de0..573f743f 100644 --- a/test/helper/devices/TestPairLeft.h +++ b/test/helper/devices/TestPairLeft.h @@ -14,11 +14,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class PairLeft : public FairMQDevice @@ -61,8 +57,6 @@ class PairLeft : public FairMQDevice }; }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_PAIRLEFT_H */ diff --git a/test/helper/devices/TestPairRight.h b/test/helper/devices/TestPairRight.h index e23bf4c8..281e2815 100644 --- a/test/helper/devices/TestPairRight.h +++ b/test/helper/devices/TestPairRight.h @@ -14,11 +14,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class PairRight : public FairMQDevice @@ -58,8 +54,6 @@ class PairRight : public FairMQDevice }; }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_PAIRRIGHT_H */ diff --git a/test/helper/devices/TestPollIn.h b/test/helper/devices/TestPollIn.h index f55681b5..9c1d2354 100644 --- a/test/helper/devices/TestPollIn.h +++ b/test/helper/devices/TestPollIn.h @@ -14,11 +14,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { using namespace std; @@ -123,8 +119,6 @@ class PollIn : public FairMQDevice int fPollType; }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_POLLIN_H */ diff --git a/test/helper/devices/TestPollOut.h b/test/helper/devices/TestPollOut.h index 04163ce3..654a8979 100644 --- a/test/helper/devices/TestPollOut.h +++ b/test/helper/devices/TestPollOut.h @@ -12,11 +12,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class PollOut : public FairMQDevice @@ -36,8 +32,6 @@ class PollOut : public FairMQDevice }; }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_POLLOUT_H */ diff --git a/test/helper/devices/TestPub.h b/test/helper/devices/TestPub.h index 4bb77a6f..30054372 100644 --- a/test/helper/devices/TestPub.h +++ b/test/helper/devices/TestPub.h @@ -14,11 +14,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class Pub : public FairMQDevice @@ -70,8 +66,6 @@ class Pub : public FairMQDevice } }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_PUB_H */ diff --git a/test/helper/devices/TestPull.h b/test/helper/devices/TestPull.h index 645c43ad..261957cf 100644 --- a/test/helper/devices/TestPull.h +++ b/test/helper/devices/TestPull.h @@ -13,11 +13,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { using namespace std; @@ -41,8 +37,6 @@ class Pull : public FairMQDevice }; }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_PULL_H */ diff --git a/test/helper/devices/TestPush.h b/test/helper/devices/TestPush.h index f86e46dd..69cb2bfd 100644 --- a/test/helper/devices/TestPush.h +++ b/test/helper/devices/TestPush.h @@ -12,11 +12,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class Push : public FairMQDevice @@ -34,8 +30,6 @@ class Push : public FairMQDevice }; }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_PUSH_H */ diff --git a/test/helper/devices/TestRep.h b/test/helper/devices/TestRep.h index 9bbca15d..7159fe1b 100644 --- a/test/helper/devices/TestRep.h +++ b/test/helper/devices/TestRep.h @@ -13,11 +13,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class Rep : public FairMQDevice @@ -49,8 +45,6 @@ class Rep : public FairMQDevice }; }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_REP_H */ diff --git a/test/helper/devices/TestReq.h b/test/helper/devices/TestReq.h index c8c835d1..cf719f4f 100644 --- a/test/helper/devices/TestReq.h +++ b/test/helper/devices/TestReq.h @@ -13,11 +13,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class Req : public FairMQDevice @@ -41,8 +37,6 @@ class Req : public FairMQDevice }; }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_REQ_H */ diff --git a/test/helper/devices/TestSignals.h b/test/helper/devices/TestSignals.h index 474cb764..5cd95c59 100644 --- a/test/helper/devices/TestSignals.h +++ b/test/helper/devices/TestSignals.h @@ -15,11 +15,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class Signals : public FairMQDevice @@ -105,8 +101,6 @@ class Signals : public FairMQDevice } }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_SIGNALS_H */ diff --git a/test/helper/devices/TestSub.h b/test/helper/devices/TestSub.h index 893b2f44..dad14662 100644 --- a/test/helper/devices/TestSub.h +++ b/test/helper/devices/TestSub.h @@ -14,11 +14,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class Sub : public FairMQDevice @@ -64,8 +60,6 @@ class Sub : public FairMQDevice } }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_SUB_H */ diff --git a/test/helper/devices/TestTransferTimeout.h b/test/helper/devices/TestTransferTimeout.h index b681ffe1..8e4355a4 100644 --- a/test/helper/devices/TestTransferTimeout.h +++ b/test/helper/devices/TestTransferTimeout.h @@ -12,11 +12,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class TransferTimeout : public FairMQDevice @@ -156,8 +152,6 @@ class TransferTimeout : public FairMQDevice }; }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_TRANSFERTIMEOUT_H */ diff --git a/test/helper/devices/TestWaitFor.h b/test/helper/devices/TestWaitFor.h index b565bb3c..def2a53f 100644 --- a/test/helper/devices/TestWaitFor.h +++ b/test/helper/devices/TestWaitFor.h @@ -14,11 +14,7 @@ #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class TestWaitFor : public FairMQDevice @@ -55,8 +51,6 @@ class TestWaitFor : public FairMQDevice } }; -} // namespace test -} // namespace mq -} // namespace fair +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_WAITFOR_H */ diff --git a/test/helper/plugins/dummy.h.in b/test/helper/plugins/dummy.h.in index a8441034..ac7c4dcf 100644 --- a/test/helper/plugins/dummy.h.in +++ b/test/helper/plugins/dummy.h.in @@ -15,11 +15,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class DummyPlugin : public fair::mq::Plugin @@ -67,8 +63,6 @@ REGISTER_FAIRMQ_PLUGIN( fair::mq::test::DummyPluginProgramOptions // Free function which declares custom program options for the plugin ) -} /* namespace test */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_PLUGIN_DUMMY */ diff --git a/test/helper/plugins/dummy2.h.in b/test/helper/plugins/dummy2.h.in index 46d812e6..df662c37 100644 --- a/test/helper/plugins/dummy2.h.in +++ b/test/helper/plugins/dummy2.h.in @@ -11,11 +11,7 @@ #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { class Dummy2Plugin : public fair::mq::Plugin @@ -37,8 +33,6 @@ REGISTER_FAIRMQ_PLUGIN( fair::mq::Plugin::NoProgramOptions ) -} /* namespace test */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_PLUGIN_DUMMY */ diff --git a/test/plugin_services/Fixture.h b/test/plugin_services/Fixture.h index f871cad8..ca17f000 100644 --- a/test/plugin_services/Fixture.h +++ b/test/plugin_services/Fixture.h @@ -16,11 +16,7 @@ #include #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { inline auto control(FairMQDevice& device) -> void @@ -64,8 +60,6 @@ struct PluginServices : ::testing::Test { std::thread fRunStateMachineThread; }; -} /* namespace test */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_FIXTURE */ diff --git a/test/runner.cxx.in b/test/runner.cxx.in index d47a1125..3119d572 100644 --- a/test/runner.cxx.in +++ b/test/runner.cxx.in @@ -13,11 +13,7 @@ #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { using namespace std; @@ -25,9 +21,7 @@ using namespace std; string runTestDevice = "@RUN_TEST_DEVICE@"; string mqConfig = "@MQ_CONFIG@"; -} /* namespace test */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::test int main(int argc, char** argv) { diff --git a/test/runner.h b/test/runner.h index 73eada8c..8a932788 100644 --- a/test/runner.h +++ b/test/runner.h @@ -11,18 +11,12 @@ #include -namespace fair -{ -namespace mq -{ -namespace test +namespace fair::mq::test { extern std::string runTestDevice; /// Path to test device executable. extern std::string mqConfig; /// Path to FairMQ device config file. -} /* namespace test */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_RUNNER_H */ diff --git a/test/sdk/Fixtures.h b/test/sdk/Fixtures.h index c92ffcfc..51407b20 100644 --- a/test/sdk/Fixtures.h +++ b/test/sdk/Fixtures.h @@ -25,9 +25,8 @@ #include #include -namespace fair { -namespace mq { -namespace test { +namespace fair::mq::test +{ struct LoggerConfig { @@ -165,9 +164,6 @@ struct AsyncOpFixture : ::testing::Test asio::io_context mIoContext; }; -} /* namespace test */ -} /* namespace mq */ -} /* namespace fair */ +} // namespace fair::mq::test #endif /* FAIR_MQ_TEST_FIXTURES */ -