Name: Added Component toNumber and toNumberWithMarker.
diff --git a/ndn-cpp/c/name.c b/ndn-cpp/c/name.c
index a81fbb3..d6864e9 100644
--- a/ndn-cpp/c/name.c
+++ b/ndn-cpp/c/name.c
@@ -7,6 +7,34 @@
 #include "util/ndn_memory.h"
 #include "name.h"
 
+uint64_t ndn_NameComponent_toNumber(struct ndn_NameComponent *self)
+{
+  uint64_t result = 0;
+  size_t i;
+  for (i = 0; i < self->value.length; ++i) {
+    result *= 256;
+    result += (uint64_t)self->value.value[i];
+  }
+  
+  return result;
+}
+
+ndn_Error ndn_NameComponent_toNumberWithMarker(struct ndn_NameComponent *self, uint8_t marker, uint64_t *result)
+{
+  if (self->value.length == 0 || self->value.value[0] != marker)
+    return NDN_ERROR_Name_component_does_not_begin_with_the_expected_marker;
+  
+  uint64_t localResult = 0;
+  size_t i;
+  for (i = 1; i < self->value.length; ++i) {
+    localResult *= 256;
+    localResult += (uint64_t)self->value.value[i];
+  }
+  
+  *result = localResult;
+  return NDN_ERROR_success;
+}
+
 int ndn_Name_match(struct ndn_Name *self, struct ndn_Name *name)
 {
 	// This name is longer than the name we are checking it against.
diff --git a/ndn-cpp/c/name.h b/ndn-cpp/c/name.h
index 544e3ca..12b024b 100644
--- a/ndn-cpp/c/name.h
+++ b/ndn-cpp/c/name.h
@@ -7,6 +7,7 @@
 #ifndef NDN_NAME_H
 #define NDN_NAME_H
 
+#include "errors.h"
 #include "util/blob.h"
 
 #ifdef __cplusplus
@@ -30,7 +31,32 @@
 {
   ndn_Blob_initialize(&self->value, value, valueLength);
 }
-  
+
+/**
+/**
+ * Interpret the name component as a network-ordered number and return an integer.
+ * @param self A pointer to the ndn_NameComponent struct.
+ * @return The integer number.
+ */
+uint64_t ndn_NameComponent_toNumber(struct ndn_NameComponent *self);
+
+/**
+ * Convert binary blob name component (network-ordered number) to number, using appropriate marker from the naming convention
+ * @param comp name component to be converted
+ * @param marker required marker from the naming convention
+ *
+ * If the required marker does not exist, an exception will be thrown
+ */  
+
+/**
+ * Interpret the name component as a network-ordered number with a marker and return an integer.
+ * @param self A pointer to the ndn_NameComponent struct.
+ * @param marker The required first byte of the component.
+ * @param result Return the integer number.
+ * @return 0 for success, or an error code if the first byte of the component does not equal the marker.
+ */
+ndn_Error ndn_NameComponent_toNumberWithMarker(struct ndn_NameComponent *self, uint8_t marker, uint64_t *result);
+
 /**
  * An ndn_Name holds an array of ndn_NameComponent.
  */
diff --git a/ndn-cpp/name.cpp b/ndn-cpp/name.cpp
index d8174e6..d74142e 100644
--- a/ndn-cpp/name.cpp
+++ b/ndn-cpp/name.cpp
@@ -109,6 +109,19 @@
   return result.str();
 }
 
+uint64_t Name::Component::toNumberWithMarker(uint8_t marker) const
+{
+  struct ndn_NameComponent componentStruct;
+  get(componentStruct);
+  uint64_t result;
+  
+  ndn_Error error;
+  if ((error = ndn_NameComponent_toNumberWithMarker(&componentStruct, marker, &result)))
+    throw std::runtime_error(ndn_getErrorString(error));
+    
+  return result;
+}
+
 Blob 
 Name::Component::makeFromEscapedString(const char *escapedString, size_t beginOffset, size_t endOffset)
 {
diff --git a/ndn-cpp/name.hpp b/ndn-cpp/name.hpp
index d589c89..70defd1 100644
--- a/ndn-cpp/name.hpp
+++ b/ndn-cpp/name.hpp
@@ -97,6 +97,15 @@
       return Name::toEscapedString(*value_);
     }
     
+    uint64_t toNumber() const
+    {
+      struct ndn_NameComponent componentStruct;
+      get(componentStruct);
+      return ndn_NameComponent_toNumber(&componentStruct);
+    }
+
+    uint64_t toNumberWithMarker(uint8_t marker) const;
+    
     /**
      * Make a component value by decoding the escapedString between beginOffset and endOffset according to the NDN URI Scheme.
      * If the escaped string is "", "." or ".." then return a Blob with a null pointer, which means this component value was not changed, and