-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabstract.hh
executable file
·77 lines (68 loc) · 2.55 KB
/
abstract.hh
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*--------------------------------------------------------------------------- *
* srtl implementation in c++ *
* *
* This file contains class header definitions for list pattern class and *
* supporting class. *
* *
* *
* Change History *
* -------------------------------------------------------------------------- *
* Name Date Change Description *
* Sheweta 14-Aug-13 Initial Version *
* *
*--------------------------------------------------------------------------- */
/*--------------------------------------------------------------------------- *
* This class stores the lists of elements. It supports methods to append and *
* display the final string of elements. *
*--------------------------------------------------------------------------- */
#ifndef __ABSTRACT_H_INCLUDED__
#define __ABSTRACT_H_INCLUDED__
#include "pattern.hh"
#include "node.hh"
class AbstPattern : public Pattern {
private:
std::vector<ModeStmt> sList;
std::string pname;
std::string extname;
bool error;
Node* tree;
public:
bool initialized;
bool resolved;
AbstPattern(std::string name){
pname = name;
error = false;
resolved = false;
}
std::string getPatName();
void setPatName(std::string V);
void addStmt(ModeStmt s);
void addStmts (std::vector<ModeStmt> msv) {
sList.insert (sList.end (), msv.begin (), msv.end ());
}
std::vector<ModeStmt>* getStmts () {
return &sList;
}
void setExtName(std::string V);
std::string getExtName();
void setSList(std::vector <ModeStmt> * s);
void setError();
bool inError();
void setPatType(Type t);
Type getPatType () {
return abstract;
}
void setParentPattern(Pattern*);
Pattern* getParentPattern();
void createPattern();
// temporary Debug statements.
int getSListSize () {
return sList.size ();
}
Node* getTree(){
return tree;
}
AbstPattern();
~AbstPattern ();
};
#endif