diff --git a/model/sync-ccnx-name-info.cc b/model/sync-ccnx-name-info.cc index 2f97b12..bbcf465 100644 --- a/model/sync-ccnx-name-info.cc +++ b/model/sync-ccnx-name-info.cc @@ -48,6 +48,7 @@ CcnxNameInfo::CcnxNameInfo (Ptr name) : m_name (name) { m_id = m_ids ++; // set ID for a newly inserted element + m_digest << *name; } string diff --git a/model/sync-name-info.h b/model/sync-name-info.h index c332e4d..7a1467a 100644 --- a/model/sync-name-info.h +++ b/model/sync-name-info.h @@ -54,8 +54,8 @@ public: /** * @brief Calculates digest of the name */ - // Digest - // getDigest () const; + const Digest & + getDigest () const { return m_digest; } /** * @brief Convert prefix to string @@ -67,6 +67,7 @@ public: protected: // actual stuff size_t m_id; ///< @brief Identifies NameInfo throughout the library (for hash container, doesn't need to be strictly unique) + Digest m_digest; // static stuff typedef std::map NameMap;