本文整理汇总了C++中Cond::Load方法的典型用法代码示例。如果您正苦于以下问题:C++ Cond::Load方法的具体用法?C++ Cond::Load怎么用?C++ Cond::Load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cond
的用法示例。
在下文中一共展示了Cond::Load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Execute
void Load::Execute()
{
Output *pOut = pManager->GetOutput();
if (pManager->StatCount>0)
{
pOut->MsgBox("You Should delete any existing statements before loading a new flowchart !!", "Error", true);
return;
}
ifstream In;
In.open("Out.txt");
if (!In.good())
{
pOut->MsgBox("File couldn't be Loaded !!", "Error", true);
return;
}
int N1;
In >> N1;
string ST;
for (int i = 0; i <N1; i++)
{
In >> ST;
if (ST=="START")
{
Start* pT = new Start;
pT->Load(In, pOut);
pManager->AddStatement(pT,true);
}
else if (ST=="END")
{
End* pT = new End;
pT->Load(In,pOut);
pManager->AddStatement(pT, true);
}
else if (ST == "ASSIGN")
{
Assign* pT = new Assign;
pT->Load(In, pOut);
pManager->AddStatement(pT, true);
}
else if (ST == "COND")
{
Cond* pT = new Cond;
pT->Load(In, pOut);
pManager->AddStatement(pT, true);
}
else if (ST == "WRITE")
{
Write* pT = new Write;
pT->Load(In, pOut);
pManager->AddStatement(pT, true);
}
else if (ST == "READ")
{
Read* pT = new Read;
pT->Load(In, pOut);
pManager->AddStatement(pT, true);
}
}
int N2;
In >> N2;
for (int i = 0; i < N2; i++)
{
int s, d,t;
In >> s >> d>>t;
Statement *S, *D; S = D = NULL;
Point p1, p2;
for (int j = 0; j < pManager->StatCount; j++)
{
if (s == pManager->StatList[j]->getID())
{
S = pManager->StatList[j];
p1 = pManager->StatList[j]->getOutlet();
}
if (d == pManager->StatList[j]->getID())
{
D = pManager->StatList[j];
p2 = pManager->StatList[j]->getInlet();
}
if (S && D)
//.........这里部分代码省略.........