-
Notifications
You must be signed in to change notification settings - Fork 1
/
DependencyEntry.c
39 lines (33 loc) · 1.06 KB
/
DependencyEntry.c
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
#include "DependencyEntry.h"
#include "Clash.h"
#include "Branch.h"
DependencyEntry::DependencyEntry()
{
m_pClashDependency = NULL;
}
void DependencyEntry::addEdgeDependency(Edge* pEdge)
{
m_setEdges.insert(pEdge);
}
void DependencyEntry::addMergeDependency(ExprNode* pInd, ExprNode* pMergeTo)
{
m_setMerges.insert(new MergeDependency(pInd, pMergeTo));
}
void DependencyEntry::addTypeDependency(ExprNode* pInd, ExprNode* pType)
{
m_setTypes.insert(new TypeDependency(pInd, pType));
}
BranchDependency* DependencyEntry::addBranchAddDependency(ExprNode* pAssertion, int iBranchIndex, Branch* pBranch)
{
BranchDependency* pB = new BranchAddDependency(pAssertion, iBranchIndex, pBranch);
m_setBranchAdds.insert(pB);
return pB;
}
BranchDependency* DependencyEntry::addCloseBranchDependency(ExprNode* pAssertion, Branch* pBranch)
{
BranchDependency* pB = new CloseBranchDependency(pAssertion, pBranch->m_iTryNext, pBranch);
if( m_setBranchCloses.find(pB) != m_setBranchCloses.end() )
m_setBranchCloses.erase(pB);
m_setBranchCloses.insert(pB);
return pB;
}