model: Another major change: switching to NDN.cxx API for ndn::Name
NDN.cxx code is almost exactly the same, with minor NS-3 specific customizations
Refs #1011 (http://redmine.named-data.net/issues/1011)
diff --git a/model/wire/ccnb/wire-ccnb.cc b/model/wire/ccnb/wire-ccnb.cc
index 9033d3f..e3a9ef1 100644
--- a/model/wire/ccnb/wire-ccnb.cc
+++ b/model/wire/ccnb/wire-ccnb.cc
@@ -191,10 +191,10 @@
Ccnb::SerializeName (Buffer::Iterator &start, const Name &name)
{
size_t written = 0;
- BOOST_FOREACH (const std::string &component, name.GetComponents())
+ BOOST_FOREACH (const name::Component &component, name)
{
written += AppendTaggedBlob (start, CcnbParser::CCN_DTAG_Component,
- reinterpret_cast<const uint8_t*>(component.c_str()), component.size());
+ reinterpret_cast<const uint8_t*>(component.buf ()), component.size());
}
return written;
}
@@ -203,9 +203,9 @@
Ccnb::SerializedSizeName (const Name &name)
{
size_t written = 0;
- BOOST_FOREACH (const std::string &component, name.GetComponents())
+ BOOST_FOREACH (const name::Component &component, name)
{
- written += EstimateTaggedBlob (CcnbParser::CCN_DTAG_Component, component.size());
+ written += EstimateTaggedBlob (CcnbParser::CCN_DTAG_Component, component.size ());
}
return written;
}