FSM Library - C++ version
OFSMTable.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_OFSMTABLE_H_
7 #define FSM_FSM_OFSMTABLE_H_
8 
9 #include <memory>
10 #include <vector>
11 
12 #include "fsm/typedef.inc"
13 
14 class OFSMTableRow;
16 class FsmNode;
17 class Fsm;
18 
37 class OFSMTable
38 {
39 private:
43  int numStates;
44 
48  int maxInput;
49 
53  int maxOutput;
54 
55  //TODO
56  int tblId;
57 
58  //TODO
59  S2CMap s2c;
60 
61  //TODO
62  std::vector<std::shared_ptr<OFSMTableRow>> rows;
63 
67  const std::shared_ptr<FsmPresentationLayer> presentationLayer;
68 
75  std::shared_ptr<OFSMTable> nextAfterZero();
76 public:
85  OFSMTable(const std::vector<std::shared_ptr<FsmNode>>& nodes, const int maxInput, const int maxOutput, const std::shared_ptr<FsmPresentationLayer> presentationLayer);
86 
87  //TODO
88  OFSMTable(const int numStates, const int maxInput, const int maxOutput, const std::vector<std::shared_ptr<OFSMTableRow>>& rows, const std::shared_ptr<FsmPresentationLayer> presentationLayer);
89 
90  //TODO
91  int getId();
92 
93  //TODO
94  S2CMap getS2C();
95 
96  //TODO
97  void setS2C(const S2CMap & ps2c);
98 
108  int get(const int id, const int x, const int y);
109 
110  //TODO
111  int maxClassId() const;
112 
118  std::shared_ptr<OFSMTable> next();
119 
123  std::string getMembers(const int c) const;
124 
133  Fsm toFsm(const std::string & name) const;
134 
139  friend std::ostream & operator<<(std::ostream & out, const OFSMTable & ofsmTable);
140 };
141 #endif //FSM_FSM_OFSMTABLE_H_
Definition: Fsm.h:33
OFSMTable(const std::vector< std::shared_ptr< FsmNode >> &nodes, const int maxInput, const int maxOutput, const std::shared_ptr< FsmPresentationLayer > presentationLayer)
Definition: OFSMTable.cpp:55
Definition: OFSMTable.h:37
Definition: OFSMTableRow.h:18
friend std::ostream & operator<<(std::ostream &out, const OFSMTable &ofsmTable)
Definition: OFSMTable.cpp:298
Definition: FsmPresentationLayer.h:16
Definition: FsmNode.h:27
std::string getMembers(const int c) const
Definition: OFSMTable.cpp:211
std::shared_ptr< OFSMTable > next()
Definition: OFSMTable.cpp:116
Fsm toFsm(const std::string &name) const
Definition: OFSMTable.cpp:233