-
Notifications
You must be signed in to change notification settings - Fork 0
/
util.h
42 lines (38 loc) · 1.2 KB
/
util.h
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
#ifndef UTIL_H
#define UTIL_H
#include "srtl-driver.hh"
#include <map>
#include <vector>
#include "bnode.h"
#include "node.hh"
#include "pattern_dto.h"
#include <QThread>
namespace util {
srtl_driver* getDriver(int argc, char* argv[]);
class ThreadedParser:public QThread{
private:
char* m_args[20];
int m_argc;
public:
ThreadedParser(int aArgNum, char** aArgs);
void run();
};
class NodeMap{
private:
static void createNodeMap(int aLevel, Node* aNode);
static bool isTreeEnd(std::vector<BNode*> &aVec);
static std::deque<Operand> m_ops;
static std::map<int, std::vector<BNode*> > m_nodeMap;
static void setOpAttrributes(Operand aOp, std::vector<BNode*> &aVec, BNode* aNode);
static void setOpAttrributes(Operand op, BNode* aNode);
public:
static void doDepthFirstSearch(Node* aNode);
static std::map<int, std::vector<BNode*> > getNodeMap();
static void setOpDeque(std::deque<Operand> aDeque);
static void createNodeMap(Node* aRoot);
static std::vector<PatternDTO*> m_mapVec;
static void display(Node* aNode);
static void initData();
};
}
#endif // UTIL_H