model: A basic implementation of ndn::ApiFace that can be used as an NDN handler in any "normal" NS-3 application
Refs #1005 (http://redmine.named-data.net/)
diff --git a/model/ndn-name.h b/model/ndn-name.h
index 0694f0b..d69a75e 100644
--- a/model/ndn-name.h
+++ b/model/ndn-name.h
@@ -96,6 +96,13 @@
Add (const T &value);
/**
+ * \brief Append components from another name
+ * @param otherName Name to add at the end
+ */
+ inline Name&
+ Append (const Name &otherName);
+
+ /**
* \brief Generic constructor operator
* The object of type T will be appended to the list of components
*/
@@ -266,6 +273,14 @@
return *this;
}
+inline Name&
+Name::Append (const Name &otherName)
+{
+ std::copy (otherName.begin (), otherName.end (), std::back_inserter (m_prefix));
+ return *this;
+}
+
+
/**
* \brief Equality operator for Name
*/