Ignore:
Timestamp:
Oct 30, 2009, 4:09:29 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
df0520
Parents:
b84ab4
Message:

BondGraph is initialized within config::Load(), as it has to happen after parsing options and before loading molecule. And various fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/builder.cpp

    rb84ab4 r245826  
    14511451      return 1;
    14521452    }
    1453     // 3b. Find config file name and parse if possible
     1453    // 3b. Find config file name and parse if possible, also BondGraphFileName
    14541454    if (argv[1][0] != '-') {
    14551455      // simply create a new molecule, wherein the config file is loaded and the manipulation takes place
     
    14791479          case 1:
    14801480            cout << "new syntax." << endl;
    1481             configuration.Load(ConfigFileName, periode, mol);
     1481            configuration.Load(ConfigFileName, BondGraphFileName, periode, mol);
    14821482            configPresent = present;
    14831483            break;
    14841484          case 0:
    14851485            cout << "old syntax." << endl;
    1486             configuration.LoadOld(ConfigFileName, periode, mol);
     1486            configuration.LoadOld(ConfigFileName, BondGraphFileName, periode, mol);
    14871487            configPresent = present;
    14881488            break;
     
    14941494    } else
    14951495      configPresent = absent;
    1496     // 3c. parse the bond graph file if given
    1497     configuration.BG = new BondGraph(configuration.GetIsAngstroem());
    1498     if (configuration.BG->LoadBondLengthTable((ofstream *)&cout, BondGraphFileName)) {
    1499       cout << Verbose(0) << "Bond length table loaded successfully." << endl;
    1500     } else {
    1501       cout << Verbose(0) << "Bond length table loading failed." << endl;
    1502       return 1;
    1503     }
    15041496    // 4. parse again through options, now for those depending on elements db and config presence
    15051497    argptr = 1;
Note: See TracChangeset for help on using the changeset viewer.