-
Notifications
You must be signed in to change notification settings - Fork 0
/
gfun.cpp
46 lines (40 loc) · 897 Bytes
/
gfun.cpp
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
#include "gfun.h"
#include <cstdlib>
bool SCAN_BEGIN(ifstream &ifs, const string &TargetName, const bool restart)
{
string SearchName;
bool find = false;
if (restart)
{
ifs.clear();
ifs.seekg(0);
}
ifs.rdstate();
while (ifs.good())
{
ifs >> SearchName;
//cout << " " << SearchName << endl;
if ( SearchName == TargetName)
{
find = true;
break;
}
}
if (!find)
{
// cout <<" In SCAN_BEGIN, can't find: "<<TargetName<<" block."<<endl;
}
return find;
}
void TITLE(const string &class_name,const string &function_name)
{
//return;
//cout<<" ==> "<<class_name<<"::"<<function_name<<endl;
return;
}
void QUIT(const string &reason)
{
cout << " ------------------------------------------ " << endl;
cout << " Quit because : " << reason << endl;
exit(0);
}