route: Prevent incomplete removal of NPT entry

refs: #2785

Change-Id: Ic8ff955236784db76c55b94bf9300fb21ea9beae
diff --git a/src/route/name-prefix-table-entry.cpp b/src/route/name-prefix-table-entry.cpp
index 383a00c..a465f95 100644
--- a/src/route/name-prefix-table-entry.cpp
+++ b/src/route/name-prefix-table-entry.cpp
@@ -1,7 +1,8 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  University of Memphis,
- *                     Regents of the University of California
+ * Copyright (c) 2014-2015,  The University of Memphis,
+ *                           Regents of the University of California,
+ *                           Arizona Board of Regents.
  *
  * This file is part of NLSR (Named-data Link State Routing).
  * See AUTHORS.md for complete list of NLSR authors and contributors.
@@ -16,16 +17,11 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- *
- * \author A K M Mahmudul Hoque <ahoque1@memphis.edu>
- *
  **/
-#include <list>
-#include <utility>
+
+#include "name-prefix-table-entry.hpp"
 
 #include "common.hpp"
-#include "name-prefix-table-entry.hpp"
-#include "routing-table-entry.hpp"
 #include "nexthop.hpp"
 #include "logger.hpp"
 
@@ -33,8 +29,6 @@
 
 INIT_LOGGER("NamePrefixTableEntry");
 
-using namespace std;
-
 void
 NamePrefixTableEntry::generateNhlfromRteList()
 {
@@ -105,4 +99,16 @@
   m_nexthopList.writeLog();
 }
 
-}//namespace nlsr
+std::ostream&
+operator<<(std::ostream& os, const NamePrefixTableEntry& entry)
+{
+  os << "Name: " << entry.getNamePrefix() << "\n";
+
+  for (const RoutingTableEntry& rte : entry.getRteList()) {
+    os << "Destination: " << rte.getDestination() << "\n";
+  }
+
+  return os;
+}
+
+} // namespace nlsr