[ndnSIM] Compare PitEntryIncomingFace with Face
fabrizio saponaro
fab.batta at gmail.com
Sun Jan 5 19:26:07 PST 2014
Hi Alex,
I want to compare an object of PitEntryIncomingFace with an object of Face.
To get the incoming face of a entry pit I use
*const pit::Entry::in_container inFace = pitEntry->GetIncoming ();*
and to get a Face of my element of forwarding strategy I use:
*Ptr<L3Protocol> ndn = this->GetObject<L3Protocol> ();*
*Ptr<Face> outFace = ndn->GetFace (0); // 0 for example*
I wanted to compare its. In the PitEntryIncomingFace's code exists this
operator:
* bool operator== (Ptr<Face> face) { return *m_face==*face; }*
so I've thought use it in this way:
if (inFace == outFace) {...} , but I got some errors like:
*‘const in_container {aka const std::set<ns3::ndn::pit::IncomingFace>}’ is
not derived from ‘const ns3::Ptr<T>’*
I know that these errors are due to the use of const by the GetIncoming
method in the EntryPit class, so I created this method:
*Entry::in_container &*
*Entry::GetIncoming2 () *
*{*
* return m_incoming;*
*}*
but I got other similar errors like:
* ‘ns3::ndn::pit::Entry::in_container {aka
std::set<ns3::ndn::pit::IncomingFace>}’ is not derived from ‘const
ns3::Ptr<T>’*
How could I solve it?
Many thanks and best regards,
Fabrizio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20140106/4a5024ce/attachment.html>
More information about the ndnSIM
mailing list