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,
256template <
class CONVENTION>
281template <
class CONVENTION>
285 double periodYearDiff,
287: d_periodDate(periodDate, basicAllocator)
288, d_periodYearDiff(periodYearDiff)
295template <
class CONVENTION>
298 const std::vector<bdlt::Date>& periodDate,
299 double periodYearDiff,
301: d_periodDate(periodDate.begin(), periodDate.end(), basicAllocator)
302, d_periodYearDiff(periodYearDiff)
309#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
310template <
class CONVENTION>
313 const std::pmr::vector<bdlt::Date>& periodDate,
314 double periodYearDiff,
316: d_periodDate(periodDate.begin(), periodDate.end(), basicAllocator)
317, d_periodYearDiff(periodYearDiff)
325template <
class CONVENTION>
332template <
class CONVENTION>
338 return CONVENTION::daysDiff(beginDate, endDate);
341template <
class CONVENTION>
345 return d_periodDate.front();
348template <
class CONVENTION>
352 return d_periodDate.back();
355template <
class CONVENTION>
366 return CONVENTION::yearsDiff(beginDate,
374template <
class CONVENTION>
378 return d_periodDate.get_allocator().mechanism();
389template <
class CONVENTION>
Definition bbldc_daterangedaycount.h:191
Definition bbldc_perioddaterangedaycountadapter.h:159
const bdlt::Date & firstDate() const BSLS_KEYWORD_OVERRIDE
Definition bbldc_perioddaterangedaycountadapter.h:343
~PeriodDateRangeDayCountAdapter() BSLS_KEYWORD_OVERRIDE
Destroy this object.
Definition bbldc_perioddaterangedaycountadapter.h:327
double yearsDiff(const bdlt::Date &beginDate, const bdlt::Date &endDate) const BSLS_KEYWORD_OVERRIDE
Definition bbldc_perioddaterangedaycountadapter.h:357
const bdlt::Date & lastDate() const BSLS_KEYWORD_OVERRIDE
Definition bbldc_perioddaterangedaycountadapter.h:350
bslma::Allocator * allocator() const
Return the allocator used by this adapter to supply memory.
Definition bbldc_perioddaterangedaycountadapter.h:376
int daysDiff(const bdlt::Date &beginDate, const bdlt::Date &endDate) const BSLS_KEYWORD_OVERRIDE
Definition bbldc_perioddaterangedaycountadapter.h:334
Definition bdlt_date.h:294
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this vector.
Definition bslstl_vector.h:2664
iterator begin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_vector.h:2511
iterator end() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_vector.h:2519
Definition bslstl_vector.h:1025
VALUE_TYPE const * const_iterator
Definition bslstl_vector.h:1058
Definition bslma_allocator.h:457
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_OVERRIDE
Definition bsls_keyword.h:653
Definition bbldc_basicactual360.h:107
Definition balxml_encoderoptions.h:68
Definition bslma_usesbslmaallocator.h:343