Ignore:
Timestamp:
01/09/08 10:22:15 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/LogWriter.cpp

    r2576 r2580  
    77 
    88 
     9LogWriter::LogWriter() 
     10{ 
     11} 
     12 
     13 
     14LogWriter::LogWriter(const std::string &filename): mFilename(filename) 
     15{ 
     16} 
     17 
     18 
    919void LogWriter::SetFilename(const std::string &filename) 
    1020{ 
     
    1323 
    1424 
    15 void LogWriter::Write(ofstream &myfile, const int numSamples, const ViewCellInfoContainer &infos) 
     25void LogWriter::Write(//ofstream &myfile,  
     26                                          const int numSamples, const ViewCellInfoContainer &infos) 
    1627{ 
     28        ofstream myfile; 
     29        myfile.open(mFilename.c_str()); 
     30 
     31        if (!myfile.is_open()) 
     32                myfile.open(mFilename.c_str()); 
     33 
    1734        ViewCellInfoContainer::const_iterator vit, vit_end = infos.end(); 
    1835 
     
    2542} 
    2643 
    27  
     44/* 
    2845void LogWriter::Write(const ViewCellHistoryContainer &hist) 
    2946{ 
    30         ofstream myfile; 
    31  
     47        //ofstream myfile; 
    3248        //char filename[64];  
    3349        //sprintf(filename, "%s %06d", mFilename.c_str(), numSamples); 
    3450        //myfile.open(filename); 
    35         myfile.open(mFilename.c_str()); 
     51        if (!mFile.is_open()) 
     52                mFile.open(mFilename.c_str()); 
    3653 
    3754        ViewCellHistoryContainer::const_iterator vit, vit_end = hist.end(); 
     
    3956        // number of samples 
    4057        //myfile << "samples: " << numSamples << endl; 
    41         myfile << (int)hist.size() << endl; 
     58        mFile << (int)hist.size() << endl; 
    4259 
    4360        for (vit = hist.begin(); vit != vit_end; ++ vit) 
     
    4764} 
    4865 
     66*/ 
     67 
    4968} 
Note: See TracChangeset for help on using the changeset viewer.