Dispatcher is almost ready. File assembly part is temporarily commented out (need to check if assembly is actually necessary)
diff --git a/ccnx/ccnx-name.cpp b/ccnx/ccnx-name.cpp
index cc34c23..718d5c7 100644
--- a/ccnx/ccnx-name.cpp
+++ b/ccnx/ccnx-name.cpp
@@ -281,7 +281,7 @@
return ret;
}
-Bytes
+const Bytes &
Name::getComp(int index) const
{
if (index >= m_comps.size())
diff --git a/ccnx/ccnx-name.h b/ccnx/ccnx-name.h
index b32c419..2dbd9b5 100644
--- a/ccnx/ccnx-name.h
+++ b/ccnx/ccnx-name.h
@@ -116,8 +116,11 @@
int
size() const {return m_comps.size();}
- Bytes
- getComp(int index) const;
+ const Bytes &
+ getComp (int index) const;
+
+ inline const Bytes &
+ getCompFromBack (int index) const;
// return std::string format of the comp
// if all characters are printable, simply returns the string
@@ -190,6 +193,12 @@
return getPartialName (m_comps.size () - 1 - start, n);
}
+const Bytes &
+Name::getCompFromBack (int index) const
+{
+ return getComp (m_comps.size () - 1 - index);
+}
+
} // Ccnx
#endif