/////////////////////////// Cache.hpp //////////////////////////////// #include #include #ifndef CACHE_HPP #define CACHE_HPP using namespace std; template class Cache { private: map iDictionary; public: Cache(char* aFilename); ~Cache(); protected: T* page; ifstream inputStream; }; template Cache::Cache(char* aFilename) { inputStream.open(aFilename, ios::binary); } template Cache::~Cache() { inputStream.close(); map::const_iterator itr; for(itr = iDictionary.begin(); itr != iDictionary.end(); ++itr) delete[] itr->second; } #endif /////////////////////////// CacheReach.hpp //////////////////////////////// #include "Cache.hpp" #ifndef CACHEREACH_HPP #define CACHEREACH_HPP class CacheReach : public Cache { public: CacheReach(char* aFilename): Cache(aFilename) {} }; #endif