#pragma once #include #include // Forward Declarations class Database; class MMRInfoDB { public: MMRInfoDB(mw::DBWrapper* pDBWrapper, mw::DBBatch* pBatch = nullptr); ~MMRInfoDB(); /// /// Retrieves an MMRInfo by index. /// /// The index of the MMRInfo to retrieve. /// The MMRInfo for the given index. nullptr if not found. std::unique_ptr GetByIndex(const uint32_t index) const; /// /// Retrieves the latest MMRInfo. /// /// The latest MMRInfo. nullptr if none are found. std::unique_ptr GetLatest() const; /// /// Saves by index and also saves the entry as the latest. /// /// The MMR info to save void Save(const MMRInfo& info); private: std::unique_ptr m_pDatabase; };