Identifying an object pointer by generating and using a unique ID

I have an image class and a table class. To each image a single table can be “attached”. Each <image, table> pair should be identified with an ID, which can later be used to get the pointer of image or table associated with that ID. Images in this “map” should be unique. Below is my solution, please let me know if it can be improved. Thanks.

browserInfo.h

#include <vector> #include <tuple>  class BrowserInfo { public:     // Returns a unique ID for the <image, table> pair     /*         @param  img The image file pointer         @param  tbl     The table view pointer         @return         A unique ID for the input pair     */     unsigned getId(image *img, table *tbl) const;      /// Returns a image pointer for the given ID     /*         @param  uId The ID of <image, table> pair         @return     A pointer to image file if ID exists, otherwise nullptr     */     image *getImage(unsigned uId) const;      /// Returns a table pointer for the given ID     /*         @param  uId The ID of <image, table> pair         @return     A pointer to table if ID exists, otherwise nullptr     */     table *getTable(unsigned uId) const;  private:     // alias for the type     using imageTableToId = std::tuple<image *, table *, unsigned>;      // This vector keeps track of all unique <image, table> pair IDs     mutable std::vector<imageTableToId> m_vecImageTableIds;      // The current ID     mutable unsigned m_iCurrentId = 0;  }; // class BrowserInfo 

browserInfo.cpp

unsigned BrowserInfo::getId(image *img, table *tbl) const {     // first, try to see if we have worked with the provided image before     for (auto &tuple : m_vecImageTableIds)     {         if (std::get<0>(tuple) == img)         {             // we support a single table view for each image.             // therefore, if we find that the image is already stored             // in our vector, we just need to update the corresponding             // table pointer and return a new unique ID for this pair             std::get<1>(tuple) = tbl;             std::get<2>(tuple) = ++m_iCurrentId;              return m_iCurrentId;         }     }      // if we got here it means the image pointer wasn't stored before     // so we can just insert a new tuple into the vector     m_vecImageTableIds.push_back(std::make_tuple(img, tbl, ++m_iCurrentId));     return m_iCurrentId; }  image *BrowserInfo::getImage(const unsigned uId) const {     for (const auto &tuple : m_vecImageTableIds)     {         if (std::get<2>(tuple) == uId)             return std::get<0>(tuple);     }      return nullptr; }  table *BrowserInfo::getTable(const unsigned uId) const {     for (const auto &tuple : m_vecImageTableIds)     {         if (std::get<2>(tuple) == uId)             return std::get<1>(tuple);     }      return nullptr; }