BloombergLP::bdlt::Timetable_Day::addTransition

Add or replace a transition at time with code.

Synopsis

Declared in <bdlt_timetable.h>

bool
addTransition(
    Time const& time,
    int code);

Description

Add a transition to this daily timetable at the specified time having the specified code. If time is already a transition point, replace the existing code with code. Return true if the value returned by finalTransitionCode() prior to this operation is not equal to the value returned by finalTransitionCode() after this operation, and false otherwise. The behavior is undefined unless 24 > time.hour() and 0 <= code || k_UNSET_TRANSITION_CODE == code.

Return Value

true if the final transition code changed

Parameters

NameDescription
timetransition time
codetransition code