- Timestamp:
- 10/25/10 20:13:51 (14 years ago)
- Location:
- trunk/yao/src/interface
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yao/src/interface/projects/demo/demo.d
r448 r467 15 15 #SPACE name type dim1 [[dim2]---[dim3]] traj --------------------------------------------------- 16 16 space soc_0 M 1 3 5 toc_1 17 18 #NETWARD netname indegree outdegree 19 netward NNRhoatmvis 6 1 20 netward NNTu 4 1 21 netward NNTd 4 1 22 netward NNInvtau 9 1 23 24 #INSERTFCT 25 insert_fct arg xinit_rand 26 insert_fct arg xinit_lin 27 insert_fct arg xload_mod 28 insert_fct arg xinit_Aphs_1 29 insert_fct xinit_Aphs_2 30 insert_fct arg xread_tabC 31 insert_fct arg xinv 32 insert_fct arg xcheck_target 33 insert_fct arg xperturb 34 insert_fct arg xnorm 35 insert_fct xset_minmax -
trunk/yao/src/interface/src/MainWindow.cpp
r466 r467 616 616 void MainWindow::openProject() { // Affiche la fenetre nouveau projet lorsqu'elle est appelée. 617 617 618 //filename += ".d";619 620 // Initilization of the lexer and lexing (wrapped from the object tokenizer)621 // Tokenizer tokenizer("demo.d");622 // // Initialization of the parser and parsing (wrapped from the object tokenizer)623 // Translator translator(tokenizer);624 // // Code generation of the files Y1ProjectName.h and Y2ProjectName.h625 // translator.generateCode();626 // exitStatus = EXIT_SUCCESS;627 // //cout << "End application" << endl;628 //629 630 618 631 619 QFileDialog *dialogue = new QFileDialog(this); //Crée une boite de dialogue … … 645 633 test = builder.readAll();//the results are saved in a string format. 646 634 istringstream iss(test.toStdString()); //To have each word that compose the string. 647 FilePath aString, theShape, name, parent, aType, boot, offset, step, size ;635 FilePath aString, theShape, name, parent, aType, boot, offset, step, size, netname, indegree, outdegree, arg; 648 636 vector <int> theShapeVector; 649 637 650 638 while ( getline(iss, aString, '\n' ) ) // Here we notified that the words in the string are separated by "\n" 651 639 { 640 //For DEFVAL 652 641 if (aString.getExtension() == ".def1")// 653 642 { … … 660 649 theConstantTable.push_back(aConstant); 661 650 } 651 //For HATNAME 662 652 if (aString.getExtension() == ".h") 663 653 { … … 665 655 theHeaderList.push_back(aString); 666 656 } 657 //For TRAJ 667 658 if (aString.getExtension() == ".traj1"){ 668 659 name = aString.getTitle(); … … 694 685 695 686 } //theConstantTable.push_back(aString.getTitle()); 687 //For SPACE 696 688 if (aString.getExtension() == ".sp1")//{ 697 689 name = aString.getTitle(); … … 713 705 theShapeVector.clear(); 714 706 715 } 707 } 708 //For NETWARD 709 if (aString.getExtension() == ".nw1") { 710 netname = aString.getTitle(); 711 } 712 713 if (aString.getExtension() == ".nw2") { 714 indegree = aString.getTitle(); 715 } 716 717 if (aString.getExtension() == ".nw3") { 718 outdegree = aString.getTitle(); 719 720 theNeuronTable.push_back(Neuron(netname, m_netwardWindow->toInt(indegree), m_netwardWindow->toInt(outdegree))); 721 } 716 722 /*if (aString.getExtension() == ".op1") { 717 723 parent = aString.getTitle(); … … 722 728 723 729 }*/ 730 //For INSERTFCT 731 if (aString.getExtension() == ".fct1") { 732 arg = aString.getTitle(); 733 //cout << parent << endl; 734 } 735 if (aString.getExtension() == ".fct2") { 736 bool aBool; 737 parent = aString.getTitle(); 738 aBool = arg.empty() ? false : true ; 739 theFunctionTable.push_back(Function(parent, aBool)); 740 //cout << parent << endl; 741 } 724 742 } 725 743
Note: See TracChangeset
for help on using the changeset viewer.