-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexfile.cpp
More file actions
executable file
·77 lines (72 loc) · 2.21 KB
/
exfile.cpp
File metadata and controls
executable file
·77 lines (72 loc) · 2.21 KB
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
77
#include"all.hpp"
void executeFileRexxCls::exitStmtDetect(void)
{exitStmtExecuted=true;exRexx->exitStmtDetect();}
valBool executeFileRexxCls::callFunction(fCallContCls &tt)
{ valBool ret1;
bool bb1 =false ;
for(int i1=0;i1<objectFile->getSize() ;i1++)
if( objectFile->getProc(i1)->getName() == tt.getName())
{bb1=true;break;}
ret1.b = bb1;
if(bb1)
ret1=callFunctionInThisFile(i1,tt);
else
ret1=exRexx->callFunction(tt);
return ret1;
}
void executeFileRexxCls::setGlobalResultVar(variableValue retVal)
{resultVariable=retVal;exRexx->setGlobalResultVar(retVal); }
valBool executeFileRexxCls::callFunctionInThisFile(int i1,fCallContCls &tt12)
{
valBool ret1;
saveInStackFun();
indexCurProcedure=i1;
curExeProc=new execProcCls(objectFile->getProc(indexCurProcedure),this);
ret1=curExeProc->run(tt12);
delete curExeProc ;
popOfStackFun();
return ret1 ;
}
void executeFileRexxCls::saveInStackFun(void)
{
savedInCallFunctionCls sd1(indexCurProcedure,curExeProc->getNameProc(),curExeProc,getNameFile());
socaf.push(sd1);
}
void executeFileRexxCls::popOfStackFun(void)
{
savedInCallFunctionCls sd1;
sd1=socaf.pop();
indexCurProcedure=sd1.getIndex();
curExeProc=sd1.getProc();
}
valBool executeFileRexxCls::findNameInUpFunc(stringCls <nameVar)
{ valBool vb1;
indexOfFindNameUp++ ;
if(indexOfFindNameUp <=socaf.getSize())
vb1=socaf.getProcFindName(indexOfFindNameUp-1,ltnameVar);
indexOfFindNameUp-- ;
return vb1;
}
void executeFileRexxCls::addNameInUpFunc(stringCls <nameVar,variableValue &vv1)
{
indexOfFindNameUp++ ;
if(indexOfFindNameUp <=socaf.getSize())
socaf.getProcAddName(indexOfFindNameUp-1,ltnameVar,vv1);
indexOfFindNameUp-- ;
}
valBool executeFileRexxCls::findNameArrInUpFunc(stringCls &nameString1)
{
indexOfFindNameUp++ ;
valBool xx;
if(indexOfFindNameUp <=socaf.getSize())
xx=socaf.getProcArrName(indexOfFindNameUp-1,nameString1);
indexOfFindNameUp-- ;
return xx;
}
void executeFileRexxCls::addArrNameInUpFunc(stringCls <nameVar,variableValue &vv1)
{
indexOfFindNameUp++ ;
if(indexOfFindNameUp <=socaf.getSize())
socaf.getProcAddArrName(indexOfFindNameUp-1,ltnameVar,vv1);
indexOfFindNameUp-- ;
}