-
Notifications
You must be signed in to change notification settings - Fork 1
/
CTransition.h
47 lines (39 loc) · 909 Bytes
/
CTransition.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
#ifdef WIN32
#pragma warning (disable: 4514 4786)
#endif
#include <string>
#include <vector>
using namespace std;
class CCPNet;
class CPlace;
class CArc;
class CVar;
#include "CValue.h"
class CTransition
{
public:
string name;
vector<CPlace*> fromPlaces;
vector<CPlace*> toPlaces;
vector<CArc*> fromArcs;
vector<CArc*> toArcs;
vector<int> fromArcsInit;
vector<CVar*> vars;
CCPNet *cpnet;
public:
CTransition(string a_name, CCPNet *a_cpnet);
void addFromPlaceAndValue(string strPlace, CValue value);
void addToPlaceAndValue(string strPlace, CValue value);
int findVar(CVar *var);
CVar* addVar(string a_name);
void addVarFromValue(CArc *arc, CValue &value);
void addAllVars();
void initAlterValues();
CVar* varname2Var(string strVarname);
CValue varname2Value(string strVarname);
int okSubArc(CArc *arc);
int subArc(CArc *arc);
int addArc(CArc *arc);
void init();
int fire();
};