table: simplify pit::Entry API
refs #3546 Change-Id: I6a9cb83b9e56ce1d1bb6047049378c51781605af
This commit is contained in:
1 parent
39a79be5ae
commit
4846f37117
15 files changed
+291
-176
No files matched your search
+12
-18
@@ -34,10 +34,11 @@ Entry::Entry(const Interest& interest)
|
||||
{
|
||||
}
|
||||
|
||||
const Name&
|
||||
Entry::getName() const
|
||||
InRecordCollection::iterator
|
||||
Entry::getInRecord(const Face& face)
|
||||
{
|
||||
return m_interest->getName();
|
||||
return std::find_if(m_inRecords.begin(), m_inRecords.end(),
|
||||
[&face] (const InRecord& inRecord) { return inRecord.getFace().get() == &face; });
|
||||
}
|
||||
|
||||
InRecordCollection::iterator
|
||||
@@ -54,13 +55,6 @@ Entry::insertOrUpdateInRecord(shared_ptr<Face> face, const Interest& interest)
|
||||
return it;
|
||||
}
|
||||
|
||||
InRecordCollection::const_iterator
|
||||
Entry::getInRecord(const Face& face) const
|
||||
{
|
||||
return std::find_if(m_inRecords.begin(), m_inRecords.end(),
|
||||
[&face] (const InRecord& inRecord) { return inRecord.getFace().get() == &face; });
|
||||
}
|
||||
|
||||
void
|
||||
Entry::deleteInRecord(const Face& face)
|
||||
{
|
||||
@@ -72,11 +66,18 @@ Entry::deleteInRecord(const Face& face)
|
||||
}
|
||||
|
||||
void
|
||||
Entry::deleteInRecords()
|
||||
Entry::clearInRecords()
|
||||
{
|
||||
m_inRecords.clear();
|
||||
}
|
||||
|
||||
OutRecordCollection::iterator
|
||||
Entry::getOutRecord(const Face& face)
|
||||
{
|
||||
return std::find_if(m_outRecords.begin(), m_outRecords.end(),
|
||||
[&face] (const OutRecord& outRecord) { return outRecord.getFace().get() == &face; });
|
||||
}
|
||||
|
||||
OutRecordCollection::iterator
|
||||
Entry::insertOrUpdateOutRecord(shared_ptr<Face> face, const Interest& interest)
|
||||
{
|
||||
@@ -91,13 +92,6 @@ Entry::insertOrUpdateOutRecord(shared_ptr<Face> face, const Interest& interest)
|
||||
return it;
|
||||
}
|
||||
|
||||
OutRecordCollection::iterator
|
||||
Entry::getOutRecord(const Face& face)
|
||||
{
|
||||
return std::find_if(m_outRecords.begin(), m_outRecords.end(),
|
||||
[&face] (const OutRecord& outRecord) { return outRecord.getFace().get() == &face; });
|
||||
}
|
||||
|
||||
void
|
||||
Entry::deleteOutRecord(const Face& face)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user