[#BloombergLP-bdlt-Timetable_Day]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::Timetable&lowbar;Day
:relfileprefix: ../../
:mrdocs:

This class implements a value&hyphen;semantic repository of time&hyphen;indexed state transitions over one date (this class implements one day of a timetable)&period; A `Timetable&lowbar;Day` can be &quot;populated&quot; with state transitions via the `addTransition` method, and queried for the transition code in effect at a specified time via the `transitionCodeInEffect` method&period; Note that, as an optimization for the `transitionCodeInEffect` method, the transition code in effect before the first possible transition is stored in `d&lowbar;initialTransitionCode`&period;

== Synopsis

Declared in `&lt;bdlt&lowbar;timetable&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class Timetable&lowbar;Day;
----

== Enums

[cols="1"]
|===
| Name
| xref:BloombergLP/bdlt/Timetable_Day/_04enum.adoc[`Unnamed enum`] 
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/Timetable_Day/2constructor-09.adoc[`Timetable&lowbar;Day`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlt/Timetable_Day/operator_assign.adoc[`operator&equals;`] 
| Assign to this object the value of the specified `rhs` daily timetable, and return a reference providing modifiable access to this object&period;
| xref:BloombergLP/bdlt/Timetable_Day/addTransition.adoc[`addTransition`] 
| Add a transition to this daily timetable at the specified `time` having the specified `code`&period; If `time` is already a transition point, replace the existing code with `code`&period; 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&period; The behavior is undefined unless `24 &gt; time&period;hour()` and `0 &lt;&equals; code &verbar;&verbar; k&lowbar;UNSET&lowbar;TRANSITION&lowbar;CODE &equals;&equals; code`&period;
| xref:BloombergLP/bdlt/Timetable_Day/finalTransitionCode.adoc[`finalTransitionCode`] 
| Return the transition code that is in effect at the end of this daily timetable&period; Note that if this daily timetable has no transitions, `initialTransitionCode()` is returned&period;
| xref:BloombergLP/bdlt/Timetable_Day/initialTransitionCode.adoc[`initialTransitionCode`] 
| Return the transition code in effect prior to the start of this daily timetable&period;
| xref:BloombergLP/bdlt/Timetable_Day/removeAllTransitions.adoc[`removeAllTransitions`] 
| Remove all transitions from this daily timetable&period; 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&period;
| xref:BloombergLP/bdlt/Timetable_Day/removeTransition.adoc[`removeTransition`] 
| If a transition occurs at the specified `time`, remove the transition from this daily timetable&period; Otherwise, return without modifying this daily timetable&period; 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&period; The behavior is undefined unless `24 &gt; time&period;hour()`&period;
| xref:BloombergLP/bdlt/Timetable_Day/setInitialTransitionCode.adoc[`setInitialTransitionCode`] 
| Set the transition code in effect prior to the start of this daily timetable to the specified `code`&period; 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&period; The behavior is undefined unless `0 &lt;&equals; code &verbar;&verbar; k&lowbar;UNSET&lowbar;TRANSITION&lowbar;CODE &equals;&equals; code`&period;
| xref:BloombergLP/bdlt/Timetable_Day/size.adoc[`size`] 
| Return the number of transitions in this daily timetable&period;
| xref:BloombergLP/bdlt/Timetable_Day/transitionCodeInEffect.adoc[`transitionCodeInEffect`] 
| Return the transition code associated with the latest transition that occurs on or before the specified `time` in this daily timetable&period; If this daily timetable has no such transition, return `initialTransitionCode()`&period; The behavior is undefined unless `24 &gt; time&period;hour()`&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlt/hashAppend-068.adoc[BloombergLP::bdlt::hashAppend]`
| Pass the specified `object` to the specified `hashAlg`&period; This function integrates with the `bslh` modular hashing system and effectively provides a `bsl&colon;&colon;hash` specialization for `Timetable&lowbar;Day`&period;
| `xref:BloombergLP/bdlt/operator_lt-0c5.adoc[BloombergLP::bdlt::operator&lt;]`
| Return `true` if the specified `lhs` daily timetable is less than the specified `rhs` daily timetable, and `false` otherwise&period; The `lhs` daily timetable is less than the `rhs` daily timetable if `lhs&period;initialTransitionCode() &lt; rhs&period;initialTransitionCode()`, or `lhs&period;initialTransitionCode() &equals;&equals; rhs&period;initialTransitionCode()` and `lhs&period;d&lowbar;transitions &lt; rhs&period;d&lowbar;transitions`&period;
| `xref:BloombergLP/bdlt/operator_not_eq-076.adoc[BloombergLP::bdlt::operator!&equals;]`
| Return `true` if the specified `lhs` and `rhs` daily timetables do not have the same value, and `false` otherwise&period; Two daily timetables do not have the same value if they do not have the same initial transition code, they do not have the same number of transitions, or there is a corresponding pair of transitions that do not have the same value&period;
| `xref:BloombergLP/bdlt/operator_eq-069.adoc[BloombergLP::bdlt::operator&equals;&equals;]`
| Return `true` if the specified `lhs` and `rhs` daily timetables have the same value, and `false` otherwise&period; Two daily timetables have the same value if they have the same initial transition code, the same number of transitions, and each corresponding pair of transitions has the same value&period;
| `xref:BloombergLP/bdlt/Timetable_ConstIterator.adoc[BloombergLP::bdlt::Timetable&lowbar;ConstIterator]`
| Provide read&hyphen;only, sequential access in increasing (chronological) order to the transitions in a `Timetable` object&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
