Files Classes Functions Hierarchy
00001 #include <iostream> 00002 using namespace std; 00003 00004 #include <modulelist.h> 00005 #include <stringconvert.h> 00006 #include <stringserialization.h> 00007 #include <stringspace.h> 00008 #include <systemcalls.h> 00009 #include <tokenizer.h> 00010 00011 string modulelist::tempfile="/tmp/projfindmodules2.txt"; 00012 00013 boolc modulelist::buildlist() 00014 { 00015 modules.clear(); 00016 doc.clear(); 00017 00018 systemcallseval("bash ${projdirectory}/makefilebuildtool/modulelist.sh"); 00019 00020 string input; 00021 bool res=filestring::serialize(input,tempfile); 00022 00023 if (res==false) 00024 { 00025 cout << "error: could not open file " << tempfile << endl; 00026 return false; 00027 } 00028 00029 tokenizer tk; 00030 tk.readaslines(input); 00031 00032 for ( tk.reset(); !tk; ++tk) 00033 { 00034 //cout << SHOW3(tk()) << endl; 00035 string targ=tk(); 00036 string::size_type pos1=targ.find("/"); 00037 string::size_type pos2=targ.rfind("/"); 00038 // ./doc.html is excluded 00039 if (pos1==pos2) 00040 continue; 00041 assert(pos2!=string::npos); 00042 string file=targ.substr(pos2+1); 00043 string module=targ.substr(pos1+1,pos2-2); 00044 //cout << SHOW3(module) << " " << SHOW3(file) << endl; 00045 00046 modules.push_back(module); 00047 doc.push_back(file); 00048 } 00049 00050 return true; 00051 } 00052
1.5.8