Changeset 26 for cpp/f8-to-f1/conv_f8tof1.cpp
- Timestamp:
- 06/29/09 22:12:09 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/f8-to-f1/conv_f8tof1.cpp
r25 r26 366 366 SString s = SString::valueOf(params[0]); 367 367 #if CONV_DEBUG > 1 368 cout << "@@@@@ Wartosc parametru: " << this->paramName << ": " << params[0] << endl;368 cout << "@@@@@ Param value: " << this->paramName << ": " << params[0] << endl; 369 369 #endif 370 370 return s; … … 414 414 } 415 415 416 /**417 * Zwracamy puste, bo co innego mamy zrobić?418 */419 416 const SString Production::getF1Genotype(const vector<double> params) { 420 return SString( "");417 return SString(); //return empty 421 418 } 422 419 … … 430 427 } 431 428 432 // jedziemy po podprodukcjach429 //iterate through subproductions 433 430 for (vector<SubProduction>::iterator subProdIter = this->subproductions.begin(); 434 431 subProdIter != this->subproductions.end(); subProdIter++) { … … 438 435 SubProduction &sp = *subProdIter; 439 436 bool conditionsOK = true; 440 // sprawdzenie warunków dla danej podprodukcji437 //check conditions of subproduction 441 438 for (vector<Condition>::iterator condIter = sp.conditions.begin(); 442 439 condIter != sp.conditions.end(); condIter++) { 443 440 if (conditionsOK == false) { 444 break; //b o dalsze sprawdzanie i tak nie ma sensu441 break; //because it's no use checking further 445 442 } 446 443 Condition &c = *condIter; … … 479 476 } 480 477 if (conditionsOK) { 481 // jedziemy po każdej akcji w danej podprodukcji478 //iterate through each action in subproduction 482 479 for (int i = 0; i < sp.actions.size(); i++) { 483 480 #if CONV_DEBUG > 1 … … 487 484 vector<SString> strParams = sp.actions[i].params; 488 485 vector<double> params; 489 // podmieniamy nazwy parametrów na ich wartości486 //replace parameter names with values 490 487 for (vector<SString>::iterator paramIter = strParams.begin(); 491 488 paramIter != strParams.end(); paramIter++) { … … 527 524 while (in.getNextToken(pos, line, '\n')) { 528 525 #if CONV_DEBUG > 1 529 std::cout << "### Lin ia: " << line << std::endl;526 std::cout << "### Line: " << line << std::endl; 530 527 #endif 531 528 if (line.startsWith("P") && line.indexOf('(', 0) == -1) { … … 540 537 SString prodName = line.substr(0, lParenIndex); 541 538 #if CONV_DEBUG > 1 542 std::cout << "###Produ kcja: " << prodName << std::endl;539 std::cout << "###Production: " << prodName << std::endl; 543 540 #endif 544 541 names.push_back(prodName); … … 599 596 600 597 //cout << "convert() 1" << endl; 601 // ustawienie zmiennych dla początkowej produkcji598 //set parameters for start production 602 599 Production *firstProduction = lsystem->productions[lsystem->firstProductionName]; 603 600 vector<double> params; … … 674 671 Lsystem *lsys = new Lsystem(); 675 672 676 // wczytujemy nazwy produkcji i tworzymy wstępnie dla nich obiekty673 //read production names and create objects for them 677 674 vector<SString> names = this->readProductionNames(in); 678 675 for (vector<SString>::iterator nameIter = names.begin(); nameIter != names.end(); nameIter++) { … … 699 696 #if CONV_DEBUG > 1 700 697 701 cout << "@@@@@ P rzeparsowane" << endl;698 cout << "@@@@@ Parsed" << endl; 702 699 703 700 cout << "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&" << endl; … … 726 723 727 724 bool GenoConv_F8ToF1::parseInput(const char* src, Lsystem* lsys) { 728 //ini cjalizacja zmiennych parsera725 //initialize parser 729 726 int yv; 730 727 istringstream input; … … 739 736 extern YYSTYPE yylval; 740 737 741 //pars owanie wejścia738 //parse input 742 739 // on EOF yylex will return 0 743 740 while((yv = scanner.yylex()) != 0) {
Note: See TracChangeset
for help on using the changeset viewer.