File indexing completed on 2024-04-06 12:19:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef DT_CACHE_H
0018 #define DT_CACHE_H
0019
0020 #include <vector>
0021
0022 template <class T, class Coll = std::vector<T>>
0023 class DTCache {
0024 public:
0025 typedef T my_type;
0026 typedef Coll my_collection;
0027 typedef typename my_collection::iterator iterator;
0028 typedef typename my_collection::const_iterator const_iterator;
0029
0030 public:
0031
0032 DTCache() {}
0033
0034
0035 virtual ~DTCache() {}
0036
0037
0038 const_iterator begin() const { return _cache.begin(); }
0039
0040
0041 const_iterator end() const { return _cache.end(); }
0042
0043
0044 int size() const { return _cache.size(); }
0045
0046
0047 void clearCache() { _cache.clear(); }
0048
0049
0050 virtual void reconstruct() {}
0051
0052 protected:
0053 my_collection _cache;
0054 };
0055 #endif