fw: pull FaceTable construction out of Forwarder class
Refs: #4922, #4973
Change-Id: Ibbd4a8840cb0d01ebbd4cabf9c34fa78a1d23db1
diff --git a/daemon/fw/forwarder.hpp b/daemon/fw/forwarder.hpp
index cc1d048..3b14a61 100644
--- a/daemon/fw/forwarder.hpp
+++ b/daemon/fw/forwarder.hpp
@@ -44,14 +44,15 @@
class Strategy;
} // namespace fw
-/** \brief Main class of NFD forwarding engine.
+/** \brief Main class of NFD's forwarding engine.
*
- * Forwarder owns all faces and tables, and implements the forwarding pipelines.
+ * Forwarder owns all tables and implements the forwarding pipelines.
*/
class Forwarder
{
public:
- Forwarder();
+ explicit
+ Forwarder(FaceTable& faceTable);
VIRTUAL_WITH_TESTS
~Forwarder();
@@ -62,33 +63,6 @@
return m_counters;
}
-public: // faces and policies
- FaceTable&
- getFaceTable()
- {
- return m_faceTable;
- }
-
- /** \brief get existing Face
- *
- * shortcut to .getFaceTable().get(face)
- */
- Face*
- getFace(FaceId id) const
- {
- return m_faceTable.get(id);
- }
-
- /** \brief add new Face
- *
- * shortcut to .getFaceTable().add(face)
- */
- void
- addFace(shared_ptr<Face> face)
- {
- m_faceTable.add(face);
- }
-
fw::UnsolicitedDataPolicy&
getUnsolicitedDataPolicy() const
{
@@ -274,7 +248,7 @@
private:
ForwarderCounters m_counters;
- FaceTable m_faceTable;
+ FaceTable& m_faceTable;
unique_ptr<fw::UnsolicitedDataPolicy> m_unsolicitedDataPolicy;
NameTree m_nameTree;