Isis 3 Programmer Reference
CubeCachingAlgorithm.cpp
Go to the documentation of this file.
1 
21 #include "CubeCachingAlgorithm.h"
22 
23 #include <cstring>
24 
25 #include <QList>
26 
27 #include "RawCubeChunk.h"
28 
29 namespace Isis {
34  }
35 
36 
41  }
42 
43 
49  m_chunksToFree = NULL;
50  }
51 
52 
60  m_chunksToFree = NULL;
61  m_chunksToFree = new QList<RawCubeChunk *>(free);
62  }
63 
64 
71  m_chunksToFree = NULL;
72 
73  if(other.m_chunksToFree)
74  m_chunksToFree = new QList<RawCubeChunk *>(*other.m_chunksToFree);
75  }
76 
77 
82  if(m_chunksToFree) {
83  delete m_chunksToFree;
84  m_chunksToFree = NULL;
85  }
86  }
87 
88 
97  return (m_chunksToFree != NULL);
98  }
99 
100 
106  const {
107  QList<RawCubeChunk *> recommended;
108 
109  if(m_chunksToFree != NULL)
110  recommended = *m_chunksToFree;
111 
112  return recommended;
113  }
114 
115 
125  delete m_chunksToFree;
126  m_chunksToFree = NULL;
127 
128  if(other.m_chunksToFree) {
129  m_chunksToFree = new QList<RawCubeChunk *>;
130  *m_chunksToFree = *other.m_chunksToFree;
131  }
132 
133  return *this;
134  }
135 }
136 
QList< RawCubeChunk * > * m_chunksToFree
If NULL, the algorithm did not succeed.
virtual ~CubeCachingAlgorithm()
Cleans up after a caching algorithm.
virtual ~CacheResult()
Free allocated memory.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
QList< RawCubeChunk * > getChunksToFree() const
CubeCachingAlgorithm()
Construct a caching algorithm.
CacheResult & operator=(const CacheResult &other)
Assign one cache result to another.
This stores the results of the caching algorithm.
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.
CacheResult()
Construct a cache algorithm result with the idea that the algorithm did not understand/was unable to ...