-
Notifications
You must be signed in to change notification settings - Fork 0
/
Transition.cpp
49 lines (37 loc) · 900 Bytes
/
Transition.cpp
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
//
// Created by 王若璇 on 16/11/23.
//
#include "Transition.h"
Transition::Transition(const State &lhs, const std::vector<State*> &rhs) {
nextState = new State(lhs);
tolTransNum++;
}
Transition::Transition() {
tolTransNum++;
nextState = nullptr;
}
Transition::Transition(const State &lhs, State* rhs) {
tolTransNum++;
nextState = new State(lhs);
}
Transition::Transition(State *lhs, const vector<State *> &rhs) {
tolTransNum++;
nextState = lhs;
}
Transition::Transition(State *lhs, State *rhs) {
tolTransNum++;
nextState = lhs;
}
void Transition::showDetail() {
tolTransNum++;
recursionShow(nextState);
}
void Transition::recursionShow(State* state) {
if(state== nullptr){
return;
}
}
Transition::Transition(int ID, char inaccept, State *next):transID(ID),inAccept(inaccept) {
tolTransNum++;
nextState = next;
}