Isis 3 Developer Reference
CubeDataThreadTester.h
Go to the documentation of this file.
1 #ifndef CubeDataThreadTester_h
2 #define CubeDataThreadTester_h
3 
4 #include <QThread>
5 
6 template<typename T> class QList;
7 template<typename A, typename B> struct QPair;
8 
9 namespace Isis {
10  class Brick;
11  class CubeDataThread;
12 
19  class CubeDataThreadTester : public QThread {
20  Q_OBJECT
21 
22  public:
24  virtual ~CubeDataThreadTester();
25 
28  return p_numTestsDone;
29  }
30 
33  return p_cubeDataThread;
34  }
35 
36  void Connect();
37  void ReadCubeTest(int);
38  void ReadCubeTest2(int, int);
39  void ReadCubeTest3(int);
40  void WriteCubeTest(int);
41  void WriteCubeTest2(int, int);
42  void WriteCubeTest3(int);
44  void NotifyChangeTest(int);
45 
46  public slots:
47  void ReadBrick(void *requester, int cubeId, const Isis::Brick *data);
48  void ReadWriteBrick(void *requester, int cubeId, Isis::Brick *data);
49  void BrickChanged(int cubeId, const Isis::Brick *data);
50 
51  signals:
63  void RequestReadCube(int cubeId, int startSample, int startLine,
64  int endSample, int endLine, int band, void *caller);
65 
66 
78  void RequestReadWriteCube(int cubeId, int startSample, int startLine,
79  int endSample, int endLine, int band, void *caller);
80 
81 
86  void NotifyDoneWithData(int, const Isis::Brick *);
87 
88  private:
90  void run();
91 
93  int p_numTestsDone;
94 
96  CubeDataThread *p_cubeDataThread;
97 
99  bool p_execStarted;
100 
102  bool p_notifyDone;
103 
105  QVector< QPair<int, const Isis::Brick *> > * p_cachedDoneBricks;
106  };
107 
108 };
109 
110 
111 #endif
void WriteCubeTest3BreakDeadlock()
This test breaks the deadlock caused by the third write test.
Definition: CubeDataThreadTester.cpp:180
void ReadBrick(void *requester, int cubeId, const Isis::Brick *data)
This is called when a brick is read.
Definition: CubeDataThreadTester.cpp:222
void RequestReadCube(int cubeId, int startSample, int startLine, int endSample, int endLine, int band, void *caller)
Ask for a brick for reading.
Buffer for containing a three dimensional section of an image.
Definition: Brick.h:61
int NumberOfTestsDone()
Returns the number of tests done (testing methods count as several)
Definition: CubeDataThreadTester.h:27
Definition: CubeDataThreadTester.h:19
void ReadCubeTest(int)
This tests a basic read.
Definition: CubeDataThreadTester.cpp:93
CubeDataThreadTester(CubeDataThread *)
This initializes a CubeDataThreadTester.
Definition: CubeDataThreadTester.cpp:27
void NotifyChangeTest(int)
This test tests this automatic change notifications.
Definition: CubeDataThreadTester.cpp:200
void BrickChanged(int cubeId, const Isis::Brick *data)
This is called when a brick is written.
Definition: CubeDataThreadTester.cpp:354
void ReadWriteBrick(void *requester, int cubeId, Isis::Brick *data)
This is called when a brick is given for R/W.
Definition: CubeDataThreadTester.cpp:277
void WriteCubeTest2(int, int)
This tests two non-conflicting writes.
Definition: CubeDataThreadTester.cpp:148
CubeDataThread * DataThread()
Returns the cube data thread being tested.
Definition: CubeDataThreadTester.h:32
void RequestReadWriteCube(int cubeId, int startSample, int startLine, int endSample, int endLine, int band, void *caller)
Ask for a brick for reading and writing.
void ReadCubeTest3(int)
This tests an overlapping read.
Definition: CubeDataThreadTester.cpp:120
void WriteCubeTest3(int)
This tests two conflicting* writes.
Definition: CubeDataThreadTester.cpp:166
Encapsulation of Cube I/O with Change Notifications.
Definition: CubeDataThread.h:53
void ReadCubeTest2(int, int)
This tests two basic reads with no conflicts.
Definition: CubeDataThreadTester.cpp:105
void Connect()
This connects this class&#39; signals and slots with CubeDataThread&#39;s signals and slots.
Definition: CubeDataThreadTester.cpp:46
void NotifyDoneWithData(int, const Isis::Brick *)
Let the cube data thread know we&#39;re no longer working with a particular brick.
Definition: Calculator.h:33
virtual ~CubeDataThreadTester()
This cleans up the cube data thread.
Definition: CubeDataThreadTester.cpp:72
Definition: BoxcarCachingAlgorithm.h:29
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Definition: CubeIoHandler.h:39
void WriteCubeTest(int)
This tests a basic write.
Definition: CubeDataThreadTester.cpp:135