Isis 3 Programmer Reference
CubeDataThreadTester.h
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 
94 
97 
100 
103 
106  };
107 
108 };
109 
110 
111 #endif
CubeDataThread * p_cubeDataThread
The data thread being tested.
void WriteCubeTest3BreakDeadlock()
This test breaks the deadlock caused by the third write test.
void ReadBrick(void *requester, int cubeId, const Isis::Brick *data)
This is called when a brick is read.
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)
bool p_notifyDone
True if we will notify done on the next brick received for R/W.
void ReadCubeTest(int)
This tests a basic read.
CubeDataThreadTester(CubeDataThread *)
This initializes a CubeDataThreadTester.
void NotifyChangeTest(int)
This test tests this automatic change notifications.
void BrickChanged(int cubeId, const Isis::Brick *data)
This is called when a brick is written.
void ReadWriteBrick(void *requester, int cubeId, Isis::Brick *data)
This is called when a brick is given for R/W.
void WriteCubeTest2(int, int)
This tests two non-conflicting writes.
CubeDataThread * DataThread()
Returns the cube data thread being tested.
QVector< QPair< int, const Isis::Brick * > > * p_cachedDoneBricks
A list of bricks we haven&#39;t send the done signal for.
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.
void WriteCubeTest3(int)
This tests two conflicting* writes.
Encapsulation of Cube I/O with Change Notifications.
void ReadCubeTest2(int, int)
This tests two basic reads with no conflicts.
int p_numTestsDone
The count of completed tests.
void run()
This thread is centered completely around its event loop.
void Connect()
This connects this class&#39; signals and slots with CubeDataThread&#39;s signals and slots.
void NotifyDoneWithData(int, const Isis::Brick *)
Let the cube data thread know we&#39;re no longer working with a particular brick.
virtual ~CubeDataThreadTester()
This cleans up the cube data thread.
bool p_execStarted
True if this thread is started.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
void WriteCubeTest(int)
This tests a basic write.