Isis 3 Developer Reference
CubeCachingAlgorithm.h
Go to the documentation of this file.
1 
24 #ifndef CubeCachingAlgorithm_h
25 #define CubeCachingAlgorithm_h
26 
27 template <typename T> class QList;
28 
29 namespace Isis {
30  class Buffer;
31  class RawCubeChunk;
32 
48  public:
50  virtual ~CubeCachingAlgorithm();
51 
61  class CacheResult {
62  public:
63  CacheResult();
65  CacheResult(const CacheResult &other);
66  virtual ~CacheResult();
67 
68  bool algorithmUnderstoodData() const;
70 
71  CacheResult &operator=(const CacheResult &other);
72 
73  private:
78  QList<RawCubeChunk *> *m_chunksToFree;
79  };
80 
93  QList<RawCubeChunk *> allocated, QList<RawCubeChunk *> justUsed,
94  const Buffer &justRequested) = 0;
95  };
96 }
97 
98 #endif
Buffer for reading and writing cube data.
Definition: Buffer.h:69
virtual ~CubeCachingAlgorithm()
Cleans up after a caching algorithm.
Definition: CubeCachingAlgorithm.cpp:40
virtual ~CacheResult()
Free allocated memory.
Definition: CubeCachingAlgorithm.cpp:81
virtual CacheResult recommendChunksToFree(QList< RawCubeChunk *> allocated, QList< RawCubeChunk *> justUsed, const Buffer &justRequested)=0
Call this to determine which chunks should be freed from memory.
QList< RawCubeChunk * > getChunksToFree() const
Definition: CubeCachingAlgorithm.cpp:105
CubeCachingAlgorithm()
Construct a caching algorithm.
Definition: CubeCachingAlgorithm.cpp:33
CacheResult & operator=(const CacheResult &other)
Assign one cache result to another.
Definition: CubeCachingAlgorithm.cpp:124
This stores the results of the caching algorithm.
Definition: CubeCachingAlgorithm.h:61
Definition: BoxcarCachingAlgorithm.h:29
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
bool algorithmUnderstoodData() const
If this is true, then the results (be them empty or not) should be considered valid.
Definition: CubeCachingAlgorithm.cpp:96
This is the parent of the caching algorithms
Definition: CubeCachingAlgorithm.h:47
CacheResult()
Construct a cache algorithm result with the idea that the algorithm did not understand/was unable to ...
Definition: CubeCachingAlgorithm.cpp:48