Revision 81ad8b66

View differences:

src/eventlog/eventlog.cc
62 62
        firstEvent = NULL;
63 63
        lastEvent = NULL;
64 64

  
65
        legacyTrace = true;
66

  
65 67
        messageNames.clear();
66 68
        messageClassNames.clear();
67 69

  
......
404 406
void EventLog::parseEvent(Event *event, file_offset_t beginOffset)
405 407
{
406 408
    event->parse(reader, beginOffset);
409
    if(event->getEventEndEntry() != NULL)
410
        legacyTrace = false;
411

  
407 412
    cacheEntry(event->getEventNumber(), event->getSimulationTime(), event->getBeginOffset(), event->getEndOffset());
408 413
    cacheEventLogEntries(event);
409 414
    numParsedEvents++;
src/eventlog/eventlog.h
52 52
        Event *firstEvent;
53 53
        Event *lastEvent;
54 54

  
55
        bool legacyTrace; // is legacy trace that does not contain EventEndEntries
56

  
55 57
        typedef std::vector<EventLogEntry *> EventLogEntryList;
56 58
        EventLogEntryList initializationLogEntries; // all entries from the beginning of the file to the first event
57 59

  
......
80 82
        virtual ProgressMonitor setProgressMonitor(ProgressMonitor newProgressMonitor);
81 83
        virtual void setProgressCallInterval(double seconds) { progressCallInterval = (long)(seconds * CLOCKS_PER_SEC); lastProgressCall = clock(); }
82 84
        virtual void progress();
85
        virtual bool isLegacyTrace() { return legacyTrace; }
83 86

  
84 87
        void parseInitializationLogEntries();
85 88

  
src/eventlog/filteredeventlog.h
177 177
        virtual EventLogEntry *getInitializationLogEntry(int index) { return eventLog->getInitializationLogEntry(index); }
178 178
        virtual void printInitializationLogEntries(FILE *file = stdout) {  eventLog->printInitializationLogEntries(file); }
179 179

  
180
        virtual bool isLegacyTrace()  { return eventLog->isLegacyTrace(); }
181

  
180 182
    protected:
181 183
        /**
182 184
         * Caches the given filtered event in the event cache if not present yet.
src/eventlog/ieventlog.h
168 168
         */
169 169
        virtual void printInitializationLogEntries(FILE *file = stdout) = 0;
170 170

  
171
        /**
172
         * returns true if the trace file includes EventEndEntries
173
         */
174
        virtual bool isLegacyTrace() = 0;
175

  
171 176
    public:
172 177
        /**
173 178
         * Returns the event at the given instance. 0 means the parameter event will be returned.

Also available in: Unified diff