core: slim down `common.hpp`
Change-Id: I875c35147edd2261fbaa24e809c170d5cd9b94d3
diff --git a/daemon/table/cleanup.cpp b/daemon/table/cleanup.cpp
index b025de8..fe1487d 100644
--- a/daemon/table/cleanup.cpp
+++ b/daemon/table/cleanup.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-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,6 +25,8 @@
#include "cleanup.hpp"
+#include <map>
+
namespace nfd {
void
diff --git a/daemon/table/cs-entry.hpp b/daemon/table/cs-entry.hpp
index 89f71f1..0b58395 100644
--- a/daemon/table/cs-entry.hpp
+++ b/daemon/table/cs-entry.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "core/common.hpp"
+#include <set>
+
namespace nfd::cs {
/** \brief A ContentStore entry.
diff --git a/daemon/table/cs-policy-priority-fifo.hpp b/daemon/table/cs-policy-priority-fifo.hpp
index 44ebe9e..a476ec9 100644
--- a/daemon/table/cs-policy-priority-fifo.hpp
+++ b/daemon/table/cs-policy-priority-fifo.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "cs-policy.hpp"
+#include <ndn-cxx/util/scheduler.hpp>
+
#include <list>
namespace nfd::cs {
@@ -46,7 +48,7 @@
{
QueueType queueType;
Queue::iterator queueIt;
- scheduler::EventId moveStaleEventId;
+ ndn::scheduler::EventId moveStaleEventId;
};
/** \brief Priority First-In-First-Out (FIFO) replacement policy.
diff --git a/daemon/table/cs-policy.hpp b/daemon/table/cs-policy.hpp
index 3291bda..0952f44 100644
--- a/daemon/table/cs-policy.hpp
+++ b/daemon/table/cs-policy.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,10 @@
#include "cs-entry.hpp"
+#include <functional>
+#include <map>
+#include <set>
+
namespace nfd::cs {
class Cs;
diff --git a/daemon/table/dead-nonce-list.hpp b/daemon/table/dead-nonce-list.hpp
index d2ef585..a78065c 100644
--- a/daemon/table/dead-nonce-list.hpp
+++ b/daemon/table/dead-nonce-list.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-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "core/common.hpp"
+#include <ndn-cxx/util/scheduler.hpp>
+
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/sequenced_index.hpp>
@@ -194,14 +196,14 @@
std::multiset<size_t> m_actualMarkCounts;
const time::nanoseconds m_markInterval;
- scheduler::ScopedEventId m_markEvent;
+ ndn::scheduler::ScopedEventId m_markEvent;
// ---- capacity adjustments
static constexpr double CAPACITY_UP = 1.2;
static constexpr double CAPACITY_DOWN = 0.9;
const time::nanoseconds m_adjustCapacityInterval;
- scheduler::ScopedEventId m_adjustCapacityEvent;
+ ndn::scheduler::ScopedEventId m_adjustCapacityEvent;
/// Maximum number of entries to evict at each operation if the index is over capacity
static constexpr size_t EVICT_LIMIT = 64;
diff --git a/daemon/table/measurements-entry.hpp b/daemon/table/measurements-entry.hpp
index 84624a2..09528d4 100644
--- a/daemon/table/measurements-entry.hpp
+++ b/daemon/table/measurements-entry.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "strategy-info-host.hpp"
+#include <ndn-cxx/util/scheduler.hpp>
+
namespace nfd::name_tree {
class Entry;
} // namespace nfd::name_tree
@@ -58,7 +60,7 @@
private:
Name m_name;
time::steady_clock::time_point m_expiry = time::steady_clock::time_point::min();
- scheduler::EventId m_cleanup;
+ ndn::scheduler::EventId m_cleanup;
name_tree::Entry* m_nameTreeEntry = nullptr;
diff --git a/daemon/table/measurements.hpp b/daemon/table/measurements.hpp
index 1bd0eb7..4100fcf 100644
--- a/daemon/table/measurements.hpp
+++ b/daemon/table/measurements.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,6 +29,8 @@
#include "measurements-entry.hpp"
#include "name-tree.hpp"
+#include <functional>
+
namespace nfd {
namespace fib {
diff --git a/daemon/table/name-tree-hashtable.hpp b/daemon/table/name-tree-hashtable.hpp
index 1328c2e..6c1b165 100644
--- a/daemon/table/name-tree-hashtable.hpp
+++ b/daemon/table/name-tree-hashtable.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "name-tree-entry.hpp"
+#include <limits>
+
namespace nfd::name_tree {
class Entry;
diff --git a/daemon/table/name-tree-iterator.hpp b/daemon/table/name-tree-iterator.hpp
index 1b97c92..e4e97ef 100644
--- a/daemon/table/name-tree-iterator.hpp
+++ b/daemon/table/name-tree-iterator.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,6 +31,8 @@
#include <boost/operators.hpp>
#include <boost/range/iterator_range_core.hpp>
+#include <functional>
+
namespace nfd::name_tree {
class NameTree;
diff --git a/daemon/table/network-region-table.hpp b/daemon/table/network-region-table.hpp
index b4ee652..c7445ad 100644
--- a/daemon/table/network-region-table.hpp
+++ b/daemon/table/network-region-table.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "core/common.hpp"
+#include <set>
+
namespace nfd {
/** \brief Stores a collection of producer region names.
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index f612512..82ed272 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,6 +29,8 @@
#include "pit-in-record.hpp"
#include "pit-out-record.hpp"
+#include <ndn-cxx/util/scheduler.hpp>
+
#include <list>
namespace nfd::name_tree {
@@ -223,7 +225,7 @@
*
* This timer is used in forwarding pipelines to delete the entry
*/
- scheduler::EventId expiryTimer;
+ ndn::scheduler::EventId expiryTimer;
/** \brief Indicates whether this PIT entry is satisfied.
*/
diff --git a/daemon/table/strategy-choice.cpp b/daemon/table/strategy-choice.cpp
index c7b7a1a..f3e95d3 100644
--- a/daemon/table/strategy-choice.cpp
+++ b/daemon/table/strategy-choice.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -127,7 +127,7 @@
return os << "Error instantiating strategy: " << res.m_exceptionMessage;
case StrategyChoice::InsertResult::DEPTH_EXCEEDED:
return os << "Prefix has too many components (limit is "
- << to_string(NameTree::getMaxDepth()) << ")";
+ << std::to_string(NameTree::getMaxDepth()) << ")";
}
return os;
}