Project

General

Profile

Revision 382d8398

ID382d8398045b47cb4cf3216871ff14a8b3e38272

Added by Simon Tenbusch almost 9 years ago

[sequencechart] added methods for correctly displaying blue arrows at the end of events

View differences:

src/eventlog/sequencechartfacade.cc
124 124
    return getTimelineCoordinate((IEvent*)ptr);
125 125
}
126 126

  
127
double SequenceChartFacade::IEvent_getTimelineEventEndCoordinate(ptr_t ptr)
128
{
129
    IEVENT_PTR(ptr);
130
    return getTimelineEventEndCoordinate((IEvent*)ptr);
131
}
132

  
127 133
double SequenceChartFacade::getTimelineCoordinateDelta(double simulationTimeDelta)
128 134
{
129 135
    Assert(nonLinearFocus > 0);
......
140 146
    return getTimelineCoordinate((IEvent *)ptr, lowerTimelineCoordinateCalculationLimit, upperTimelineCoordinateCalculationLimit);
141 147
}
142 148

  
149
double SequenceChartFacade::getTimelineEventEndCoordinate(ptr_t ptr, double lowerTimelineCoordinateCalculationLimit, double upperTimelineCoordinateCalculationLimit)
150
{
151
    IEVENT_PTR(ptr);
152
    return getTimelineEventEndCoordinate((IEvent *)ptr, lowerTimelineCoordinateCalculationLimit, upperTimelineCoordinateCalculationLimit);
153
}
154

  
143 155
double SequenceChartFacade::getTimelineCoordinate(IEvent *event, double lowerTimelineCoordinateCalculationLimit, double upperTimelineCoordinateCalculationLimit)
144 156
{
145 157
    Assert(event);
......
217 229
    return event->cachedTimelineCoordinate;
218 230
}
219 231

  
232
double SequenceChartFacade::getTimelineEventEndCoordinate(IEvent *event, double lowerTimelineCoordinateCalculationLimit, double upperTimelineCoordinateCalculationLimit)
233
{
234
    Assert(event);
235
    Assert(event->getEventLog() == eventLog);
236
    if(!eventLog->isLegacyTrace()) {
237
        return getTimelineCoordinate(event);
238
    }
239
        double timelineEventEndCoordinate;
240
        switch (timelineMode) {
241
            case SIMULATION_TIME:
242
                timelineEventEndCoordinate = (event->getSimulationTime()+event->getEventEntry()->duration - timelineCoordinateOriginSimulationTime).dbl();
243
                break;
244
            default:
245
                return getTimelineCoordinate(event);
246
        }
247
    return timelineEventEndCoordinate;
248
}
249

  
220 250
double SequenceChartFacade::getCachedTimelineCoordinate(IEvent *event)
221 251
{
222 252
    Assert(event);
src/eventlog/sequencechartfacade.h
75 75
         */
76 76
        double getTimelineCoordinate(ptr_t ptr, double lowerTimelineCoordinateCalculationLimit = -DBL_MAX, double upperTimelineCoordinateCalculationLimit = DBL_MAX);
77 77
        double getTimelineCoordinate(IEvent *event, double lowerTimelineCoordinateCalculationLimit = -DBL_MAX, double upperTimelineCoordinateCalculationLimit = DBL_MAX);
78
        double getTimelineEventEndCoordinate(IEvent *event, double lowerTimelineCoordinateCalculationLimit = -DBL_MAX, double upperTimelineCoordinateCalculationLimit = DBL_MAX);
79
        double getTimelineEventEndCoordinate(ptr_t ptr, double lowerTimelineCoordinateCalculationLimit = -DBL_MAX, double upperTimelineCoordinateCalculationLimit = DBL_MAX);
78 80
        double getCachedTimelineCoordinate(IEvent *event);
79 81
        double IEvent_getTimelineCoordinate(ptr_t ptr);
82
        double IEvent_getTimelineEventEndCoordinate(ptr_t ptr);
80 83
        void undefineTimelineCoordinateSystem();
81 84
        void relocateTimelineCoordinateSystem(IEvent *event);
82 85

  

Also available in: Unified diff