Provide read‐only, sequential access in increasing (chronological) order to the business days in a Calendar object.

Synopsis

Declared in <bdlt_calendar.h>

class Calendar_BusinessDayConstIter;

Type Aliases

Name

Description

difference_type

Signed integral type used to represent the distance between iterators.

iterator_category

Iterator category for this business‐day iterator.

pointer

Proxy pointer type returned by this iterator's operator‐>.

reference

The star operator returns a PackedCalendar_DateRef by value.

value_type

Type of each element referenced by this iterator.

Member Functions

Name

Description

Calendar_BusinessDayConstIter [constructor]

Create an iterator having the value of the specified original iterator.

~Calendar_BusinessDayConstIter [destructor]

Destroy this object.

operator=

Assign to this iterator the value of the specified rhs iterator, and return a reference providing modifiable access to this object.

operator*

Return a PackedCalendar_DateRef object that contains the date value of the business day referenced by this iterator.

operator++

Advance this iterator to refer to the next business day in the associated calendar, and return a reference providing modifiable access to this object. The behavior is undefined unless, on entry, this iterator references a valid business day.

operator‐‐

Regress this iterator to refer to the previous business day in the associated calendar, and return a reference providing modifiable access to this object. The behavior is undefined unless, on entry, this iterator references a valid business day that is not the first business day for the associated calendar.

operator‐>

Return a date proxy for the business day referenced by this iterator.

Friends

Name

Description

BloombergLP::bdlt::operator!=

Return true if the specified lhs and rhs iterators do not refer to the same element in the same calendar, and false otherwise. The behavior is undefined unless lhs and rhs both iterate over the same calendar.

BloombergLP::bdlt::operator==

Return true if the specified lhs and rhs iterators refer to the same element in the same calendar, and false otherwise. The behavior is undefined unless lhs and rhs both iterate over the same calendar.

BloombergLP::bdlt::Calendar

This class implements a runtime‐efficient, value‐semantic repository of weekend and holiday information over a valid range of dates. This valid range, [firstDate() .. lastDate()], spans the first and last dates of a calendar's accessible contents. A calendar can be "populated" with weekend and holiday information via a suite of "add" methods. Any subset of days of the week may be specified as weekend (i.e., recurring non‐business) days starting from a specified date by adding a weekend‐days transition; holidays within the valid range are specified individually. When adding a holiday, an arbitrary integer "holiday code" may be associated with that date. Additional holiday codes for that date may subsequently be added. Both the holidays and the set of unique holiday codes associated with each holiday date are maintained (internally) in order of increasing value. Note that the behavior of requesting any calendar information for a supplied date whose value is outside the current valid range for that calendar (unless otherwise noted, e.g., isWeekendDay) is undefined.

Non-Member Functions

Name

Description

operator++

Advance the specified iterator to refer to the next business day in the associated calendar, and return the previous value of iterator. The behavior is undefined unless, on entry, iterator references a valid business day.

operator‐‐

Regress the specified iterator to refer to the previous business day in the associated calendar, and return the previous value of iterator. The behavior is undefined unless, on entry, iterator references a valid business day that is not the first business day for the associated calendar.

Created with MrDocs