Changeset 972 for trunk/src/STFit.cpp


Ignore:
Timestamp:
04/03/06 15:07:08 (18 years ago)
Author:
mar637
Message:

Completed Ticket #7 - storing of fits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STFit.cpp

    r960 r972  
    8484{
    8585  uInt rno = table_.nrow();
    86   uInt resultid;
     86  uInt resultid = 0;
    8787  bool foundentry = false;
     88  // replace
    8889  if ( id > -1 ) {
    8990    Table t = table_(table_.col("ID") == id );
     
    9495    }
    9596  }
     97  // doesn't exist
    9698  if ( rno > 0  && !foundentry ) {
    9799    idCol_.get(rno-1, resultid);
    98100    resultid++;
    99101  }
    100   if ( !foundentry )table_.addRow();
    101 
     102  // add new row if new id
     103  if ( !foundentry ) table_.addRow();
     104  cout << rno << "   " << resultid << endl;
    102105  funcCol_.put(rno, mathutil::toVectorString(fit.getFunctions()));
    103106  compCol_.put(rno, Vector<Int>(fit.getComponents()));
     
    109112}
    110113
    111 void STFit::getEntry( STFitEntry& fit, uInt id )
     114void STFit::getEntry( STFitEntry& fit, uInt id ) const
    112115{
    113116  Table t = table_(table_.col("ID") == Int(id) );
Note: See TracChangeset for help on using the changeset viewer.