File indexing completed on 2025-08-06 08:18:08
0001 #ifndef TRACKBASE_CMFLASHDIFFERENCECONTAINER_H
0002 #define TRACKBASE_CMFLASHDIFFERENCECONTAINER_H
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <phool/PHObject.h>
0012
0013 #include <iostream> // for cout, ostream
0014 #include <map>
0015 #include <utility> // for pair
0016
0017 class CMFlashDifference;
0018
0019
0020
0021
0022 class CMFlashDifferenceContainer : public PHObject
0023 {
0024 public:
0025
0026
0027 using Map = std::map<unsigned int, CMFlashDifference*>;
0028 using Iterator = Map::iterator;
0029 using ConstIterator = Map::const_iterator;
0030 using Range = std::pair<Iterator, Iterator>;
0031 using ConstRange = std::pair<ConstIterator, ConstIterator>;
0032
0033
0034
0035 void Reset() override {}
0036
0037
0038 void identify(std::ostream& = std::cout) const override {}
0039
0040
0041 virtual void addDifferenceSpecifyKey(const unsigned int, CMFlashDifference*) = 0;
0042
0043
0044 virtual void removeDifference(unsigned int) {}
0045
0046
0047 virtual ConstRange getDifferences() const = 0;
0048
0049
0050 virtual CMFlashDifference* findDifference(unsigned int) const { return nullptr; }
0051
0052
0053 virtual unsigned int size() const { return 0; }
0054
0055 protected:
0056
0057 CMFlashDifferenceContainer() = default;
0058
0059 private:
0060 ClassDefOverride(CMFlashDifferenceContainer, 1)
0061 };
0062
0063 #endif