Adding sequence number tracer
diff --git a/model/ccnx-name-components.cc b/model/ccnx-name-components.cc
index fd0064f..77ac75c 100644
--- a/model/ccnx-name-components.cc
+++ b/model/ccnx-name-components.cc
@@ -55,6 +55,17 @@
return m_prefix;
}
+std::string
+CcnxNameComponents::GetLastComponent () const
+{
+ if (m_prefix.size () == 0)
+ {
+ return "";
+ }
+
+ return m_prefix.back ();
+}
+
std::list<boost::reference_wrapper<const std::string> >
CcnxNameComponents::GetSubComponents (size_t num) const
{
diff --git a/model/ccnx-name-components.h b/model/ccnx-name-components.h
index fdffe91..58ca927 100644
--- a/model/ccnx-name-components.h
+++ b/model/ccnx-name-components.h
@@ -55,6 +55,9 @@
const std::list<std::string> &
GetComponents () const;
+ std::string
+ GetLastComponent () const;
+
/**
* \brief Get subcomponents of the name, starting with first component
* \param num Number of components to return. Valid value is in range [1, GetComponents ().size ()]