BloombergLP::bdlt::Timetable_CompactableTransition

This simply-constrained attribute class represents a state transition, implemented as a time for when the transition occurs, and a code to indicate the new state.

Synopsis

Declared in <bdlt_timetable.h>

class Timetable_CompactableTransition;

Enums

Name
Unnamed enum

Member Functions

NameDescription
Timetable_CompactableTransition [constructor]Constructors
operator= Assign to this object the value of the specified rhs compactable transition, and return a reference providing modifiable access to this object.
code Return the code of this compactable transition.
print Format this object to the specified output stream at the (absolute value of) the optionally specified indentation level and return a reference to the modifiable stream. If level is specified, optionally specify spacesPerLevel, the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level). If stream is not valid on entry, this operation has no effect.
time Return the time of this compactable transition.

Friends

NameDescription
BloombergLP::bdlt::Timetable_DayThis class implements a value-semantic repository of time-indexed state transitions over one date (this class implements one day of a timetable). A Timetable_Day can be "populated" with state transitions via the addTransition method, and queried for the transition code in effect at a specified time via the transitionCodeInEffect method. Note that, as an optimization for the transitionCodeInEffect method, the transition code in effect before the first possible transition is stored in d_initialTransitionCode.
BloombergLP::bdlt::TimetableThis 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.

Non-Member Functions

NameDescription
operator!=Return true if the specified lhs and rhs compactable transitions do not have the same value, and false otherwise. Two compactable transitions do not have the same value if they do not have the same time or the same code.
operator<Return true if the specified lhs has a value less than the specified rhs, and false otherwise. Compactable transition lhs has a value less than time rhs if lhs.time() < rhs. The behavior is undefined unless 24 > rhs.hour().
operator<Return true if the specified lhs has a value less than the specified rhs, and false otherwise. Compactable transition lhs has a value less than compactable transition rhs if lhs.time() < rhs.time(), or lhs.time() == rhs.time() and lhs.code() < rhs.code().
operator==Return true if the specified lhs and rhs compactable transitions have the same value, and false otherwise. Two compactable transitions have the same value if they have the same time and code.