- Timestamp:
- May 22, 2007, 1:09:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Parser/src/Parse_open_file.cpp
r20 r26 10 10 namespace parser{ 11 11 12 int Parse::open_file(string name){ 12 int Parse::open_file(string name,int level){ 13 13 14 QFile file(QString::fromStdString(name)); 15 QString testname,testname2; 14 16 QString tmppath=QString::fromStdString(name); 15 16 17 QString path=tmppath.left(tmppath.lastIndexOf('/',-1,Qt::CaseSensitive)+1); 17 18 18 absolutePath=path.toStdString(); 19 19 testname=tmppath.right(tmppath.lastIndexOf('.',-1,Qt::CaseSensitive)-1); 20 testname2=testname.left(testname.lastIndexOf('.',-1,Qt::CaseSensitive)); 21 22 if(tmppath.contains('-') && level==0) //file not top level (first open file) 23 { 24 testname2=testname2.left(testname2.lastIndexOf('-',-1,Qt::CaseSensitive)); 25 } 26 27 20 28 if( !file.open( QIODevice::ReadOnly ) ) 21 29 { … … 44 52 #endif 45 53 //BaseP 46 if(!base) 47 base=new morpheo::tools::viewer::bdd::BaseV(); 54 if(!base){ 55 base=new morpheo::tools::viewer::bdd::BaseV(); 56 toplevel=testname2.toStdString(); 57 } 48 58 pos=new morpheo::tools::viewer::bdd::BaseP(); 49 59 //base->addBaseP(pos); 50 parser_pos(root.firstChild() );60 parser_pos(root.firstChild(),level); 51 61 52 62 } 63 64 // delete pos; 65 //delete ctemp; 53 66 return 0; 54 55 56 67 } 57 68
Note: See TracChangeset
for help on using the changeset viewer.