src/integrityScan.h

Wed, 22 Oct 2014 16:10:52 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Wed, 22 Oct 2014 16:10:52 +0300
branch
experimental
changeset 915
c64c83cede6e
permissions
-rw-r--r--

- added integrity scan first steps

915
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 #include "main.h"
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
2
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
3 class Ui_IntegrityScan;
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
4
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
5 class IntegrityScan
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6 {
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7 public:
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 class Procedure
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 {
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10 public:
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11 Procedure (IntegrityScan* scan);
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
12 virtual int numIterations() const = 0;
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
13 virtual int currentIteration() const = 0;
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
14 virtual void work() = 0;
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
15
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
16 DELETE_COPY (Procedure)
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
17 };
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
18
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
19 IntegrityScan();
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
20 ~IntegrityScan();
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
21
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
22 DELETE_COPY (IntegrityScan)
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
23 LDDocumentPtr document() const;
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
24
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
25 private:
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
26 Ui_IntegrityScan ui;
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
27 QVector<QSharedPtr<Procedure>> m_procedures;
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
28 LDDocumentPtr m_document;
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
29 };
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
30
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
31 class DoubleLineScan : public IntegrityScan::Procedure
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
32 {
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
33 public:
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
34 DoubleLineScan (IntegrityScan* scan);
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
35
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
36 int numIterations() const override;
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
37 int currentIteration() const override;
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
38 void work();
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
39
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
40 private:
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
41 int m_i = 0;
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
42
c64c83cede6e - added integrity scan first steps
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
43 };

mercurial