8#ifndef INCLUDED_BBLDC_PERIODDATERANGEDAYCOUNTADAPTER
9#define INCLUDED_BBLDC_PERIODDATERANGEDAYCOUNTADAPTER
124#include <bblscm_version.h>
140#include <bsl_iterator.h>
141#include <bsl_vector.h>
158template <
class CONVENTION>
164 double d_periodYearDiff;
184 double periodYearDiff,
187 const std::vector<bdlt::Date>& periodDate,
188 double periodYearDiff,
190#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
192 const std::pmr::vector<bdlt::Date>& periodDate,
193 double periodYearDiff,
260template <
class CONVENTION>
285template <
class CONVENTION>
289 double periodYearDiff,
291: d_periodDate(periodDate, basicAllocator)
292, d_periodYearDiff(periodYearDiff)
299template <
class CONVENTION>
302 const std::vector<bdlt::Date>& periodDate,
303 double periodYearDiff,
305: d_periodDate(periodDate.begin(), periodDate.end(), basicAllocator)
306, d_periodYearDiff(periodYearDiff)
313#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
314template <
class CONVENTION>
317 const std::pmr::vector<bdlt::Date>& periodDate,
318 double periodYearDiff,
320: d_periodDate(periodDate.begin(), periodDate.end(), basicAllocator)
321, d_periodYearDiff(periodYearDiff)
329template <
class CONVENTION>
336template <
class CONVENTION>
342 return CONVENTION::daysDiff(beginDate, endDate);
345template <
class CONVENTION>
349 return d_periodDate.front();
352template <
class CONVENTION>
356 return d_periodDate.back();
359template <
class CONVENTION>
370 return CONVENTION::yearsDiff(beginDate,
378template <
class CONVENTION>
382 return d_periodDate.get_allocator().mechanism();
393template <
class CONVENTION>
Definition bbldc_daterangedaycount.h:191
Definition bbldc_perioddaterangedaycountadapter.h:159
const bdlt::Date & firstDate() const BSLS_KEYWORD_OVERRIDE
Definition bbldc_perioddaterangedaycountadapter.h:347
~PeriodDateRangeDayCountAdapter() BSLS_KEYWORD_OVERRIDE
Destroy this object.
Definition bbldc_perioddaterangedaycountadapter.h:331
double yearsDiff(const bdlt::Date &beginDate, const bdlt::Date &endDate) const BSLS_KEYWORD_OVERRIDE
Definition bbldc_perioddaterangedaycountadapter.h:361
const bdlt::Date & lastDate() const BSLS_KEYWORD_OVERRIDE
Definition bbldc_perioddaterangedaycountadapter.h:354
bslma::Allocator * allocator() const
Return the allocator used by this adapter to supply memory.
Definition bbldc_perioddaterangedaycountadapter.h:380
int daysDiff(const bdlt::Date &beginDate, const bdlt::Date &endDate) const BSLS_KEYWORD_OVERRIDE
Definition bbldc_perioddaterangedaycountadapter.h:338
Definition bdlt_date.h:294
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this vector.
Definition bslstl_vector.h:3019
iterator begin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_vector.h:2866
iterator end() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_vector.h:2874
Definition bslstl_vector.h:1120
VALUE_TYPE const * const_iterator
Definition bslstl_vector.h:1153
Definition bslma_allocator.h:545
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1917
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
#define BSLS_KEYWORD_OVERRIDE
Definition bsls_keyword.h:695
Definition bbldc_basicactual360.h:107
Definition baljsn_encoder_testtypes.h:76
Definition bslma_usesbslmaallocator.h:344