mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
17-ify namespaces
This commit is contained in:
@@ -13,11 +13,7 @@
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
|
||||
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 */
|
||||
|
@@ -11,9 +11,8 @@
|
||||
|
||||
#include "Strings.h"
|
||||
|
||||
namespace fair {
|
||||
namespace mq {
|
||||
namespace tools {
|
||||
namespace fair::mq::tools
|
||||
{
|
||||
|
||||
template<typename Tag, int Max>
|
||||
struct InstanceLimiter
|
||||
@@ -50,8 +49,6 @@ struct InstanceLimiter
|
||||
template<typename Tag, int Max>
|
||||
int InstanceLimiter<Tag, Max>::fCount(0);
|
||||
|
||||
} /* namespace tools */
|
||||
} /* namespace mq */
|
||||
} /* namespace fair */
|
||||
} // namespace fair::mq::tools
|
||||
|
||||
#endif /* FAIR_MQ_TOOLS_INSTANCELIMIT_H */
|
||||
|
@@ -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
|
||||
|
@@ -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 */
|
||||
|
@@ -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
|
||||
|
@@ -11,11 +11,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
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 */
|
||||
|
@@ -16,11 +16,7 @@
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
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
|
||||
|
@@ -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
|
||||
|
@@ -15,9 +15,8 @@
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
namespace fair {
|
||||
namespace mq {
|
||||
namespace tools {
|
||||
namespace fair::mq::tools
|
||||
{
|
||||
|
||||
/**
|
||||
* @struct Semaphore Semaphore.h <fairmq/tools/Semaphore.h>
|
||||
@@ -55,8 +54,6 @@ private:
|
||||
std::shared_ptr<Semaphore> fSemaphore;
|
||||
};
|
||||
|
||||
} /* namespace tools */
|
||||
} /* namespace mq */
|
||||
} /* namespace fair */
|
||||
} // namespace fair::mq::tools
|
||||
|
||||
#endif /* FAIR_MQ_TOOLS_SEMAPHORE_H */
|
||||
|
@@ -15,11 +15,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
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 */
|
||||
|
@@ -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
|
||||
|
@@ -11,11 +11,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
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 */
|
||||
|
@@ -12,11 +12,7 @@
|
||||
#include <ostream>
|
||||
#include <tuple>
|
||||
|
||||
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 */
|
||||
|
Reference in New Issue
Block a user