X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp-api%2Fvom%2Fsingular_db.hpp;h=afca9a3509e99844cbb9545baf8479f2c9e7b0dc;hb=756cd9441752fc8f84104c9ee19099506ba89f85;hp=bc49c88551fba2de07ce5ad1441d74968fac5edd;hpb=9ef1c0adbf9399c55deeede3cf629dd4e8c20304;p=vpp.git diff --git a/src/vpp-api/vom/singular_db.hpp b/src/vpp-api/vom/singular_db.hpp index bc49c88551f..afca9a3509e 100644 --- a/src/vpp-api/vom/singular_db.hpp +++ b/src/vpp-api/vom/singular_db.hpp @@ -16,6 +16,7 @@ #ifndef __VOM_INST_DB_H__ #define __VOM_INST_DB_H__ +#include #include #include @@ -46,12 +47,12 @@ public: /** * Get iterator to the beginning of the DB */ - const_iterator cbegin() { return m_map.cbegin(); } + const_iterator begin() const { return m_map.cbegin(); } /** * Get iterator to the beginning of the DB */ - const_iterator cend() { return m_map.cend(); } + const_iterator end() const { return m_map.cend(); } /** * Find or add the object to the store. @@ -118,17 +119,6 @@ public: */ void add(const KEY& key, std::shared_ptr sp) { m_map[key] = sp; } - /** - * Print each of the object in the DB into the stream provided - */ - void dump(std::ostream& os) - { - for (auto entry : m_map) { - os << "key: " << entry.first << std::endl; - os << " " << entry.second.lock()->to_string() << std::endl; - } - } - /** * Populate VPP from current state, on VPP restart */ @@ -143,7 +133,7 @@ private: /** * the map of objects against their key */ - std::map> m_map; + std::map> m_map; }; };