table: refactor NameTree iterator
refs #3687
Change-Id: Icf5be98d79cfaa27597f62832fcd0189df2731d1
diff --git a/daemon/table/name-tree-entry.hpp b/daemon/table/name-tree-entry.hpp
index 4d7ad0c..b0641d0 100644
--- a/daemon/table/name-tree-entry.hpp
+++ b/daemon/table/name-tree-entry.hpp
@@ -33,7 +33,6 @@
#include "table/strategy-choice-entry.hpp"
namespace nfd {
-
namespace name_tree {
class Node;
@@ -128,17 +127,19 @@
size_t m_hash;
Name m_prefix;
shared_ptr<Entry> m_parent; // Pointing to the parent entry.
- std::vector<shared_ptr<Entry> > m_children; // Children pointers.
+ std::vector<shared_ptr<Entry>> m_children; // Children pointers.
unique_ptr<fib::Entry> m_fibEntry;
- std::vector<shared_ptr<pit::Entry> > m_pitEntries;
+ std::vector<shared_ptr<pit::Entry>> m_pitEntries;
unique_ptr<measurements::Entry> m_measurementsEntry;
unique_ptr<strategy_choice::Entry> m_strategyChoiceEntry;
// get the Name Tree Node that is associated with this Name Tree Entry
Node* m_node;
- // Make private members accessible by Name Tree
- friend class nfd::NameTree;
+ friend class NameTree;
+ friend class FullEnumerationImpl;
+ friend class PartialEnumerationImpl;
+ friend class PrefixMatchImpl;
};
inline const Name&
@@ -171,7 +172,7 @@
m_parent = parent;
}
-inline std::vector<shared_ptr<name_tree::Entry> >&
+inline std::vector<shared_ptr<name_tree::Entry>>&
Entry::getChildren()
{
return m_children;