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:
@@ -29,9 +29,8 @@
|
||||
#define FAIR_LOG LOG
|
||||
#endif /* ifndef FAIR_LOG */
|
||||
|
||||
namespace fair {
|
||||
namespace mq {
|
||||
namespace sdk {
|
||||
namespace fair::mq::sdk
|
||||
{
|
||||
|
||||
template<typename... SignatureArgTypes>
|
||||
struct AsioAsyncOpImplBase
|
||||
@@ -219,9 +218,6 @@ struct AsioAsyncOp<Executor,
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace sdk */
|
||||
} /* namespace mq */
|
||||
} /* namespace fair */
|
||||
} // namespace fair::mq::sdk
|
||||
|
||||
#endif /* FAIR_MQ_SDK_ASIOASYNCOP_H */
|
||||
|
||||
|
@@ -14,9 +14,8 @@
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
namespace fair {
|
||||
namespace mq {
|
||||
namespace sdk {
|
||||
namespace fair::mq::sdk
|
||||
{
|
||||
|
||||
using DefaultExecutor = asio::any_io_executor;
|
||||
using DefaultAllocator = std::allocator<int>;
|
||||
@@ -69,8 +68,6 @@ class AsioBase
|
||||
AllocatorType fAllocator;
|
||||
};
|
||||
|
||||
} /* namespace sdk */
|
||||
} /* namespace mq */
|
||||
} /* namespace fair */
|
||||
} // namespace fair::mq::sdk
|
||||
|
||||
#endif /* FAIR_MQ_SDK_ASIOBASE_H */
|
||||
|
@@ -16,9 +16,8 @@
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
|
||||
namespace fair {
|
||||
namespace mq {
|
||||
namespace sdk {
|
||||
namespace fair::mq::sdk
|
||||
{
|
||||
|
||||
/**
|
||||
* @class DDSAgent <fairmq/sdk/DDSAgent.h>
|
||||
@@ -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 */
|
||||
|
@@ -14,9 +14,8 @@
|
||||
#include <ostream>
|
||||
#include <cstdint>
|
||||
|
||||
namespace fair {
|
||||
namespace mq {
|
||||
namespace sdk {
|
||||
namespace fair::mq::sdk
|
||||
{
|
||||
|
||||
/**
|
||||
* @class DDSCollection <fairmq/sdk/DDSCollection.h>
|
||||
@@ -42,8 +41,6 @@ class DDSCollection
|
||||
Id fId;
|
||||
};
|
||||
|
||||
} // namespace sdk
|
||||
} // namespace mq
|
||||
} // namespace fair
|
||||
} // namespace fair::mq::sdk
|
||||
|
||||
#endif /* FAIR_MQ_SDK_DDSCOLLECTION_H */
|
||||
|
@@ -16,9 +16,8 @@
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
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
|
||||
|
@@ -13,9 +13,8 @@
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
|
||||
namespace fair {
|
||||
namespace mq {
|
||||
namespace sdk {
|
||||
namespace fair::mq::sdk
|
||||
{
|
||||
|
||||
/**
|
||||
* @class DDSEnvironment DDSSession.h <fairmq/sdk/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 */
|
||||
|
@@ -11,23 +11,11 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
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 */
|
||||
|
@@ -25,9 +25,8 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
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
|
||||
|
@@ -24,9 +24,8 @@
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
namespace fair {
|
||||
namespace mq {
|
||||
namespace sdk {
|
||||
namespace fair::mq::sdk
|
||||
{
|
||||
|
||||
/**
|
||||
* @enum DDSRMSPlugin DDSSession.h <fairmq/sdk/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 */
|
||||
|
@@ -14,9 +14,8 @@
|
||||
#include <ostream>
|
||||
#include <cstdint>
|
||||
|
||||
namespace fair {
|
||||
namespace mq {
|
||||
namespace sdk {
|
||||
namespace fair::mq::sdk
|
||||
{
|
||||
|
||||
/**
|
||||
* @class DDSTask <fairmq/sdk/DDSTask.h>
|
||||
@@ -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 */
|
||||
|
@@ -17,9 +17,8 @@
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
|
||||
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
|
||||
|
@@ -18,9 +18,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace fair {
|
||||
namespace mq {
|
||||
namespace sdk {
|
||||
namespace fair::mq::sdk
|
||||
{
|
||||
|
||||
/**
|
||||
* @class DDSTopology DDSTopology.h <fairmq/sdk/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 */
|
||||
|
@@ -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<int>(e), errorCategory}; }
|
||||
|
||||
} // namespace mq
|
||||
} // namespace fair
|
||||
} // namespace fair::mq
|
||||
|
@@ -13,9 +13,11 @@
|
||||
#include <stdexcept>
|
||||
#include <system_error>
|
||||
|
||||
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<fair::mq::ErrorCode> : true_type
|
||||
{};
|
||||
|
||||
} // namespace std
|
||||
} // namespace std
|
||||
|
||||
#endif /* FAIR_MQ_SDK_ERROR_H */
|
||||
|
@@ -10,9 +10,8 @@
|
||||
|
||||
#include <dds/dds.h>
|
||||
|
||||
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
|
||||
|
@@ -48,9 +48,8 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
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 */
|
||||
|
@@ -13,8 +13,7 @@
|
||||
#include <asio/associated_executor.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
namespace asio {
|
||||
namespace detail {
|
||||
namespace asio::detail {
|
||||
|
||||
/// Specialize to match our coding conventions
|
||||
template<typename T, typename Executor>
|
||||
@@ -44,7 +43,6 @@ struct associated_allocator_impl<T,
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace detail */
|
||||
} /* namespace asio */
|
||||
} /* namespace asio::detail */
|
||||
|
||||
#endif /* FAIR_MQ_SDK_TRAITS_H */
|
||||
|
@@ -17,10 +17,8 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace fair {
|
||||
namespace mq {
|
||||
namespace sdk {
|
||||
namespace cmd {
|
||||
namespace fair::mq::sdk::cmd
|
||||
{
|
||||
|
||||
array<Result, 2> 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
|
||||
|
@@ -17,13 +17,7 @@
|
||||
#include <type_traits>
|
||||
#include <stdexcept>
|
||||
|
||||
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 */
|
||||
|
@@ -8,14 +8,11 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
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
|
||||
|
Reference in New Issue
Block a user