Refactor and modernize namespace declarations
Move all unit tests to namespace nfd::tests
Delete unused header core/algorithm.hpp
Change-Id: I5591f0c5f3bb5db67f8b45fae95471f8a555ca68
diff --git a/tools/nfdc/available-commands.cpp b/tools/nfdc/available-commands.cpp
index 5be4854..6df761a 100644
--- a/tools/nfdc/available-commands.cpp
+++ b/tools/nfdc/available-commands.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,9 +30,7 @@
#include "status.hpp"
#include "strategy-choice-module.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
void
registerCommands(CommandParser& parser)
@@ -44,6 +42,4 @@
StrategyChoiceModule::registerCommands(parser);
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/available-commands.hpp b/tools/nfdc/available-commands.hpp
index a887eec..ad6525c 100644
--- a/tools/nfdc/available-commands.hpp
+++ b/tools/nfdc/available-commands.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,15 +28,11 @@
#include "command-parser.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
void
registerCommands(CommandParser& parser);
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_AVAILABLE_COMMANDS_HPP
diff --git a/tools/nfdc/canonizer.cpp b/tools/nfdc/canonizer.cpp
index a44a2bf..c6f150b 100644
--- a/tools/nfdc/canonizer.cpp
+++ b/tools/nfdc/canonizer.cpp
@@ -25,9 +25,7 @@
#include "canonizer.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
std::pair<std::optional<FaceUri>, std::string>
canonize(ExecuteContext& ctx, const FaceUri& uri)
@@ -56,6 +54,4 @@
return {FindFace::Code::CANONIZE_ERROR, msg};
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/canonizer.hpp b/tools/nfdc/canonizer.hpp
index 90b3afb..d693a55 100644
--- a/tools/nfdc/canonizer.hpp
+++ b/tools/nfdc/canonizer.hpp
@@ -32,9 +32,7 @@
#include <ndn-cxx/net/face-uri.hpp>
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
/** \brief canonize FaceUri
* \return pair of canonical FaceUri (nullopt if failure) and error string
@@ -53,8 +51,6 @@
const std::string& error,
const std::string& field = "");
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_CANONIZER_HPP
diff --git a/tools/nfdc/channel-module.cpp b/tools/nfdc/channel-module.cpp
index 81f69d4..085fc35 100644
--- a/tools/nfdc/channel-module.cpp
+++ b/tools/nfdc/channel-module.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,9 +26,7 @@
#include "channel-module.hpp"
#include "format-helpers.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
void
ChannelModule::fetchStatus(Controller& controller,
@@ -78,6 +76,4 @@
os << "\n";
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/channel-module.hpp b/tools/nfdc/channel-module.hpp
index 17989a6..6698ae8 100644
--- a/tools/nfdc/channel-module.hpp
+++ b/tools/nfdc/channel-module.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,9 +28,7 @@
#include "module.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
using ndn::nfd::ChannelStatus;
@@ -70,8 +68,6 @@
std::vector<ChannelStatus> m_status;
};
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_CHANNEL_MODULE_HPP
diff --git a/tools/nfdc/command-arguments.hpp b/tools/nfdc/command-arguments.hpp
index 2ab30f2..6dc060a 100644
--- a/tools/nfdc/command-arguments.hpp
+++ b/tools/nfdc/command-arguments.hpp
@@ -33,9 +33,7 @@
#include <any>
#include <boost/logic/tribool.hpp>
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
using ndn::nfd::FacePersistency;
using ndn::nfd::RouteOrigin;
@@ -75,8 +73,6 @@
}
};
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_COMMAND_ARGUMENTS_HPP
diff --git a/tools/nfdc/command-definition.cpp b/tools/nfdc/command-definition.cpp
index 7952e25..08952fd 100644
--- a/tools/nfdc/command-definition.cpp
+++ b/tools/nfdc/command-definition.cpp
@@ -28,9 +28,7 @@
#include <ndn-cxx/util/logger.hpp>
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
NDN_LOG_INIT(nfdc.CommandDefinition);
@@ -291,6 +289,4 @@
NDN_CXX_UNREACHABLE;
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/command-definition.hpp b/tools/nfdc/command-definition.hpp
index 8cd56d9..26e309b 100644
--- a/tools/nfdc/command-definition.hpp
+++ b/tools/nfdc/command-definition.hpp
@@ -28,16 +28,14 @@
#include "command-arguments.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
/** \brief indicates argument value type
*/
enum class ArgValueType {
/** \brief boolean argument without value
*
- * The argument appears in CommandArguments as bool value 'true'.
+ * The argument appears in CommandArguments as bool value `true`.
* It must not be declared as positional.
*/
NONE,
@@ -212,8 +210,6 @@
std::vector<std::string> m_positionalArgs;
};
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_COMMAND_DEFINITION_HPP
diff --git a/tools/nfdc/command-parser.cpp b/tools/nfdc/command-parser.cpp
index 69bc26a..19bb5a2 100644
--- a/tools/nfdc/command-parser.cpp
+++ b/tools/nfdc/command-parser.cpp
@@ -28,9 +28,7 @@
#include <ndn-cxx/util/logger.hpp>
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
NDN_LOG_INIT(nfdc.CommandParser);
@@ -129,6 +127,4 @@
return {def.getNoun(), def.getVerb(), def.parse(tokens, nConsumed), i->second->execute};
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/command-parser.hpp b/tools/nfdc/command-parser.hpp
index f03027b..e0849b0 100644
--- a/tools/nfdc/command-parser.hpp
+++ b/tools/nfdc/command-parser.hpp
@@ -31,9 +31,7 @@
#include <type_traits>
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
/** \brief indicates which modes is a command allowed
*/
@@ -125,8 +123,6 @@
std::vector<CommandContainer::const_iterator> m_commandOrder;
};
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_COMMAND_PARSER_HPP
diff --git a/tools/nfdc/cs-module.cpp b/tools/nfdc/cs-module.cpp
index cdaad5a..73d066c 100644
--- a/tools/nfdc/cs-module.cpp
+++ b/tools/nfdc/cs-module.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,9 +28,7 @@
#include <ndn-cxx/util/indented-stream.hpp>
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
void
CsModule::registerCommands(CommandParser& parser)
@@ -184,6 +182,4 @@
<< ia.end();
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/cs-module.hpp b/tools/nfdc/cs-module.hpp
index 3b16952..3c78765 100644
--- a/tools/nfdc/cs-module.hpp
+++ b/tools/nfdc/cs-module.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,9 +29,7 @@
#include "command-parser.hpp"
#include "module.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
using ndn::nfd::CsInfo;
@@ -78,8 +76,6 @@
CsInfo m_status;
};
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_CS_MODULE_HPP
diff --git a/tools/nfdc/execute-command.cpp b/tools/nfdc/execute-command.cpp
index 7067ebf..6706ffc 100644
--- a/tools/nfdc/execute-command.cpp
+++ b/tools/nfdc/execute-command.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,9 +25,7 @@
#include "execute-command.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
time::nanoseconds
ExecuteContext::getTimeout() const
@@ -60,6 +58,4 @@
};
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/execute-command.hpp b/tools/nfdc/execute-command.hpp
index 0458fb1..8132774 100644
--- a/tools/nfdc/execute-command.hpp
+++ b/tools/nfdc/execute-command.hpp
@@ -37,9 +37,7 @@
#include <ndn-cxx/mgmt/nfd/status-dataset.hpp>
#include <ndn-cxx/security/key-chain.hpp>
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
using ndn::Face;
using ndn::KeyChain;
@@ -92,8 +90,6 @@
*/
using ExecuteCommand = std::function<void(ExecuteContext&)>;
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_EXECUTE_COMMAND_HPP
diff --git a/tools/nfdc/face-module.cpp b/tools/nfdc/face-module.cpp
index 267187e..08409f7 100644
--- a/tools/nfdc/face-module.cpp
+++ b/tools/nfdc/face-module.cpp
@@ -27,9 +27,7 @@
#include "canonizer.hpp"
#include "find-face.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
void
FaceModule::registerCommands(CommandParser& parser)
@@ -557,6 +555,4 @@
os << '\n';
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/face-module.hpp b/tools/nfdc/face-module.hpp
index cffd98b..1d3eac8 100644
--- a/tools/nfdc/face-module.hpp
+++ b/tools/nfdc/face-module.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,9 +30,7 @@
#include "command-parser.hpp"
#include "format-helpers.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
using ndn::nfd::FaceStatus;
@@ -114,8 +112,6 @@
std::vector<FaceStatus> m_status;
};
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_FACE_MODULE_HPP
diff --git a/tools/nfdc/fib-module.cpp b/tools/nfdc/fib-module.cpp
index e040109..92f7212 100644
--- a/tools/nfdc/fib-module.cpp
+++ b/tools/nfdc/fib-module.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,9 +26,7 @@
#include "fib-module.hpp"
#include "format-helpers.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
void
FibModule::fetchStatus(Controller& controller,
@@ -98,6 +96,4 @@
os << "\n";
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/fib-module.hpp b/tools/nfdc/fib-module.hpp
index a41c978..e182f59 100644
--- a/tools/nfdc/fib-module.hpp
+++ b/tools/nfdc/fib-module.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,9 +28,7 @@
#include "module.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
using ndn::nfd::FibEntry;
using ndn::nfd::NextHopRecord;
@@ -71,8 +69,6 @@
std::vector<FibEntry> m_status;
};
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_FIB_MODULE_HPP
diff --git a/tools/nfdc/find-face.cpp b/tools/nfdc/find-face.cpp
index 2240433..054cba9 100644
--- a/tools/nfdc/find-face.cpp
+++ b/tools/nfdc/find-face.cpp
@@ -29,9 +29,7 @@
#include <ndn-cxx/util/logger.hpp>
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
NDN_LOG_INIT(nfdc.FindFace);
@@ -180,6 +178,4 @@
}
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/find-face.hpp b/tools/nfdc/find-face.hpp
index ee1c521..02de011 100644
--- a/tools/nfdc/find-face.hpp
+++ b/tools/nfdc/find-face.hpp
@@ -28,9 +28,7 @@
#include "execute-command.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
using ndn::nfd::FaceQueryFilter;
using ndn::nfd::FaceStatus;
@@ -139,8 +137,6 @@
std::string m_errorReason;
};
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_FIND_FACE_HPP
diff --git a/tools/nfdc/format-helpers.cpp b/tools/nfdc/format-helpers.cpp
index 63f2417..1810f30 100644
--- a/tools/nfdc/format-helpers.cpp
+++ b/tools/nfdc/format-helpers.cpp
@@ -28,9 +28,7 @@
#include <iomanip>
#include <sstream>
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
namespace xml {
@@ -204,6 +202,4 @@
} // namespace text
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/format-helpers.hpp b/tools/nfdc/format-helpers.hpp
index 4140ae2..2ee28ba 100644
--- a/tools/nfdc/format-helpers.hpp
+++ b/tools/nfdc/format-helpers.hpp
@@ -28,9 +28,7 @@
#include "core/common.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
namespace xml {
@@ -266,8 +264,6 @@
} // namespace text
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_FORMAT_HELPERS_HPP
diff --git a/tools/nfdc/forwarder-general-module.cpp b/tools/nfdc/forwarder-general-module.cpp
index 1542b9f..7cfab84 100644
--- a/tools/nfdc/forwarder-general-module.cpp
+++ b/tools/nfdc/forwarder-general-module.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,9 +28,7 @@
#include <ndn-cxx/util/indented-stream.hpp>
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
void
ForwarderGeneralModule::fetchStatus(Controller& controller,
@@ -130,6 +128,4 @@
os << ia.end();
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/forwarder-general-module.hpp b/tools/nfdc/forwarder-general-module.hpp
index 10d5cf3..239cea6 100644
--- a/tools/nfdc/forwarder-general-module.hpp
+++ b/tools/nfdc/forwarder-general-module.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,9 +28,7 @@
#include "module.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
using ndn::nfd::ForwarderStatus;
@@ -70,8 +68,6 @@
ForwarderStatus m_status;
};
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_FORWARDER_GENERAL_MODULE_HPP
diff --git a/tools/nfdc/help.cpp b/tools/nfdc/help.cpp
index 052d16c..357a647 100644
--- a/tools/nfdc/help.cpp
+++ b/tools/nfdc/help.cpp
@@ -32,9 +32,7 @@
#include <cstring>
#include <unistd.h>
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
NDN_LOG_INIT(nfdc.Help);
@@ -98,6 +96,4 @@
}
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/help.hpp b/tools/nfdc/help.hpp
index 53d21d4..19df8c1 100644
--- a/tools/nfdc/help.hpp
+++ b/tools/nfdc/help.hpp
@@ -28,9 +28,7 @@
#include "command-parser.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
/** \brief writes the list of available commands to a stream
* \param os the output stream to write the list to
@@ -56,8 +54,6 @@
help(std::ostream& os, const CommandParser& parser,
std::vector<std::string> args);
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_HELP_HPP
diff --git a/tools/nfdc/main.cpp b/tools/nfdc/main.cpp
index a9d9c6f..78da697 100644
--- a/tools/nfdc/main.cpp
+++ b/tools/nfdc/main.cpp
@@ -31,9 +31,7 @@
#include <fstream>
#include <iostream>
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
static int
main(int argc, char** argv)
@@ -184,9 +182,7 @@
}
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
int
main(int argc, char** argv)
diff --git a/tools/nfdc/module.hpp b/tools/nfdc/module.hpp
index b8ede30..6793b3e 100644
--- a/tools/nfdc/module.hpp
+++ b/tools/nfdc/module.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,9 +30,7 @@
#include <ndn-cxx/mgmt/nfd/command-options.hpp>
#include <ndn-cxx/mgmt/nfd/controller.hpp>
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
using ndn::nfd::CommandOptions;
using ndn::nfd::Controller;
@@ -74,8 +72,6 @@
formatStatusText(std::ostream& os) const = 0;
};
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_MODULE_HPP
diff --git a/tools/nfdc/rib-module.cpp b/tools/nfdc/rib-module.cpp
index 5ed8553..d0489cf 100644
--- a/tools/nfdc/rib-module.cpp
+++ b/tools/nfdc/rib-module.cpp
@@ -29,9 +29,7 @@
#include "find-face.hpp"
#include "format-helpers.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
void
RibModule::registerCommands(CommandParser& parser)
@@ -410,6 +408,4 @@
}
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/rib-module.hpp b/tools/nfdc/rib-module.hpp
index 6c64cd2..22d4e76 100644
--- a/tools/nfdc/rib-module.hpp
+++ b/tools/nfdc/rib-module.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,9 +29,7 @@
#include "module.hpp"
#include "command-parser.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
using ndn::nfd::RibEntry;
using ndn::nfd::Route;
@@ -113,8 +111,6 @@
std::vector<RibEntry> m_status;
};
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_RIB_MODULE_HPP
diff --git a/tools/nfdc/status-report.cpp b/tools/nfdc/status-report.cpp
index aa3cdf1..ff0ea1c 100644
--- a/tools/nfdc/status-report.cpp
+++ b/tools/nfdc/status-report.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,9 +26,7 @@
#include "status-report.hpp"
#include "format-helpers.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
ReportFormat
parseReportFormat(const std::string& s)
@@ -99,6 +97,4 @@
}
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/status-report.hpp b/tools/nfdc/status-report.hpp
index ae5ecdc..20c364d 100644
--- a/tools/nfdc/status-report.hpp
+++ b/tools/nfdc/status-report.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -32,9 +32,7 @@
#include <ndn-cxx/security/key-chain.hpp>
#include <ndn-cxx/security/validator.hpp>
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
using ndn::Face;
using ndn::KeyChain;
@@ -93,8 +91,6 @@
std::vector<unique_ptr<Module>> sections;
};
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_STATUS_REPORT_HPP
diff --git a/tools/nfdc/status.cpp b/tools/nfdc/status.cpp
index a338b1d..081eea9 100644
--- a/tools/nfdc/status.cpp
+++ b/tools/nfdc/status.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -34,9 +34,7 @@
#include <ndn-cxx/security/validator-null.hpp>
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
void
reportStatus(ExecuteContext& ctx, const StatusReportOptions& options)
@@ -154,6 +152,4 @@
parser.addAlias("cs", "info", "");
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/status.hpp b/tools/nfdc/status.hpp
index b5d2e94..c563ad7 100644
--- a/tools/nfdc/status.hpp
+++ b/tools/nfdc/status.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,9 +29,7 @@
#include "status-report.hpp"
#include "command-parser.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
struct StatusReportOptions
{
@@ -63,8 +61,6 @@
void
registerStatusCommands(CommandParser& parser);
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_STATUS_HPP
diff --git a/tools/nfdc/strategy-choice-module.cpp b/tools/nfdc/strategy-choice-module.cpp
index 004f368..1fbca4c 100644
--- a/tools/nfdc/strategy-choice-module.cpp
+++ b/tools/nfdc/strategy-choice-module.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,9 +26,7 @@
#include "strategy-choice-module.hpp"
#include "format-helpers.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
void
StrategyChoiceModule::registerCommands(CommandParser& parser)
@@ -202,6 +200,4 @@
<< ia.end();
}
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
diff --git a/tools/nfdc/strategy-choice-module.hpp b/tools/nfdc/strategy-choice-module.hpp
index 7c403a9..502d66b 100644
--- a/tools/nfdc/strategy-choice-module.hpp
+++ b/tools/nfdc/strategy-choice-module.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,9 +29,7 @@
#include "module.hpp"
#include "command-parser.hpp"
-namespace nfd {
-namespace tools {
-namespace nfdc {
+namespace nfd::tools::nfdc {
using ndn::nfd::StrategyChoice;
@@ -97,8 +95,6 @@
std::vector<StrategyChoice> m_status;
};
-} // namespace nfdc
-} // namespace tools
-} // namespace nfd
+} // namespace nfd::tools::nfdc
#endif // NFD_TOOLS_NFDC_STRATEGY_CHOICE_MODULE_HPP