Closed cafarm closed 8 years ago
Still undecided about this. It's probably an annoyance for the vast majority of FigureHandlers to think about interval epochs. However, a few handlers might need to.
One possibility is to have two methods and those handlers that don't care about intervals can override one, while those that do can override the other:
function handleEpochOrInterval(obj, epochOrInterval)
% The few handlers that care about handling intervals can override this method.
if ~epochOrInterval.isInterval()
obj.handleEpoch(epoch);
end
end
function handleEpoch(obj, epoch)
% The vast majority of handlers that only care about "true" epochs can override this method.
end
Adds some complexity but it's probably worth it.
There are cases where a FigureHandler may want to handle interval epochs. Right now, only "true" epochs are passed to the
handleEpoch
method of handlers. It might make sense to pass all epochs to handlers and let the handler decide if it wants to deal with "interval" epochs.Adding an
isInterval
method toEpoch
would also be helpful for this.