CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTCache.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
17 //
18 //--------------------------------------------------
19 #ifndef DT_CACHE_H
20 #define DT_CACHE_H
21 
22 #include <vector>
23 
24 template<class T, class Coll=std::vector<T> > class DTCache {
25 
26  public:
27 
28  typedef T my_type;
29  typedef Coll my_collection;
30  typedef typename my_collection::iterator iterator;
31  typedef typename my_collection::const_iterator const_iterator;
32 
33  public:
34 
36  DTCache(){}
37 
39  virtual ~DTCache(){}
40 
42  const_iterator begin() const { return _cache.begin();}
43 
45  const_iterator end() const {return _cache.end();}
46 
48  int size() const {return _cache.size();}
49 
51  void clearCache() {_cache.clear();}
52 
54  virtual void reconstruct() {}
55 
56  protected:
57 
59 
60 };
61 #endif
virtual ~DTCache()
Destructor.
Definition: DTCache.h:39
my_collection::iterator iterator
Definition: DTCache.h:30
my_collection _cache
Definition: DTCache.h:58
Coll my_collection
Definition: DTCache.h:29
my_collection::const_iterator const_iterator
Definition: DTCache.h:31
DTCache()
Constructor.
Definition: DTCache.h:36
T my_type
Definition: DTCache.h:28
const_iterator begin() const
Get first cache element.
Definition: DTCache.h:42
virtual void reconstruct()
Virtual reconstruct member.
Definition: DTCache.h:54
long double T
const_iterator end() const
Get last cache element.
Definition: DTCache.h:45
void clearCache()
Clear cache vector.
Definition: DTCache.h:51
int size() const
Get cache vector&#39;s size.
Definition: DTCache.h:48