USGS

Isis 3.0 Object Programmers' Reference

Home

CubeCachingAlgorithm.h

Go to the documentation of this file.
00001 
00024 #ifndef CubeCachingAlgorithm_h
00025 #define CubeCachingAlgorithm_h
00026 
00027 template <typename T> class QList;
00028 
00029 namespace Isis {
00030   class Buffer;
00031   class RawCubeChunk;
00032 
00047   class CubeCachingAlgorithm {
00048     public:
00049       CubeCachingAlgorithm();
00050       virtual ~CubeCachingAlgorithm();
00051 
00061       class CacheResult {
00062         public:
00063           CacheResult();
00064           CacheResult(QList<RawCubeChunk *>);
00065           CacheResult(const CacheResult &other);
00066           virtual ~CacheResult();
00067 
00068           bool algorithmUnderstoodData() const;
00069           QList<RawCubeChunk *> getChunksToFree() const;
00070 
00071           CacheResult &operator=(const CacheResult &other);
00072 
00073         private:
00078           QList<RawCubeChunk *> *m_chunksToFree;
00079       };
00080 
00092       virtual CacheResult recommendChunksToFree(
00093           QList<RawCubeChunk *> allocated, QList<RawCubeChunk *> justUsed,
00094           const Buffer &justRequested) = 0;
00095   };
00096 }
00097 
00098 #endif