table: simplify PIT with C++11 features
refs #2100
Change-Id: I1159761d9439f0a2ff9f6463f89f39372a696e48
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index 5a691de..8fcf4a7 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -130,7 +130,7 @@
* \return an iterator to the InRecord, or .end if it does not exist
*/
InRecordCollection::const_iterator
- getInRecord(shared_ptr<Face> face) const;
+ getInRecord(const Face& face) const;
/// deletes all InRecords
void
@@ -152,11 +152,11 @@
* \return an iterator to the OutRecord, or .end if it does not exist
*/
OutRecordCollection::const_iterator
- getOutRecord(shared_ptr<Face> face) const;
+ getOutRecord(const Face& face) const;
/// deletes one OutRecord for face if exists
void
- deleteOutRecord(shared_ptr<Face> face);
+ deleteOutRecord(const Face& face);
/** \return true if there is one or more unexpired OutRecords
*/
@@ -187,6 +187,18 @@
return *m_interest;
}
+inline const InRecordCollection&
+Entry::getInRecords() const
+{
+ return m_inRecords;
+}
+
+inline const OutRecordCollection&
+Entry::getOutRecords() const
+{
+ return m_outRecords;
+}
+
} // namespace pit
} // namespace nfd