Isis 3 Programmer Reference
CubeCachingAlgorithm.h
1
6/* SPDX-License-Identifier: CC0-1.0 */
7
8#ifndef CubeCachingAlgorithm_h
9#define CubeCachingAlgorithm_h
10
11template <typename T> class QList;
12
13namespace Isis {
14 class Buffer;
15 class RawCubeChunk;
16
32 public:
34 virtual ~CubeCachingAlgorithm();
35
46 public:
48 CacheResult(QList<RawCubeChunk *>);
49 CacheResult(const CacheResult &other);
50 virtual ~CacheResult();
51
52 bool algorithmUnderstoodData() const;
53 QList<RawCubeChunk *> getChunksToFree() const;
54
55 CacheResult &operator=(const CacheResult &other);
56
57 private:
62 QList<RawCubeChunk *> *m_chunksToFree;
63 };
64
77 QList<RawCubeChunk *> allocated, QList<RawCubeChunk *> justUsed,
78 const Buffer &justRequested) = 0;
79 };
80}
81
82#endif
Buffer for reading and writing cube data.
Definition Buffer.h:53
This stores the results of the caching algorithm.
CacheResult & operator=(const CacheResult &other)
Assign one cache result to another.
QList< RawCubeChunk * > getChunksToFree() const
CacheResult()
Construct a cache algorithm result with the idea that the algorithm did not understand/was unable to ...
bool algorithmUnderstoodData() const
If this is true, then the results (be them empty or not) should be considered valid.
virtual ~CacheResult()
Free allocated memory.
QList< RawCubeChunk * > * m_chunksToFree
If NULL, the algorithm did not succeed.
This is the parent of the caching algorithms.
virtual CacheResult recommendChunksToFree(QList< RawCubeChunk * > allocated, QList< RawCubeChunk * > justUsed, const Buffer &justRequested)=0
Call this to determine which chunks should be freed from memory.
CubeCachingAlgorithm()
Construct a caching algorithm.
virtual ~CubeCachingAlgorithm()
Cleans up after a caching algorithm.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16