[#BloombergLP-bdlt-Timetable]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::Timetable
:relfileprefix: ../../
:mrdocs:

Value&hyphen;semantic repository of datetime&hyphen;indexed state transitions&period;

== Synopsis

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

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

== Description

This class implements a value&hyphen;semantic repository of datetime&hyphen;indexed state transitions over a _valid_ _range_ of dates&period; This valid range, `&lsqb;firstDate() &period;&period; lastDate()&rsqb;`, spans the first and last dates of a timetable&apos;s accessible contents&period; A timetable can be &quot;populated&quot; with state transitions via a suite of &quot;add&quot; methods&period; Note that the behavior of requesting _any_ timetable information for a supplied date whose value is outside the current _valid_ _range_ for that timetable is undefined&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/Timetable/const_iterator.adoc[`const&lowbar;iterator`] 
| Type of this timetable&apos;s const iterator&period;
|===


== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/Timetable/_04enum.adoc[`Unnamed enum`] 
| Constants for timetable transition codes&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/Timetable/2constructor-046.adoc[`Timetable`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlt/Timetable/operator_assign.adoc[`operator&equals;`] 
| Assign the value of `rhs` to this timetable&period;
| xref:BloombergLP/bdlt/Timetable/addTransition-06.adoc[`addTransition`] 
| `addTransition` overloads
| xref:BloombergLP/bdlt/Timetable/addTransitions.adoc[`addTransitions`] 
| Add transitions at `time` with `code` on `dayOfWeek` dates in range&period;
| xref:BloombergLP/bdlt/Timetable/allocator.adoc[`allocator`] 
| Return the allocator used by this object&period;
| xref:BloombergLP/bdlt/Timetable/begin.adoc[`begin`] 
| Return an iterator to the first transition in this timetable&period;
| xref:BloombergLP/bdlt/Timetable/end.adoc[`end`] 
| Return the past&hyphen;the&hyphen;end iterator for this timetable&period;
| xref:BloombergLP/bdlt/Timetable/firstDate.adoc[`firstDate`] 
| Return the earliest date in this timetable&apos;s valid range&period;
| xref:BloombergLP/bdlt/Timetable/initialTransitionCode.adoc[`initialTransitionCode`] 
| Return the transition code that is in effect at the start of this timetable (see `setInitialTransitionCode`)&period;
| xref:BloombergLP/bdlt/Timetable/isInRange.adoc[`isInRange`] 
| Return `true` if the specified `date` is within the valid range of this timetable, and `false` otherwise&period;
| xref:BloombergLP/bdlt/Timetable/lastDate.adoc[`lastDate`] 
| Return the latest date in this timetable&apos;s valid range&period;
| xref:BloombergLP/bdlt/Timetable/length.adoc[`length`] 
| Return the number of days in this timetable&apos;s valid range&period;
| xref:BloombergLP/bdlt/Timetable/print.adoc[`print`] 
| Format this timetable to the specified output `stream`&period;
| xref:BloombergLP/bdlt/Timetable/removeAllTransitions.adoc[`removeAllTransitions`] 
| Remove all transitions from this timetable&period; The removal of a transition invalidates all iterators&period;
| xref:BloombergLP/bdlt/Timetable/removeTransition-0b.adoc[`removeTransition`] 
| `removeTransition` overloads
| xref:BloombergLP/bdlt/Timetable/removeTransitions-09.adoc[`removeTransitions`] 
| `removeTransitions` overloads
| xref:BloombergLP/bdlt/Timetable/reset.adoc[`reset`] 
| Reset this timetable to the default constructed (empty) state&period; All associated iterators are invalidated&period;
| xref:BloombergLP/bdlt/Timetable/setInitialTransitionCode.adoc[`setInitialTransitionCode`] 
| Set the initial transition code of this timetable&period;
| xref:BloombergLP/bdlt/Timetable/setValidRange.adoc[`setValidRange`] 
| Set the valid range of this timetable to `&lsqb;firstDate &period;&period; lastDate&rsqb;`&period;
| xref:BloombergLP/bdlt/Timetable/swap.adoc[`swap`] 
| Exchange the value of this object with `other`&period;
| xref:BloombergLP/bdlt/Timetable/transitionCodeInEffect-091.adoc[`transitionCodeInEffect`] 
| `transitionCodeInEffect` overloads
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlt/hashAppend-000.adoc[BloombergLP::bdlt::hashAppend]`
| Pass `object` to `hashAlg` for modular hashing&period;
| `xref:BloombergLP/bdlt/operator_not_eq-079.adoc[BloombergLP::bdlt::operator!&equals;]`
| Return `true` if `lhs` and `rhs` timetables do not have the same value&period;
| `xref:BloombergLP/bdlt/operator_eq-08bb.adoc[BloombergLP::bdlt::operator&equals;&equals;]`
| Return `true` if `lhs` and `rhs` timetables have 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;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/swap-0f.adoc[`swap`]
| Exchange the values of `a` and `b`&period;
|===


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