File indexing completed on 2025-08-05 08:16:06
0001 #include "CdbUrlSavev1.h"
0002
0003 #include <phool/phool.h>
0004
0005 #include <iostream>
0006
0007 class PHObject;
0008
0009 PHObject *
0010 CdbUrlSavev1::CloneMe() const
0011 {
0012 std::cout << "CdbUrlSavev1::CloneMe() is not implemented in daugther class" << std::endl;
0013 return nullptr;
0014 }
0015
0016 void CdbUrlSavev1::Reset()
0017 {
0018 std::cout << PHWHERE << "ERROR Reset() not implemented by daughter class" << std::endl;
0019 return;
0020 }
0021
0022 void CdbUrlSavev1::identify(std::ostream &os) const
0023 {
0024 os << "identify yourself: CdbUrlSavev1 Object" << std::endl;
0025 for (const auto &iter : m_CdbUrlVector)
0026 {
0027 os << "domain: " << std::get<0>(iter)
0028 << ", url: " << std::get<1>(iter)
0029 << ", timestamp: " << std::get<2>(iter) << std::endl;
0030 }
0031 return;
0032 }
0033
0034 int CdbUrlSavev1::isValid() const
0035 {
0036 if (!m_CdbUrlVector.empty())
0037 {
0038 return 1;
0039 }
0040 return 0;
0041 }
0042
0043 std::vector<std::tuple<std::string, std::string, uint64_t>>::const_iterator CdbUrlSavev1::begin() const
0044 {
0045 return m_CdbUrlVector.begin();
0046 }
0047
0048 std::vector<std::tuple<std::string, std::string, uint64_t>>::const_iterator CdbUrlSavev1::end() const
0049 {
0050 return m_CdbUrlVector.end();
0051 }
0052
0053 void CdbUrlSavev1::AddUrl(const std::string &domain, const std::string &url, const uint64_t timestamp)
0054 {
0055 m_CdbUrlVector.emplace_back(domain, url, timestamp);
0056 }
0057
0058 void CdbUrlSavev1::AddUrl(const std::tuple<std::string, std::string, uint64_t> &tup)
0059 {
0060 m_CdbUrlVector.push_back(tup);
0061 }