Changeset 162 for bdm/stat/loggers.h

Show
Ignore:
Timestamp:
09/04/08 20:27:01 (16 years ago)
Author:
smidl
Message:

opravy a dokumentace

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • bdm/stat/loggers.h

    r145 r162  
    3737 
    3838//! returns an identifier which will be later needed for calling the log() function 
    39         virtual int add ( RV rv, string name="" ) { 
     39        virtual int add (const RV &rv, string name="" ) { 
    4040                int id=entries.length(); 
    4141                names=concat ( names, name ); // diff 
     
    4848        virtual void logit ( int id, vec v ) =0; 
    4949 
    50 //! consider this record to be complete 
    51         virtual void step(bool final=false) =0; 
     50//! Shifts storage position for another time step. 
     51        virtual void step() =0; 
     52 
     53        //! Finalize storing information 
     54        virtual void finalize() {}; 
    5255 
    5356        //! for future use 
     
    8285                ; 
    8386        } 
    84         void step(bool final=false) {if ( ind<maxlen ) ind++; else it_error ( "memlog::ind is too high;" );} 
    85         void logit ( int id, vec v ) {vectors ( id ).set_row ( ind,v );} 
     87        void step() {if ( ind<maxlen ) ind++; else it_error ( "memlog::ind is too high;" );} 
     88        void logit ( int id, vec v ) { 
     89                it_assert_debug(id<vectors.length(),"Logger was not initialized, run init()."); 
     90                vectors ( id ).set_row ( ind,v );} 
    8691        //! Save values into an itfile named after \c fname. 
    8792        void itsave(const char* fname); 
     
    110115        //! Initialize storage 
    111116        void init(); 
    112         void step(bool final=false); 
     117        void step(); 
     118        void finalize(); 
    113119        /*! \brief Write memory storage to disk.  
    114120        @param Len length of buffer to be written, if 0 the file is truncated at 0.