-
Notifications
You must be signed in to change notification settings - Fork 0
/
State.hpp
38 lines (32 loc) · 860 Bytes
/
State.hpp
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
//
// State.hpp
// UTM
//
// Created by Abd al rhman Taher on 4/24/16.
// Copyright © 2016 Abd al rhman Taher. All rights reserved.
//
#ifndef State_hpp
#define State_hpp
#include <stdio.h>
#include <vector>
#include "InputTapeEngine.hpp"
#include "TFunction.hpp"
using namespace std;
class State
{
private:
string stateID ;
vector<TFunction> TransitionFunctions ;
TFunction findFunction(string input);
public:
State();
State(string stateID , vector<TFunction> funs) ;
void setStateID(string sID);
string getStateID();
void setTransitionFunctions(vector<TFunction> tFuns);
vector<TFunction> getTransitionFunctions();
void print();
bool isSet() ;
string executeFunction(string input , InputTapeEngine &inputEngine);
};
#endif /* State_hpp */