BloombergLP::bdlt::Timetable

Value-semantic repository of datetime-indexed state transitions.

Synopsis

Declared in <bdlt_timetable.h>

class Timetable;

Description

This class implements a value-semantic repository of datetime-indexed state transitions over a valid range of dates. This valid range, [firstDate() .. lastDate()], spans the first and last dates of a timetable's accessible contents. A timetable can be "populated" with state transitions via a suite of "add" methods. 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.

Type Aliases

NameDescription
const_iterator Type of this timetable's const iterator.

Enums

NameDescription
Unnamed enum Constants for timetable transition codes.

Member Functions

NameDescription
Timetable [constructor]Constructors
operator= Assign the value of rhs to this timetable.
addTransition addTransition overloads
addTransitions Add transitions at time with code on dayOfWeek dates in range.
allocator Return the allocator used by this object.
begin Return an iterator to the first transition in this timetable.
end Return the past-the-end iterator for this timetable.
firstDate Return the earliest date in this timetable's valid range.
initialTransitionCode Return the transition code that is in effect at the start of this timetable (see setInitialTransitionCode).
isInRange Return true if the specified date is within the valid range of this timetable, and false otherwise.
lastDate Return the latest date in this timetable's valid range.
length Return the number of days in this timetable's valid range.
print Format this timetable to the specified output stream.
removeAllTransitions Remove all transitions from this timetable. The removal of a transition invalidates all iterators.
removeTransition removeTransition overloads
removeTransitions removeTransitions overloads
reset Reset this timetable to the default constructed (empty) state. All associated iterators are invalidated.
setInitialTransitionCode Set the initial transition code of this timetable.
setValidRange Set the valid range of this timetable to [firstDate .. lastDate].
swap Exchange the value of this object with other.
transitionCodeInEffect transitionCodeInEffect overloads

Friends

NameDescription
BloombergLP::bdlt::hashAppendPass object to hashAlg for modular hashing.
BloombergLP::bdlt::operator!=Return true if lhs and rhs timetables do not have the same value.
BloombergLP::bdlt::operator==Return true if lhs and rhs timetables have the same value.
BloombergLP::bdlt::Timetable_ConstIteratorProvide read-only, sequential access in increasing (chronological) order to the transitions in a Timetable object.

Non-Member Functions

NameDescription
swapExchange the values of a and b.