forked from iowastateuniversity-programanalysis/hydrogen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraph_Line.cpp
More file actions
27 lines (23 loc) · 751 Bytes
/
Graph_Line.cpp
File metadata and controls
27 lines (23 loc) · 751 Bytes
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
/**
* @author Ashwin K J
* @file
* Implementing Graph_Line.hpp
*/
#include "Graph_Line.hpp"
#include "Graph_Instruction.hpp"
namespace hydrogen_framework {
void Graph_Line::setLineNumber(unsigned Version, unsigned line) {
lineNumber.insert(std::pair<unsigned, unsigned>(Version, line));
} // End setLineNumber
void Graph_Line::pushLineInstruction(Graph_Instruction *inst) {
inst->setGraphLine(this);
lineInstructions.push_back(inst);
} // End pushLineInstruction;
unsigned Graph_Line::getLineNumber(unsigned Version) {
auto searchLine = lineNumber.find(Version);
if (searchLine != lineNumber.end()) {
return searchLine->second;
} // End check for searchLine
return 0;
} // End getLineNumber
} // namespace hydrogen_framework