blob: f3b9794e2c341a65a69fa0fe14fd027855cb7fd6 [file] [log] [blame]
anjana_sreekumar@infosys.com991c2062020-01-08 11:42:57 +05301/*
2 * Copyright (c) 2019, Infosys Ltd.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <string>
18#include <deque>
19#include "smTypes.h"
20
21#ifndef ACTIONTABLE_H_
22#define ACTIONTABLE_H_
23
24namespace SM
25{
26
27 class ControlBlock;
28 class State;
29
30 using namespace std;
31
32 class ActionTable
33 {
34 public:
35 ActionTable();
36 virtual ~ActionTable();
37
38 virtual void display();
39
40 ActStatus executeActions(ControlBlock& cb);
41 void addAction(ActionPointer act);
42 void setNextState(State*st);
43 private:
44 deque<ActionPointer> actionsQ;
45 State* nextStatep;
46 };
47}
48#endif /* ACTIONTABLE_H_ */