Changeset 467 for trunk/yao


Ignore:
Timestamp:
10/25/10 20:13:51 (14 years ago)
Author:
yerima
Message:

In the uploading of an existing project.

Location:
trunk/yao/src/interface
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/yao/src/interface/projects/demo/demo.d

    r448 r467  
    1515#SPACE name type dim1 [[dim2]---[dim3]] traj --------------------------------------------------- 
    1616space soc_0 M 1 3 5 toc_1 
     17 
     18#NETWARD netname indegree outdegree 
     19netward NNRhoatmvis 6 1 
     20netward NNTu        4 1 
     21netward NNTd        4 1 
     22netward NNInvtau    9 1 
     23 
     24#INSERTFCT 
     25insert_fct arg xinit_rand 
     26insert_fct arg xinit_lin 
     27insert_fct arg xload_mod 
     28insert_fct arg xinit_Aphs_1 
     29insert_fct  xinit_Aphs_2 
     30insert_fct arg xread_tabC 
     31insert_fct arg xinv 
     32insert_fct arg xcheck_target 
     33insert_fct arg xperturb 
     34insert_fct arg xnorm 
     35insert_fct     xset_minmax 
  • trunk/yao/src/interface/src/MainWindow.cpp

    r466 r467  
    616616void MainWindow::openProject()  { // Affiche la fenetre nouveau projet lorsqu'elle est appelée. 
    617617 
    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.h 
    625             //                     translator.generateCode(); 
    626             //                         exitStatus = EXIT_SUCCESS; 
    627             //                             //cout << "End application" << endl; 
    628             // 
    629  
    630618 
    631619        QFileDialog *dialogue = new QFileDialog(this); //Crée une boite de dialogue 
     
    645633                test = builder.readAll();//the results are saved in a string format. 
    646634                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; 
    648636                vector <int> theShapeVector; 
    649637 
    650638                while ( getline(iss, aString, '\n' ) ) // Here we notified that the words in the string are separated by "\n" 
    651639                        { 
     640                                //For DEFVAL 
    652641                                if (aString.getExtension() == ".def1")// 
    653642                                {                        
     
    660649                                        theConstantTable.push_back(aConstant); 
    661650                                } 
     651                                //For HATNAME 
    662652                                if (aString.getExtension() == ".h") 
    663653                                { 
     
    665655                                        theHeaderList.push_back(aString);        
    666656                                } 
     657                                //For TRAJ 
    667658                                if (aString.getExtension() == ".traj1"){ 
    668659                                        name = aString.getTitle(); 
     
    694685 
    695686                                }               //theConstantTable.push_back(aString.getTitle()); 
     687                                //For SPACE 
    696688                                if (aString.getExtension() == ".sp1")//{ 
    697689                                        name = aString.getTitle(); 
     
    713705                                        theShapeVector.clear(); 
    714706                                         
    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                                } 
    716722                                /*if (aString.getExtension() == ".op1") { 
    717723                                        parent = aString.getTitle();  
     
    722728                                         
    723729                                }*/ 
     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                                } 
    724742                        } 
    725743                         
Note: See TracChangeset for help on using the changeset viewer.