-
Notifications
You must be signed in to change notification settings - Fork 4
/
project.h
executable file
·96 lines (73 loc) · 2.4 KB
/
project.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#ifndef PROJECT_H
#define PROJECT_H
#include <QString>
#include <QVariant>
//#include "pluginconfigure.h"
#include "util.h"
#define ROBUSTNESS_INF 0
#define ROBUSTNESS_BRI 1
#define ROBUSTNESS_CUS 2
#define UNSERILIZE_FAILED -1
#define UNSERILIZE_SUCCESS 0
#define TOOL_BASIC "Basic"
#define TOOL_GEOMETRY "Geometry"
#define TOOL_DEEPSYMBOL "DeepSymbol"
#define TOOL_DEEPG "DeepG"
#define TOOL_DIFFAI "DiffAI"
#define TOOL_RELUPLEX "Reluplex"
#define TOOL_PLANET "PLANET"
#define TOOLS {TOOL_BASIC,TOOL_GEOMETRY,TOOL_RELUPLEX}
//#define TOOLS {TOOL_DEEPSYMBOL,TOOL_DIFFAI,TOOL_DEEPG}
#define ELEMENT_NUMBER 2
class Project: public QObject
{
Q_OBJECT
private:
QString path;
QString networkFileName;
QString inputFileName;
// QString robustnessType = ROBUSTNESS_TYPE_LINFBALL;
QString name;
bool isSetNetworkFile = false;
bool isSetInputFile = false;
// bool isSetRobustnessType = false;
QString serilize();
int unserilize(const QString & project,QStringList tools);
QStringList * tools = new QStringList();
//PluginConfigure * pcf;
signals:
void closeFile();
void saveProject();
void networkFileChanged(QString path, QString fileName);
void inputFileChanged(QString path, QString fileName);
void addTool(QString tool,QString index,Project * project);
void removeTool(QString tool,QString index);
public:
Project(const QString & path, const QString & name);
Project( const QString & name);
void setNetworkFileName(const QString & modelFileName);
void setInputFileName(const QString & formuleFileName);
// void setRobustnessType(QString robustnessType);
QString getNetworkFileSuffix();
QString getInputFileSuffix();
//QString getRobustnessType();
QString getAbsoluteNetworkFile();
QString getAbsoluteInputFile();
QString getNetworkFileName();
QString getInputFileName();
QString getPath();
QString getName();
QString generateParametersList();
QString generateParametersListWithInput(const QString inputfilename);
const QStringList * getTools();
bool isValidNetworkFile();
bool isValidInputFile();
//bool isValidRobustnessType();
void save();
void open(QString projectFile,QStringList tools);
QVariant get(int column) const;
int count() const;
void appendTool(QString tool,QString index);
void deleteTool(QString tool,QString index);
};
#endif // PROJECT_H