model: Small extension of Name class
Now name can be also constructed from a list of strings (previously, there
were a constructor version accepting list of references to strings).
diff --git a/model/ndn-name.cc b/model/ndn-name.cc
index a1624fb..1a3da80 100644
--- a/model/ndn-name.cc
+++ b/model/ndn-name.cc
@@ -46,6 +46,14 @@
}
}
+Name::Name (const std::list<std::string> &components)
+{
+ BOOST_FOREACH (const std::string &component, components)
+ {
+ Add (component);
+ }
+}
+
Name::Name (const std::string &prefix)
{
istringstream is (prefix);