BloombergLP::bdlt::Timetable::addTransitions

Add transitions at time with code on dayOfWeek dates in range.

Synopsis

Declared in <bdlt_timetable.h>

void
addTransitions(
    DayOfWeek::Enum const& dayOfWeek,
    Time const& time,
    int code,
    Date const& firstDate,
    Date const& lastDate);

Description

Add transitions to this timetable that occur at the specified time, having the specified code, on all dates that are of the specified dayOfWeek within the closed interval of dates from the specified firstDate to the specified lastDate. For every date on which this transition will occur, if time is already a transition point, replace the existing code with code. The addition of a transition, but not the replacement of the code of an existing transition, invalidates all iterators. The behavior is undefined unless 24 > time.hour(), firstDate <= lastDate, firstDate and lastDate are within the valid range of this timetable, and 0 <= code || k_UNSET_TRANSITION_CODE == code.

Parameters

NameDescription
dayOfWeekday of week on which to add transitions
timetime of day of each added transition
codetransition code
firstDatefirst date of the closed interval
lastDatelast date of the closed interval