Isis Developer Reference
CubeCachingAlgorithm.h
Go to the documentation of this file.
1 
6 /* SPDX-License-Identifier: CC0-1.0 */
7 
8 #ifndef CubeCachingAlgorithm_h
9 #define CubeCachingAlgorithm_h
10 
11 template <typename T> class QList;
12 
13 namespace Isis {
14  class Buffer;
15  class RawCubeChunk;
16 
32  public:
34  virtual ~CubeCachingAlgorithm();
35 
45  class CacheResult {
46  public:
47  CacheResult();
49  CacheResult(const CacheResult &other);
50  virtual ~CacheResult();
51 
52  bool algorithmUnderstoodData() 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
Isis::CubeCachingAlgorithm::CacheResult::getChunksToFree
QList< RawCubeChunk * > getChunksToFree() const
Definition: CubeCachingAlgorithm.cpp:92
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::CubeCachingAlgorithm::CacheResult::~CacheResult
virtual ~CacheResult()
Free allocated memory.
Definition: CubeCachingAlgorithm.cpp:68
RawCubeChunk.h
Isis::CubeCachingAlgorithm::CacheResult
This stores the results of the caching algorithm.
Definition: CubeCachingAlgorithm.h:45
Isis::CubeCachingAlgorithm::recommendChunksToFree
virtual CacheResult recommendChunksToFree(QList< RawCubeChunk * > allocated, QList< RawCubeChunk * > justUsed, const Buffer &justRequested)=0
Call this to determine which chunks should be freed from memory.
Isis::Buffer
Buffer for reading and writing cube data.
Definition: Buffer.h:53
Isis::CubeCachingAlgorithm::~CubeCachingAlgorithm
virtual ~CubeCachingAlgorithm()
Cleans up after a caching algorithm.
Definition: CubeCachingAlgorithm.cpp:27
Isis::CubeCachingAlgorithm::CubeCachingAlgorithm
CubeCachingAlgorithm()
Construct a caching algorithm.
Definition: CubeCachingAlgorithm.cpp:20
Isis::CubeCachingAlgorithm
This is the parent of the caching algorithms.
Definition: CubeCachingAlgorithm.h:31
CubeCachingAlgorithm.h
Isis::CubeCachingAlgorithm::CacheResult::operator=
CacheResult & operator=(const CacheResult &other)
Assign one cache result to another.
Definition: CubeCachingAlgorithm.cpp:111
Isis::CubeCachingAlgorithm::CacheResult::algorithmUnderstoodData
bool algorithmUnderstoodData() const
If this is true, then the results (be them empty or not) should be considered valid.
Definition: CubeCachingAlgorithm.cpp:83
Isis::CubeCachingAlgorithm::CacheResult::CacheResult
CacheResult()
Construct a cache algorithm result with the idea that the algorithm did not understand/was unable to ...
Definition: CubeCachingAlgorithm.cpp:35
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16