FSM Library - C++ version
PkTable.h
1 /*
2  * Copyright. GaĆ«l Dottel, Christoph Hilken, and Jan Peleska 2016 - 2021
3  *
4  * Licensed under the EUPL V.1.1
5  */
6 #ifndef FSM_FSM_PKTABLE_H_
7 #define FSM_FSM_PKTABLE_H_
8 
9 #include <algorithm>
10 #include <iostream>
11 #include <memory>
12 #include <string>
13 #include <vector>
14 
15 #include "fsm/typedef.inc"
16 
17 #include "fsm/PkTableRow.h"
18 #include "interface/FsmPresentationLayer.h"
19 class Dfsm;
20 
24 class PkTable
25 {
26 private:
30  std::vector<std::shared_ptr<PkTableRow>> rows;
31 
35  S2CMap s2c;
36 
40  int maxInput;
41 
45  std::shared_ptr<FsmPresentationLayer> presentationLayer;
46 public:
53  PkTable(const int numStates, const int maxInput, const std::shared_ptr<FsmPresentationLayer> presentationLayer);
54 
62  PkTable(const int numStates, const int maxInput, const std::vector<std::shared_ptr<PkTableRow>> rows, const std::shared_ptr<FsmPresentationLayer> presentationLayer);
63 
69  void setRow(const int s, const std::shared_ptr<PkTableRow> row);
70 
76  void setClass(const int n, const int c);
77 
83  int getClass(const int n) const;
84 
89  int maxClassId() const;
90 
96  std::shared_ptr<PkTable> getPkPlusOneTable() const;
97 
102  Dfsm toFsm(std::string name);
103 
107  std::string getMembers(const int c) const;
108 };
109 #endif //FSM_FSM_PKTABLE_H_
PkTable(const int numStates, const int maxInput, const std::shared_ptr< FsmPresentationLayer > presentationLayer)
Definition: PkTable.cpp:12
void setRow(const int s, const std::shared_ptr< PkTableRow > row)
Definition: PkTable.cpp:24
int maxClassId() const
Definition: PkTable.cpp:39
int getClass(const int n) const
Definition: PkTable.cpp:34
void setClass(const int n, const int c)
Definition: PkTable.cpp:29
Definition: PkTable.h:24
std::shared_ptr< PkTable > getPkPlusOneTable() const
Definition: PkTable.cpp:52
std::string getMembers(const int c) const
Definition: PkTable.cpp:161
Dfsm toFsm(std::string name)
Definition: PkTable.cpp:112
Definition: Dfsm.h:24