34 : m_interest(interest.shared_from_this())
41 BOOST_ASSERT(m_interest->getName().compare(0, nEqualNameComps,
42 interest.getName(), 0, nEqualNameComps) == 0);
44 return m_interest->getName().compare(nEqualNameComps, Name::npos,
45 interest.getName(), nEqualNameComps) == 0 &&
46 m_interest->getSelectors() == interest.getSelectors();
53 return std::find_if(m_inRecords.begin(), m_inRecords.end(),
54 [&face, endpointId] (
const InRecord& inRecord) {
55 return &inRecord.getFace() == &face && inRecord.getEndpointId() == endpointId;
62 BOOST_ASSERT(this->
canMatch(interest));
64 auto it = std::find_if(m_inRecords.begin(), m_inRecords.end(),
65 [&face, endpointId] (
const InRecord& inRecord) {
66 return &inRecord.getFace() == &face && inRecord.getEndpointId() == endpointId;
68 if (it == m_inRecords.end()) {
69 m_inRecords.emplace_front(face, endpointId);
70 it = m_inRecords.begin();
80 auto it = std::find_if(m_inRecords.begin(), m_inRecords.end(),
81 [&face, endpointId] (
const InRecord& inRecord) {
82 return &inRecord.getFace() == &face && inRecord.getEndpointId() == endpointId;
84 if (it != m_inRecords.end()) {
85 m_inRecords.erase(it);
98 return std::find_if(m_outRecords.begin(), m_outRecords.end(),
99 [&face, endpointId] (
const OutRecord& outRecord) {
100 return &outRecord.getFace() == &face && outRecord.getEndpointId() == endpointId;
107 BOOST_ASSERT(this->
canMatch(interest));
109 auto it = std::find_if(m_outRecords.begin(), m_outRecords.end(),
110 [&face, endpointId] (
const OutRecord& outRecord) {
111 return &outRecord.getFace() == &face && outRecord.getEndpointId() == endpointId;
113 if (it == m_outRecords.end()) {
114 m_outRecords.emplace_front(face, endpointId);
115 it = m_outRecords.begin();
118 it->update(interest);
125 auto it = std::find_if(m_outRecords.begin(), m_outRecords.end(),
126 [&face, endpointId] (
const OutRecord& outRecord) {
127 return &outRecord.getFace() == &face && outRecord.getEndpointId() == endpointId;
129 if (it != m_outRecords.end()) {
130 m_outRecords.erase(it);
137 m_inRecords.remove_if([&face] (
const InRecord& inRecord) {
138 return &inRecord.
getFace() == &face;
140 m_outRecords.remove_if([&face] (
const OutRecord& outRecord) {
141 return &outRecord.
getFace() == &face;
InRecordCollection::iterator insertOrUpdateInRecord(Face &face, EndpointId endpointId, const Interest &interest)
insert or update an in-record
Contains information about an Interest toward an outgoing face.
OutRecordCollection::iterator getOutRecord(const Face &face, EndpointId endpointId)
get the out-record for face and endpointId
OutRecordCollection::iterator insertOrUpdateOutRecord(Face &face, EndpointId endpointId, const Interest &interest)
insert or update an out-record
Table::const_iterator iterator
void clearInRecords()
delete all in-records
uint64_t EndpointId
identifies an endpoint on the link
bool canMatch(const Interest &interest, size_t nEqualNameComps=0) const
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Contains information about an Interest from an incoming face.
InRecordCollection::iterator getInRecord(const Face &face, EndpointId endpointId)
get the in-record for face and endpointId
Entry(const Interest &interest)
void deleteOutRecord(const Face &face, EndpointId endpointId)
delete the out-record for face and endpointId if it exists
void deleteInRecord(const Face &face, EndpointId endpointId)
delete the in-record for face and endpointId if it exists
void deleteInOutRecordsByFace(const Face &face)
delete all in-records and out-records for face if it exists