v6502cpp/TransCache.h

48 lines
766 B
C
Raw Normal View History

2013-12-15 19:00:43 +00:00
/*
* File: TransCache.h
* Author: Christopher
*
* Created on December 15, 2013, 1:39 PM
*/
#ifndef TRANSCACHE_H
#define TRANSCACHE_H
#include <set>
#include <memory>
class Trans;
class Segment;
class TransCache final {
public:
TransCache() {
}
void add(Segment* c1, Segment* gate, Segment* c2);
2013-12-17 02:51:12 +00:00
typedef std::set<std::shared_ptr<Trans>> Set;
Set::const_iterator begin() const {
return this->cache.begin();
}
Set::const_iterator end() const {
return this->cache.end();
}
Set::size_type size() const {
return this->cache.size();
}
2013-12-15 19:00:43 +00:00
private:
TransCache(const TransCache&) = delete;
TransCache& operator=(const TransCache&) = delete;
2013-12-17 02:51:12 +00:00
Set cache;
2013-12-15 19:00:43 +00:00
};
#endif /* TRANSCACHE_H */