-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodelxmlreader.h
60 lines (54 loc) · 1.54 KB
/
modelxmlreader.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
/*!
* \file modelxmlreader.h
* \author Simon Coakley
* \date 2012
* \copyright Copyright (c) 2012 University of Sheffield
* \brief Header file for the XML model reader
*/
#ifndef MODELXMLREADER_H_
#define MODELXMLREADER_H_
#include <QXmlStreamReader>
#include "./machinemodel.h"
#include "./memorymodel.h"
#include "./machinescene.h"
#include "./mpre.h"
#include "./mpost.h"
#include "./machine.h"
#include "./condition.h"
#include "./messagecomm.h"
class modelXMLReader : public QXmlStreamReader {
public:
explicit modelXMLReader(Machine * m);
bool read(QFile * file);
private:
void readUnknownElement();
void readModel();
void readAgents();
void readAgent();
void readMessages();
void readMessage();
void readVariables(Machine * a);
void readVariable(Machine * a);
void readTransitions(Machine * a);
void readTransition(Machine * a);
void readCondition(Condition * c, QString * s);
void readMpost();
void readIncludedModels();
void readIncludedModel();
void readEnvironment();
void readDataTypes(Machine * a);
void readDataType(Machine * a);
void readTimeUnits(Machine * a);
void readTimeUnit(Machine * a);
void readInputs(Communication * input);
void readInput(Communication * input);
void readOutputs(Communication * output);
void readOutput(Communication * output);
void readSort(MessageComm * input);
void readFunctionFiles(Machine * a);
Machine * machine;
Mpre mpre;
Mpost mpost;
QFile * file;
};
#endif // MODELXMLREADER_H_